Skip to main content
The UQPAY Java SDK provides typed access to the UQPAY API, including automatic Access Token management, webhook verification, PGP-based authorization decision, and sandbox transaction simulation.

GitHub

GitHub Releases
The SDK requires Java 11 or later, with Maven 3.6+ or Gradle 7+. Version 1.2.0 is its first release in the coordinated client release line.

Installation

The Java SDK is distributed as a thin JAR through GitHub Releases. It is not published to Maven Central, so com.uqpay.sdk:uqpay-sdk-java:2.1.0 cannot be resolved from a public Maven repository. Download uqpay-sdk-java-2.1.0.jar from the v2.1.0 release and install it into your local Maven repository:
You can then reference the locally installed artifact from Maven or Gradle. Because this is a thin JAR, your project must also declare the runtime dependencies listed in the SDK repository’s pom.xml, including Jackson, OkHttp, and Bouncy Castle.

Quick start

Before you begin, create a sandbox account and create API keys.

Authentication

The SDK uses your clientId and apiKey to retrieve a UQPAY Access Token, caches it, and retrieves a new Token before the current one expires. 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: Before implementing verification, configure a notification URL and review the webhook delivery and security model.
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. Before implementing the handler, review the authorization decision workflow, prerequisites, response codes, and timeout requirements.
Stablecoin Account (Ramp) is not included in the current SDK product scope.

Error handling

The SDK uses a hierarchy of exceptions: