Skip to main content
The UQPAY Java SDK provides typed access to the UQPAY API, including automatic OAuth2 authentication, webhook verification, PGP-based authorization decision, and a sandbox simulator.

GitHub

com.uqpay.sdk:uqpay-sdk-java
The SDK requires Java 11 or higher, with Maven 3.6+ or Gradle 7+.

Installation

Quick start

Authentication

The SDK handles OAuth2 authentication automatically. It fetches an access token using your clientId and apiKey, caches it, and refreshes it before expiry. You do not need to manage tokens manually.

Configuration

Custom HTTP client

Environments

Pagination

All list methods return a paginated response with getData(), getTotalPages(), and getTotalItems():

Webhooks

Verify incoming webhook signatures from UQPAY:
The verifier checks the HMAC-SHA512 signature and rejects requests with a timestamp older than 300 seconds by default.

Authorization decision (PGP)

Handle real-time card transaction authorization decisions. UQPAY sends PGP-encrypted transactions to your endpoint; the SDK decrypts them, calls your handler, and returns an encrypted response.

Error handling

The SDK uses a hierarchy of exceptions: