Simulates a transaction clearing request in the sandbox environment. This is done after the authorisation. The ref field can be copied from the reference object in the authorisation response.
To clear a previous authorisation, the ref details must match the previous authorisation request. The amount does not have to match the previous authorisation request, it can be more or less than the authorisation request amount.
Clearing simulation doesn't work with Mastercard.
A refund is a 2-step process: first authorise with transactionType set to REFUND, then clear using this endpoint with the same transaction type.
Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more.
- Production Environmenthttps://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
- Sandbox Environmenthttps://api.wise-sandbox.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
curl -i -X POST \
'https://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"amount": {
"value": 10,
"currency": "SGD"
},
"transactionType": "GOODS_AND_SERVICES",
"ref": {
"transaction": {
"acquirer": {
"institutionId": "430010",
"name": "ACQUIRER NAME",
"city": "CITY NAME",
"merchantCategoryCode": 5499,
"country": "GB",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "59123122-223d-45f9-b840-0ad4a4f80937",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2029,
7
],
"sequenceNumber": 1,
"profileId": 2,
"userId": 5,
"cardStatus": "ACTIVE",
"country": "SG",
"currencies": [
"SGD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.0476434,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
}
}'Simulated transaction clearing result.
Echoed back when X-External-Correlation-Id was included in the request. Learn more.
{ "reference": { "transaction": { "acquirer": { … }, "card": { … }, "pos": { … }, "transactionStartTime": 1667541087.0476434, "stan": "363054", "schemeTransactionId": "932290252416153", "retrievalReferenceNum": "230805363054" }, "requestMti": "0200", "authorizationIdResponse": "123646" }, "error": null }