Simulation

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

Simulate transfer state change

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"
}

Simulate verification state change

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

Simulate balance top-up

POST /v1/simulation/balance/topup

Simulates a top-up so a balance can be used to fund transfers.

Request
profileIdnumber

User profile id

balanceIdnumber

Balance id

currencytext

Balance currency (should be the same currency as the balance)

amountnumber

Top up amount

Response
transactionIdnumber

Wise internal transaction ID. Created automatically.

statetext

State of the transaction. COMPLETED is always returned.

balancesAfter.idnumber

Balance account id (should be the same as the balanceId sent)

balancesAfter.valuenumber

Top up amount

balancesAfter.currencytext

Balance currency (should be the same currency as the balance)

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
}'
Example Response
{
"transactionId": 5,
"state": "COMPLETED",
"balancesAfter": [
{
"id": 5,
"value": 100.00,
"currency": "EUR"
}
]
}

Simulate card transaction authorization

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.

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

The PIN checks has been removed on the card transaction authorisation simulation API endpoint. Any 4-digit number is accepted for the PIN.

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"
}
}'
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
}

Simulate card transaction clearing

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

Simulates a transaction clearing request in the sandbox environment.

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"
}
}'
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
}

Simulate card transaction reversal

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"
}
}'
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
}

Simulate post-clearing card transaction reversal

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"
}
}'
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
}