Test your integration

Once everything's been set-up, we also provide you with endpoints that allow you to simulate transactions on your card, providing you with data that you can use to better optimize your flows in production.

POST /v1/simulation/balance/topup

Simulates a top-up so that a balance can be used to fund transfers and/or card spend.

FieldsTypeDefinitionRequired
profileIdStringThe profile ID linked to the balance accountYes
balanceIdStringThe ID of the balance account that is going to receive the fundsYes
currencyStringThe currency to top up the balance account in. Must be the same currency as the balance accountYes
amountFloatThe amount to top up the balance account withYes
Example Request
curl -X POST https://api.sandbox.transferwise.tech/v1/simulation/balance/topup \
-H 'Authorization: Bearer <your api token>' \
-H 'Content-Type: application/json' \
-d '{
"profileId": 2,
"balanceId": 5,
"currency": "EUR",
"amount": 100
}'

Response

Returns a simulated response for a successful balance topup.

FieldsTypeDefinition
transactionIdStringThe ID of the top up transaction
stateStringThe state of the transaction. COMPLETED is always returned when using this endpoint
balancesAfter.idStringThe ID of the balance acount
balancesAfter.valueFloatThe new amount available in the balance account
balancesAfter.currencyStringThe currency of the balance account
Example Response
{
"transactionId": 5,
"state": "COMPLETED",
"balancesAfter": [
{
"id": 5,
"value": 100.00,
"currency": "EUR"
}
]
}

POST /v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/authorisation

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

The transactionType field is optional. You can either set it to CASH_WITHDRAWAL for ATM withdrawals or remove it for other card transactions.

The possible pos values are:

  • CHIP_AND_PIN
  • CONTACTLESS_CARD
  • E_COMMERCE
  • MAGNETIC_STRIPE
  • MINIMAL
  • MOBILE_WALLET

Any 4-digit number is accepted for the PIN as there are no PIN checks on the sandbox environment.

The CVV1, ICVV and CVV2 values should be "123", "456" and "789" respectively.

Example Request
curl -X POST 'https://api.sandbox.transferwise.tech/v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/authorisation' \
-H 'Authorization: Bearer <your api token>' \
-H 'Content-Type: application/json' \
-d '{
"pos": "CHIP_AND_PIN",
"transactionType": "CASH_WITHDRAWAL",
"amount": {
"value": 8.12
"currency": "EUR"
},
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"cardData": {
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123" ,
"icvv": "456",
"cvv2": "789"
}
}'

Response

Returns a simulated card authorisation.

Example Response
{
"reference": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
},
"error": null
}

POST /v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/clearing

Simulates a transaction clearing request in the sandbox environment. This is done after the authorization.

Example Request
curl -X POST 'https://api.sandbox.transferwise.tech/v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/clearing' \
-H 'Authorization: Bearer <your api token>' \
-H 'Content-Type: application/json' \
-d '{
"amount": {
"value": 8.12
"currency": "EUR"
},
"ref": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
}
}'

Response

Returns a simluated card authorisation, after the funds have been cleared.

Example Response
{
"reference": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
},
"error": null
}

POST /v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/reversal

Simulates a transaction reversal request in the sandbox environment.

For full reversal simulation, the amount value should be 0.

Example Request
curl -X POST 'https://api.sandbox.transferwise.tech/v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/reversal' \
-H 'Authorization: Bearer <your api token>' \
-H 'Content-Type: application/json' \
-d '{
"amount": {
"value": 8.12
"currency": "EUR"
},
"ref": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0100",
"authorizationIdResponse": "123646"
}
}'

Response

Returns a simluated card reversal, while the funds are not yet cleared.

Example Response
{
"reference": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0420",
"authorizationIdResponse": ""
},
"error": null
}

POST /v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/reversal-post-clearing

Simulates a transaction reversal request for post-clearing transactions in the sandbox environment.

Example Request
curl -X POST 'https://api.sandbox.transferwise.tech/v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/reversal-post-clearing' \
-H 'Authorization: Bearer <your api token>' \
-H 'Content-Type: application/json' \
-d '{
"amount": {
"value": 0.00
"currency": "EUR"
},
"ref": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0220",
"authorizationIdResponse": "123646"
}
}'

Response

Returns a simluated card reversal, after the funds have been cleared.

Example Response
{
"reference": {
"transaction": {
"acquirer": {
"institutionId": "430001",
"name": "Test ATM withdrawal",
"city": "Rouen",
"merchantCategoryCode": 5999,
"country": "FR",
"acceptorTerminalId": "TERMID01",
"acceptorIdCode": "CARD ACCEPTOR",
"forwardingInstitutionId": "400050"
},
"card": {
"token": "9dbf5c07-c142-4986-aa8e-2c2def9f6874",
"schemeName": "VISA",
"pan": "4242424242424242",
"pin": "1234",
"cvv1": "123",
"icvv": "456",
"cvv2": "789",
"expiration": [
2027,
9
],
"sequenceNumber": 1,
"country": "AU",
"currencies": [
"AUD"
]
},
"pos": {
"type": "CHIP_AND_PIN",
"acceptsOnlinePins": true,
"maxPinLength": 12,
"supports3ds": false,
"hasChip": true
},
"transactionStartTime": 1667541087.047643305,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0420",
"authorizationIdResponse": ""
},
"error": null
}