v1

latestOpenAPI 3.0.22026-07-26123510445.2 KB
Terminal Management

Get PIN Key

Retrieve the PIN encryption key for a registered terminal device.

post/v2/terminal/getPinKey

Headers

x-client-idstring required

The API client id generated by UQPAY

x-idempotency-keystring uuid

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-ofstring

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 API. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.

Request body

terminal_idstring required

UQPAY terminal device ID

prv_keystring required

AES key used for decrypting the response PIN key.

Example request

{
  "terminal_id": "10000005",
  "prv_key": "cxwbHl6... "
}

Response

PIN key retrieved successfully

encrypt_pin_keystring required

Encrypted PIN key. Decrypt using the provided prv_key.

pin_key_expirestring date-time required

Expiration time of the PIN key.

terminal_idstring required

The terminal ID.

Example response

{
  "encrypt_pin_key": "4usf0C0PfalJuUMJ5CqyD7T+4l4r463G61hTwRqbQyZlH+/YANcQ4iH7akqSGvGdxVbvZOvGMaYRBZzKZmlR3hgXxDaQwfqeGtPkZg==",
  "pin_key_expire": "2025-12-04T18:18:27.797116587+08:00",
  "terminal_id": "10000005"
}