Skip to main content
POST
/
cards
/
simulate-authorization
Simulate Authorization
curl --request POST \
  --url https://access.utgl.io/v1/cards/simulate-authorization \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cardAccountId": "c8e2752d-6bd7-4244-a9f6-580f5640eaeb",
  "cardId": "8188d920-2c17-4aba-aa24-6a25f8c12ddb",
  "amount": 100,
  "currency": "HKD",
  "opts": {
    "countryCode": 344,
    "purchaseAmount": 100,
    "purchaseCurrency": "HKD",
    "actionType": "PURCHASE",
    "transactionType": "PURCHASE"
  }
}
'
{
  "cardTransactionId": "8188d920-2c17-4aba-aa24-6a25f8c12ddb"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
cardAccountId
string
required

The cardAccountId field specifies the card account containing the card

Example:

"c8e2752d-6bd7-4244-a9f6-580f5640eaeb"

cardId
string
required

The cardId field specifies the card to simulate authorization on

Example:

"8188d920-2c17-4aba-aa24-6a25f8c12ddb"

amount
number
required

The amount to authorize on the card in currency

Example:

100

currency
enum<string>
required

Currency of simulated. Must be a valid ISO 4217 currency code. Currently only HKD, USD, EUR are supported.

Available options:
HKD,
USD,
EUR
Required string length: 3
opts
object

options

Response

200 - application/json

OK

cardTransactionId
string

The ID of the simulated card transaction

Example:

"8188d920-2c17-4aba-aa24-6a25f8c12ddb"