Skip to main content
@pagfinance/sdk is the framework-agnostic client SDK for integrating external applications with the PagFinance API (crypto payments converted to PIX, boleto, or gift card, KYC verification, and price quotes).
Official package reference: @pagfinance/sdk on npm. This documentation is based on the README and the public contract of that package.

Why use the SDK

The SDK was designed to be pluggable into any application and to never contain secrets, keys, or cryptography logic. Everything sensitive stays in the host application, protecting PagFinance’s intellectual property and security.

Broad compatibility

Works on Node 18+, browsers, and modern bundlers.

No embedded secrets

No private key or signing logic lives in the client.

Web3 authentication

Challenge-response login (SIWS style), orchestrated by the SDK.

Framework-agnostic

Independent of any specific UI framework or backend.

Requirements

18+
Node 18 or later, a modern browser, or a bundler.
optional
For authenticated endpoints, provide a JWT token obtained through the login flow. Public endpoints do not require a token.

Installation

Getting started

Instantiate the client pointing to the API host and start calling public endpoints, which require no authentication:
Continue with Authentication and Configuration to set up the client and the login, then see Usage and Examples for end-to-end flows.

Next steps

Authentication and Configuration

Client options, tokens, and challenge-response login.

Usage and Examples

Complete quote, creation, and receipt flows.

Method Reference

All available resources and methods.

API Reference

REST endpoints underlying the SDK.