Skip to main content
POST
Set or Reset Virtual Card PIN

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPay.

Headers

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

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.

Body

application/json
card_id
string<uuid>
required

Unique identifier for the card. Must be a Standard virtual card.

Example:

"630be6bd-2652-4faa-9f3d-2c51cee0b820"

type
enum<string>
required

The PIN operation to perform.

  • SET - Set the card's PIN for the first time. Rejected if the card already has a PIN.
  • RESET - Change the card's PIN. Requires old_pin.
Available options:
SET,
RESET
Example:

"SET"

pin
string
required

The new PIN for the card. Must be exactly 4 numeric digits.

Required string length: 4
Pattern: ^\d{4}$
Example:

"1234"

old_pin
string

The card's current PIN. Required when type is RESET and must match the PIN currently set on the card, otherwise the operation fails. Ignored when type is SET.

Required string length: 4
Pattern: ^\d{4}$
Example:

"5678"

Response

200 - application/json

PIN operation request accepted.

card_id
string
required

Unique identifier for the card.

Example:

"c0cef051-29c5-4796-b86a-cd5b684bfad7"

card_order_id
string
required

ID of the card order.

Example:

"c0cef051-29c5-4796-b86a-cd5ee34bfad7"

create_time
string
required

Create time at which the object was created.

Example:

"2024-03-21T17:17:32+08:00"