Simulation

You can simulate payment processing by changing transfer statuses using these endpoints.

These features are limited to sandbox only.
Simulation doesn't work with email transfers.
You need to fund transfer before calling simulation endpoints. Calling of processing is required even after the funding call transfer state has changed to processing automatically.
While transfer state simulation calls will respond with 200 in real time, the process internally is asynchronous. Please ensure you give at least 5 seconds in between simulation calls

GET /v1/simulation/transfers/{{transferId}}/processing

Changes transfer status from incoming_payment_waiting to processing.

GET /v1/simulation/transfers/{{transferId}}/funds_converted

Changes transfer status from processing to funds_converted.

GET /v1/simulation/transfers/{{transferId}}/outgoing_payment_sent

Changes transfer status from funds_converted to outgoing_payment_sent.

GET /v1/simulation/transfers/{{transferId}}/bounced_back

Changes transfer status from outgoing_payment_sent to bounced_back.

GET /v1/simulation/transfers/{{transferId}}/funds_refunded

Changes transfer status from bounced_back to funds_refunded.

GET /v1/simulation/transfers/{{transferId}}/webhook_refund

Triggers a webhook refund for the transfer (requires previous custom configuration on both ends, please contact support for more info). You only need to use this state if you are using a webhook based refund solution, which not all integrations require.

Response

Transfer entity with changed status.

Example Request
curl -X GET https://api.sandbox.transferwise.tech/v1/simulation/transfers/{{transferId}}/processing \
-H 'Authorization: Bearer <your api token>'
Example Response
{
"id": 15574445,
"user": 294205,
"targetAccount": 7993919,
"sourceAccount": null,
"quote": 113379,
"status": "processing",
"reference": "good times",
"rate": 1.2151,
"created": "2017-03-14 15:25:51",
"business": null,
"transferRequest": null,
"details": {
"reference": "good times"
},
"hasActiveIssues": false,
"sourceValue": 1000,
"sourceCurrency": "EUR",
"targetValue": 895.32,
"targetCurrency": "GPB"
}

POST /v1/simulation/verify-profile

This endpoint verifies the user's profiles. The webhook event profiles#verification-state-change will be triggered which can help to test the integration.

Having a verified user is a requirement for MCA setup, otherwise account details will not be issued.

Request

Verify all user profiles. It also triggers the notification webhook.

Use the user api token in the request. The profiles will be fetched based on the token's authentication details.

Response

No content is returned with a 200 response code.

Example Request
curl -X POST https://api.sandbox.transferwise.tech/v1/simulation/verify-profile \
-H 'Authorization: Bearer <your api token>'
Example Response - 200
No Content

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
}