Simulate card transactions in sandbox environment
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.
Fund a balance to use for card spend.
- Production Environmenthttps://api.wise.com/v1/simulation/balance/topup
- Sandbox Environmenthttps://api.wise-sandbox.com/v1/simulation/balance/topup
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.wise.com/v1/simulation/balance/topup \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"profileId": 2,
"balanceId": 5,
"currency": "EUR",
"amount": 100,
"channel": "TRANSFER"
}'For request/response details, see the API reference.
Simulate POS purchases, e-commerce transactions, ATM withdrawals, and refund authorisations.
- Production Environmenthttps://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation
- Sandbox Environmenthttps://api.wise-sandbox.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- POS purchase
- E-commerce purchase
- ATM withdrawal
- Refund
curl -i -X POST \
'https://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"pos": "CHIP_AND_PIN",
"transactionType": "GOODS_AND_SERVICES",
"amount": {
"value": 10,
"currency": "SGD"
},
"mcc": 5499,
"cardNumber": "4242424242424242"
}'For request/response details, see the API reference.
Clear a previous authorisation. The ref field can be copied from the reference object in the authorisation response.
- Production Environmenthttps://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
- Sandbox Environmenthttps://api.wise-sandbox.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"amount": {
"value": 10,
"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.0476434,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
}
}'For request/response details, see the API reference.
Fully or partially reverse an authorisation.
- Production Environmenthttps://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/reversal
- Sandbox Environmenthttps://api.wise-sandbox.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/reversal
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/reversal' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"amount": {
"value": 3,
"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.0476434,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
}
}'For request/response details, see the API reference.
A refund is a 2-step process: first authorise with transactionType set to REFUND, then clear using the clearing endpoint with the same transaction type.
- Production Environmenthttps://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation
- Sandbox Environmenthttps://api.wise-sandbox.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/authorisation' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"pos": "CHIP_AND_PIN",
"transactionType": "REFUND",
"amount": {
"value": 10,
"currency": "SGD"
},
"mcc": 5499,
"cardNumber": "4242424242424242"
}'- Production Environmenthttps://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
- Sandbox Environmenthttps://api.wise-sandbox.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
-d '{
"amount": {
"value": 10,
"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.0476434,
"stan": "363054",
"schemeTransactionId": "932290252416153",
"retrievalReferenceNum": "230805363054"
},
"requestMti": "0200",
"authorizationIdResponse": "123646"
}
}'For request/response details, see the authorisation and clearing API references.
Retrieve recent simulated transactions for a card.
- Production Environmenthttps://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions
- Sandbox Environmenthttps://api.wise-sandbox.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.wise.com/v2/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions?limit=10' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479'For request/response details, see the API reference.