Skip to main content
POST
/
v1
/
simulation
/
issuing
/
authorization
Simulate Authorization
curl --request POST \
  --url https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/authorization \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
  "transaction_amount": 10,
  "transaction_currency": "USD",
  "merchant_name": "Orchard Central",
  "merchant_category_code": 5734
}
'
{
  "card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
  "card_number": "************5668",
  "cardholder_id": "7c4ff2cd-1bf6-4aaa-bf16-266771425011",
  "transaction_id": "5135e6cc-28b6-4889-81dc-3b86a09e1395",
  "transaction_type": "AUTHORIZATION",
  "card_available_balance": 2506.26,
  "authorization_code": 856268,
  "billing_amount": 70.25,
  "billing_currency": "SGD",
  "transaction_amount": 100.25,
  "transaction_currency": "USD",
  "transaction_time": "2024-03-21T17:17:32+08:00",
  "failure_reason": "1107 - Invalid CVV2",
  "transaction_status": "DECLINED",
  "posted_time": "2024-03-21T17:17:32+08:00",
  "merchant_data": {
    "name": "Orchard Central",
    "category_code": 5734,
    "city": "Singapore",
    "country": "Singapore"
  }
}

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPay.

Headers

x-on-behalf-of
string

The value set to the connected account's ID. 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
required

Unique identifier for the card.

Example:

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

transaction_amount
number
required

The transaction amount to simulate.

Example:

10

transaction_currency
string
required

Currency of the transaction.

Example:

"USD"

merchant_name
string
required

Name of the merchant

Example:

"Orchard Central"

merchant_category_code
string
required

The merchant category code for the merchant’s business. Can only be 5734.

Example:

5734

Response

Authorization simulated successfully.

card_id
string
required

Unique identifier for the card.

Example:

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

card_number
string
required

Masked card number

Example:

"************5668"

cardholder_id
string<uuid>
required

The cardholder’s unique identifier.

Example:

"7c4ff2cd-1bf6-4aaa-bf16-266771425011"

transaction_id
string<uuid>
required

Unique Identifier for transaction

Example:

"5135e6cc-28b6-4889-81dc-3b86a09e1395"

transaction_type
enum<string>
required

Transaction Type - one of AUTHORIZATION, REFUND, REVERSAL. This field is mandatory and must be one of:

  • AUTHORIZATION - Funds reserved due to card usage.
  • REFUND - Refunding the purchase amount back to account balance.
  • REVERSAL - Reversing an authorization.
Available options:
AUTHORIZATION,
REFUND,
REVERSAL
Example:

"AUTHORIZATION"

card_available_balance
number
required

The card available balance.

Example:

2506.26

authorization_code
string
required

Authorization Code

Example:

856268

billing_amount
number
required

Billing amount

Example:

70.25

billing_currency
string
required

Billing Currency

Example:

"SGD"

transaction_amount
number
required

Transaction amount

Example:

100.25

transaction_currency
string
required

Transaction currency

Example:

"USD"

transaction_time
string
required

Transaction occurrence time

Example:

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

failure_reason
string
required

Reason for transaction failure.

Example:

"1107 - Invalid CVV2"

transaction_status
enum<string>
required

The high-level status indicating the stage of the transaction lifecycle.

Available options:
APPROVED,
DECLINED
Example:

"DECLINED"

posted_time
string

Transaction posted time

Example:

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

merchant_data
object

Details about the merchant (grocery store, e-commerce website, etc.) involved in this transaction.