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.
curl -X GET https://api.sandbox.transferwise.tech/v1/simulation/transfers/{{transferId}}/processing \-H 'Authorization: Bearer <your api token>'
{"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.
curl -X POST https://api.sandbox.transferwise.tech/v1/simulation/verify-profile \-H 'Authorization: Bearer <your api token>'
No Content
Simulate a balance top-up
POST /v1/simulation/balance/topup
Simulates a top-up so that a balance can be used to fund transfers and/or card spend.
Fields | Type | Definition | Required |
---|---|---|---|
profileId | String | The profile ID linked to the balance account | Yes |
balanceId | String | The ID of the balance account that is going to receive the funds | Yes |
currency | String | The currency to top up the balance account in. Must be the same currency as the balance account | Yes |
amount | Float | The amount to top up the balance account with | Yes |
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.
Fields | Type | Definition |
---|---|---|
transactionId | String | The ID of the top up transaction |
state | String | The state of the transaction. COMPLETED is always returned when using this endpoint |
balancesAfter.id | String | The ID of the balance acount |
balancesAfter.value | Float | The new amount available in the balance account |
balancesAfter.currency | String | The currency of the balance account |
{"transactionId": 5,"state": "COMPLETED","balancesAfter": [{"id": 5,"value": 100.00,"currency": "EUR"}]}
Simulate a 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. 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.
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.
{"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 a card transaction clearing
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.
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.
{"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 a 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.
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.
{"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 a 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.
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.
{"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}