1. Overview
1.1 Prerequisites
Before starting the integration, ensure you have:- Provide your UQPAY account ID to enable the POS API feature
1.2 Integration Flow
2. Terminal Registration
Each POS terminal must be registered with UQPAY before processing transactions. This is a one time setup; you only need to register each terminal once.2.1 API Endpoint
2.2 Request Parameters
Supported Manufacturer Codes:
2.3 Request Example
2.4 Response
Note: Store the terminal_id securely. You will need it for all subsequent API calls.
3. PIN Key Management
To securely process PIN based transactions, you must obtain and manage PIN encryption keys.3.1 Generate AES Private Key
Before requesting a PIN key, generate an AES private key on your terminal or server:
Example AES Key (256 bit):
Important: Store this private key securely. You will use it to decrypt the encrypt_pin_key returned from the Get PIN Key API.
3.2 Request PIN Key
API Endpoint:
Request Example:
3.3 Decrypt PIN Key
Use your AES private key to decrypt theencrypt_pin_key and obtain the actual PINKEY.
Decryption Parameters:
Example:
- encrypt_pin_key:
LASDho1ILHoYRf/5YEyIgieoc+SXJkUsHZElXOMNGv7WnC3fZzFPYDH8mJaDbnwvom3QEtdv3NjvaEUtVeetWdQsv2RtQw4XEYh/Cg== - actual PINKEY:
26e1734e4d52b905e74574b7bf0897daeec7e217c61b3ac0
See Appendix for decryption code samples.
3.4 Key Expiration
Monitor thepin_key_expire timestamp and refresh the PIN key before expiration. Request a new PIN key using the same process when needed.
4. PIN Block Encryption
When processing PIN based transactions, you must encrypt the cardholder PIN into a PIN block.4.1 Overview
The PIN block is created by combining:- Card PAN (Primary Account Number)
- Cardholder PIN
- PINKEY
4.2 Example
Input:
Output:
See Appendix for PIN block encryption code samples.
5. Create Payment Intent
After setting up your terminal and obtaining the PINKEY, you can process card present transactions.5.1 API Endpoint
5.2 Request Example
Use thecard_present payment method type for POS transactions. Key fields to note:
terminal_id: Set to the TID received from terminal registrationencrypted_pin: Set to the PINBLOCK generated from PIN encryptionsystem_trace_audit_number: Must be unique for each new transaction (STAN)
5.3 Response Example
6. Error Handling
6.1 POS API Error Codes
7. Testing
7.1 Test Card
Use the following test card data in the sandbox environment:
Sample card_present object for testing:
Note: Remember to use a unique system_trace_audit_number for each test transaction.

