Skip to main content
Authorization decision lets you approve or decline card transactions in real time. UQPAY sends a PGP-encrypted transaction payload to your endpoint. You decrypt it, make a decision, and return an encrypted response. The SDK handles all PGP encryption and decryption. You only write the business logic.

Generate a PGP key pair

Generate a key pair and send the public key to UQPAY. Store the private key securely.

Configure PGP keys

After creating the client, configure the PGP keys once. You can pass file paths (.asc, .pgp, .gpg) or armored key strings:

Create the handler

Use createHandler to build an Express-compatible request handler. You only need to implement the decide callback:
The SDK automatically injects transaction_id into the response and handles all PGP encryption and decryption.

How it works