Simulation
You can simulate payment processing by changing transfer statuses using these endpoints.
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. Please refer to our regional guides for any special regional requirements when simulating payments.
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. Please note that this simulation will not trigger a refund webhook.
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"}
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
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"}]}
POST /v2/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/authorisation
Simulates a card transaction authorisation request in the sandbox environment. It can simulate ATM withdrawals, purchasing and ECOM transactions. This is an authorisation hold, where funds are held, but not yet captured by the acquirer.
View Request for Transaction Type:
Response
Returns a simulated card authorisation.
The transaction reference. This can be used in a following request for Reversal and Clearing
An error returned by the transaction, if it exists
{"reference": {"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.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 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.
Transaction amount
Currency code
The type of the transaction. Use the same transaction type from the previous Authorisation request
The transaction reference. This can be obtained from a previous Authorisation 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": 10.00"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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"}}'
Response
Simulates a transaction clearing request in the sandbox environment. This is done after the authorisation.
The transaction reference
An error returned by the transaction, if it exists
{"reference": {"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.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. The amount.value
field can be set to 0 for a full reversal, or a positive value that represents the intended final value of the transaction after a partial reversal.
For example, if a transaction value was originally 10 SGD, and the intended final value is 3 SGD, amount.value
should be set to 3. This means there is a partial refund of 7 SGD.
Transaction amount
Currency code
The type of the transaction. Use the same transaction type from the previous Authorisation request
The transaction reference. This can be obtained from a previous Authorisation 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": 3.00"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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"}}'
Response
Returns a simluated card reversal, while the funds are not yet cleared.
The transaction reference
An error returned by the transaction, if it exists
{"reference": {"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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"}"error": null}
POST /v2/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/authorisation
Simulates a transaction refund request in the sandbox environment. A refund is a 2-step process which involves authorisation and clearing.
The point-of-sale used for the transaction. For refund transactions, use CHIP_AND_PIN
or E_COMMERCE_NO_3DS
The type of the transaction. For refund transactions, use REFUND
Transaction amount
Currency
Merchant category code
Primary Account Number of the card
curl -X POST 'https://api.sandbox.transferwise.tech/v2/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/authorisation' \-H 'Content-Type: application/json' \-H 'Authorization: Bearer <your api token>' \-d '{"pos": "CHIP_AND_PIN","transactionType": "REFUND","amount": {"value": 10,"currency": "SGD"},"mcc": 5499,"cardNumber": "4242424242424242"}'
Response
Returns a simulated card authorisation.
The transaction reference. This can be used in a following request for Reversal and Clearing
An error returned by the transaction, if it exists
{"reference": {"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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"},"error": null}
A refund transaction can be cleared after the initial authorisation request has been made.
POST /v1/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions/clearing
Simulates a transaction clearing request in the sandbox environment. The ref
field can be copied from the reference
object in the authorisation response. In the clearing request, the transactionType
must be set to REFUND
.
To clear a previous authorisation, the ref
details must match the previous authorisation request. It may take a few seconds for the transaction status to be updated.
Transaction amount
Currency code
The type of the transaction. For refund transactions, use REFUND
The transaction reference. This can be obtained from a previous Authorisation 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": 10.00"currency": "SGD"},"transactionType": "REFUND","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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"}}'
Response
Returns a simluated card authorisation, after the funds have been cleared.
The transaction reference
An error returned by the transaction, if it exists
{"reference": {"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.047643305,"stan": "363054","schemeTransactionId": "932290252416153","retrievalReferenceNum": "230805363054"},"requestMti": "0200","authorizationIdResponse": "123646"}"error": null}
GET /v2/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transaction?limit=10
Request
The maximum number of transactions to return. The default value is 10.
curl -X GET 'https://api.sandbox.transferwise.tech/v2/simulation/spend/profiles/{{profileId}}/cards/{{cardToken}}/transactions?limit=10' \-H 'Authorization: Bearer <your api token>'
Response
Returns a list of transactions, in descending order of creation time. To retrieve more details of a transaction, use the get card transaction by ID endpoint.
ID of the transaction
Time when the card transaction was created
[{"transactionId": 5028,"creationTime": 1723600773.748887000},{"transactionId": 5027,"creationTime": 1723600659.095692000},{"transactionId": 5026,"creationTime": 1723600648.133955000},{"transactionId": 5025,"creationTime": 1723545470.449374000},{"transactionId": 5024,"creationTime": 1723545430.790566000},{"transactionId": 5023,"creationTime": 1723545400.717954000},{"transactionId": 5022,"creationTime": 1723538943.303342000},{"transactionId": 5021,"creationTime": 1723538794.965883000},{"transactionId": 5020,"creationTime": 1723538784.678004000},{"transactionId": 5019,"creationTime": 1723538626.199095000}]