GitHub
github.com/uqpay/uqpay-sdk-go/v2
The SDK requires Go 1.19 or later. v2.1.0 is the current stable release. Version v1.2.0 is its first release in the coordinated client release line.
Installation
Quick start
Before you begin, create a sandbox account and create API keys.Configuration
- Direct parameters
- Environment variables
- Custom endpoint
Sandbox:Production:
Authentication
The SDK manages UQPAY Access Tokens automatically:- Retrieves an Access Token using
clientIDandapiKey - Caches the Token until it nears expiry
- Retrieves a new Token before the current one expires
- Provides concurrency-safe Token management
Idempotency
Every API request automatically includes a unique idempotency key to ensure safe retries and prevent duplicate operations. You do not need to set this manually.Error handling
The SDK returns detailed error information including HTTP status codes and API error details:Authorization decision (PGP)
Authorization decisions let your endpoint approve or decline card transactions in real time. UQPAY sends a PGP-encrypted transaction to your endpoint; the SDK decrypts it, calls your decision function, and encrypts the response. Before implementing the handler, review the authorization decision workflow, enablement requirements, response codes, and timeout window. Generate an RSA-2048 key pair, exchange the public key with UQPAY, and keep the private key secure:API coverage
Stablecoin Account (Ramp) is not included in the current SDK product scope.
Resources
Use each product namespace.
Webhooks
Verify incoming webhook signatures.
Authorization decisions
Process PGP-encrypted card authorization requests.

