npm
@uqpay/sdk
The SDK requires Node.js 20 or higher.
Installation
Quick start
Configuration
Pass options when you create the client:Authentication
The SDK handles authentication automatically. It exchanges yourclientId and apiKey for a token, caches it, and refreshes it before expiry. You do not need to manage tokens manually.
Acting on behalf of a sub-account
To make API calls on behalf of a connected sub-account, pass thex-on-behalf-of header:
Idempotency
Every request includes an auto-generated UUID idempotency key. To provide your own:Pagination
All list methods return aPaginatedResponse<T> with data, total_pages, and total_items:
page_number until it reaches total_pages to paginate through all results.
Logging
Enable debug logging to see all requests and responses:apiKey, card_number, cvc, iban, etc.) are automatically redacted. You can add custom fields to redact:
Escape hatch
For endpoints not yet covered by the SDK, use the genericrequest method:

