curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/card-transactions/authorization \
--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>",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"merchant": {
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"country": "US",
"mccCode": "<string>",
"mccCategory": "<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>',
channel: 'ATM',
digitalWallet: 'APPLE_PAY',
merchant: {
name: '<string>',
city: '<string>',
postCode: '<string>',
state: '<string>',
country: 'US',
mccCode: '<string>',
mccCategory: '<string>'
}
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/card-transactions/authorization', 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/authorization"
payload = {
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"merchant": {
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"country": "US",
"mccCode": "<string>",
"mccCategory": "<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": {}
}
}{
"error": {
"code": "SIMULATION_IN_PROGRESS",
"message": "<string>",
"detail": {}
}
}Simulate authorization
Simulates a card authorization event. Creates a new PENDING transaction, or performs incremental authorization on an existing one. Checks the account balance and returns 400 if insufficient funds.
curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/card-transactions/authorization \
--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>",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"merchant": {
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"country": "US",
"mccCode": "<string>",
"mccCategory": "<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>',
channel: 'ATM',
digitalWallet: 'APPLE_PAY',
merchant: {
name: '<string>',
city: '<string>',
postCode: '<string>',
state: '<string>',
country: 'US',
mccCode: '<string>',
mccCategory: '<string>'
}
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/card-transactions/authorization', 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/authorization"
payload = {
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 100.5,
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalAmount": 100.5,
"originalCurrency": "<string>",
"channel": "ATM",
"digitalWallet": "APPLE_PAY",
"merchant": {
"name": "<string>",
"city": "<string>",
"postCode": "<string>",
"state": "<string>",
"country": "US",
"mccCode": "<string>",
"mccCategory": "<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": {}
}
}{
"error": {
"code": "SIMULATION_IN_PROGRESS",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Body
Simulate an authorization event on a card
Card ID
Amount in the project's billing currency
x >= 0100.5
0
1234.99
Existing transaction ID for incremental authorization. Omit to create 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}$Transaction channel. Randomly generated if omitted.
ATM, POS, ECOMMERCE, VISA_DIRECT "ATM"
Digital wallet type (e.g. APPLE_PAY, GOOGLE_PAY). Randomly generated if omitted.
APPLE_PAY, GOOGLE_PAY, MERCHANT_TOKEN "APPLE_PAY"
Merchant details. All fields are optional and will be randomly generated if omitted.
Show child attributes
Show child attributes
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