curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/card-transactions/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cardId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 100.5,
transactionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
originalAmount: 100.5,
originalCurrency: '<string>'
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/card-transactions/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/simulation/card-transactions/refund"
payload = {
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>"
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"originalCurrency": "USD",
"currency": "USD",
"merchant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"mccCode": "5411",
"mccCategory": "Grocery Stores",
"country": "US"
},
"fees": {
"atm": 100.5,
"fx": 100.5
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "AUTHORIZATION",
"originalAmount": 100.5,
"originalCurrency": "USD",
"amount": 100.5,
"fees": {
"atm": 100.5,
"fx": 100.5
},
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:05Z"
}
],
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:35:00Z",
"status": "PENDING",
"originalAmount": {
"authorized": 100.5,
"reversed": 100.5,
"current": 100.5
},
"amount": {
"authorized": 100.5,
"reversed": 100.5,
"current": 100.5
},
"conversionRate": 1
}{
"error": {
"code": "SIMULATION_INVALID_STATE",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CARD_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Simulate refund
Simulates a refund event. Pass transactionId to refund an existing CLEARED transaction, or omit to simulate an unrelated refund (e.g., tax refund).
curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/card-transactions/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cardId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 100.5,
transactionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
originalAmount: 100.5,
originalCurrency: '<string>'
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/card-transactions/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/simulation/card-transactions/refund"
payload = {
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>"
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"originalCurrency": "USD",
"currency": "USD",
"merchant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"mccCode": "5411",
"mccCategory": "Grocery Stores",
"country": "US"
},
"fees": {
"atm": 100.5,
"fx": 100.5
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "AUTHORIZATION",
"originalAmount": 100.5,
"originalCurrency": "USD",
"amount": 100.5,
"fees": {
"atm": 100.5,
"fx": 100.5
},
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:05Z"
}
],
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:35:00Z",
"status": "PENDING",
"originalAmount": {
"authorized": 100.5,
"reversed": 100.5,
"current": 100.5
},
"amount": {
"authorized": 100.5,
"reversed": 100.5,
"current": 100.5
},
"conversionRate": 1
}{
"error": {
"code": "SIMULATION_INVALID_STATE",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CARD_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Body
Simulate a refund event on a card
Card ID
Amount in the project's billing currency
x >= 0100.5
0
1234.99
Existing transaction ID to refund. Omit to simulate an unrelated refund (creates a new transaction).
Amount in the original transaction currency. Must be provided together with originalCurrency.
x >= 0100.5
0
1234.99
Original transaction currency as an ISO 4217 alpha code (e.g. EUR). Must be provided together with originalAmount.
^[A-Z]{3}$Response
Card transaction resource. The response shape varies by transaction status.
- Pending
- Cleared
- Declined
- Void
Authorized transaction that hasn't settled yet
Card transaction identifier
Account linked to the card
Card used for this transaction
Transaction channel
ATM, POS, ECOMMERCE, VISA_DIRECT "ATM"
Digital wallet used, or null if physical card
APPLE_PAY, GOOGLE_PAY, MERCHANT_TOKEN "APPLE_PAY"
Original transaction currency (merchant local currency)
"USD"
"HKD"
"EUR"
Card currency
"USD"
"HKD"
"EUR"
Merchant details
Show child attributes
Show child attributes
Net platform fees in the card currency (same aggregation legs as cardholder amount for PENDING/VOID/CLEARED; decline-event fees for DECLINED)
Show child attributes
Show child attributes
Chronologically sorted lifecycle events (oldest first). Provides the full audit trail of what happened to this transaction.
Show child attributes
Show child attributes
ISO 8601 timestamp of when the transaction was initiated
"2024-01-15T10:30:00Z"
ISO 8601 timestamp of creation
"2024-01-15T10:30:00Z"
ISO 8601 timestamp of last update
"2024-01-15T10:35:00Z"
"PENDING"Amount in the original transaction currency
Show child attributes
Show child attributes
Amount charged to the cardholder
Show child attributes
Show child attributes
Conversion rate from the original currency to the card currency
x >= 01
0.128205
7.812