Skip to content

Simulate a card transaction authorisation

Request

Simulates a card transaction authorisation request in the sandbox environment. It can simulate ATM withdrawals, POS purchases, e-commerce transactions, and refunds. This is an authorisation hold, where funds are held, but not yet captured by the acquirer.

The cardNumber represents the 16-digit Primary Account Number (PAN) of the card, and must be a valid PAN retrieved from sensitive card details. Please follow the detailed guide on retrieving sensitive card details.

Refund

A refund is a 2-step process: first authorise with transactionType set to REFUND, then clear using the clearing endpoint with the same transaction type.

Refund simulation doesn't work with Mastercard.

Security
UserToken
Path
profileIdinteger, (int64)required

The profile ID.

cardTokenstring, (uuid)required

The card token.

Headers
X-External-Correlation-Idstring, (uuid), <= 36 characters

Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more.

Example:f47ac10b-58cc-4372-a567-0e02b2c3d479
Bodyapplication/jsonrequired
posstring

The point-of-sale used for the transaction.

  • For POS transactions: CHIP_AND_PIN
  • For e-commerce transactions: E_COMMERCE_NO_3DS
  • For ATM transactions: CHIP_AND_PIN
  • For refund transactions: CHIP_AND_PIN or E_COMMERCE_NO_3DS
transactionTypestring

The type of the transaction.

  • For POS and e-commerce transactions: GOODS_AND_SERVICES
  • For ATM transactions: CASH_WITHDRAWAL
  • For refund transactions: REFUND
amountobject
mccinteger, (int32)

Merchant category code.

cardNumberstring

Primary Account Number of the card.

curl -i -X POST \
  'https://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
  -d '{
    "pos": "CHIP_AND_PIN",
    "transactionType": "GOODS_AND_SERVICES",
    "amount": {
      "value": 10,
      "currency": "SGD"
    },
    "mcc": 5499,
    "cardNumber": "4242424242424242"
  }'

Responses

Simulated card authorisation.

Headers
X-External-Correlation-Idstring, (uuid), <= 36 characters

Echoed back when X-External-Correlation-Id was included in the request. Learn more.

Example:"f47ac10b-58cc-4372-a567-0e02b2c3d479"
x-trace-idstring

Unique trace identifier assigned by Wise. Useful when contacting support about a specific request.

Example:"fba501b6d453b96789f52338f019341f"
Bodyapplication/json
referenceobject

The transaction reference. This can be used in a following request for reversal and clearing.

errorstring or null

An error returned by the transaction, if it exists.

Response
{ "reference": { "transaction": { "acquirer": {}, "card": {}, "pos": {}, "transactionStartTime": 1667541087.0476434, "stan": "363054", "schemeTransactionId": "932290252416153", "retrievalReferenceNum": "230805363054" }, "requestMti": "0200", "authorizationIdResponse": "123646" }, "error": null }