Skip to main content
The UQPAY Node.js SDK provides typed access to the UQPAY API, including automatic authentication, pagination, retries, and webhook verification.

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 your clientId 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 the x-on-behalf-of header:

Idempotency

Every request includes an auto-generated UUID idempotency key. To provide your own:

Pagination

All list methods return a PaginatedResponse<T> with data, total_pages, and total_items:
Increment page_number until it reaches total_pages to paginate through all results.

Logging

Enable debug logging to see all requests and responses:
Sensitive fields (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 generic request method:

Platform info

If you are building a platform on top of UQPAY, attach your app info to the User-Agent header: