Skip to main content
POST
/
v2
/
terminal
/
getPinKey
Get PIN Key
curl --request POST \
  --url https://api-sandbox.uqpaytech.com/api/v2/terminal/getPinKey \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --header 'x-client-id: <x-client-id>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "terminal_id": "10000005",
  "prv_key": "cxwbHl6... "
}
'
{
  "encrypt_pin_key": "4usf0C0PfalJuUMJ5CqyD7T+4l4r463G61hTwRqbQyZlH+/YANcQ4iH7akqSGvGdxVbvZOvGMaYRBZzKZmlR3hgXxDaQwfqeGtPkZg==",
  "pin_key_expire": "2025-12-04T18:18:27.797116587+08:00",
  "terminal_id": "10000005"
}

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPay.

Headers

x-client-id
string
required

The API client id generated by UQPAY

x-idempotency-key
string<uuid>
required

A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.

x-on-behalf-of
string

Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.

Body

application/json
terminal_id
string
required

UQPAY terminal device ID

Example:

"10000005"

prv_key
string
required

AES key used for decrypting the response PIN key.

Maximum string length: 64
Example:

"cxwbHl6... "

Response

PIN key retrieved successfully

encrypt_pin_key
string
required

Encrypted PIN key. Decrypt using the provided prv_key.

Example:

"4usf0C0PfalJuUMJ5CqyD7T+4l4r463G61hTwRqbQyZlH+/YANcQ4iH7akqSGvGdxVbvZOvGMaYRBZzKZmlR3hgXxDaQwfqeGtPkZg=="

pin_key_expire
string<date-time>
required

Expiration time of the PIN key.

Example:

"2025-12-04T18:18:27.797116587+08:00"

terminal_id
string
required

The terminal ID.

Example:

"10000005"