Simulate a fiat deposit
curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/fiat-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"amount": 100.5,
"currency": "<string>",
"senderName": "MOON INC LIMITED",
"reference": "INV-2024-0142"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100.5,
currency: '<string>',
senderName: 'MOON INC LIMITED',
reference: 'INV-2024-0142'
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/fiat-deposits', 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/fiat-deposits"
payload = {
"amount": 100.5,
"currency": "<string>",
"senderName": "MOON INC LIMITED",
"reference": "INV-2024-0142"
}
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",
"transactionId": "20240115HKHHXXXX000123456",
"status": "SETTLED",
"amount": 100.5,
"currency": "USD",
"originalAmount": 100.5,
"originalCurrency": "USD",
"senderName": "COMPANY LIMITED",
"reference": "INV-2024-0142",
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:35:00Z"
}{
"error": {
"code": "SIMULATION_INVALID_STATE",
"message": "<string>",
"detail": {}
}
}Simulation
Simulate a fiat deposit
Simulates a bank transfer credited to the project’s master collateral account. The deposit is recorded as already settled, the master balance is credited, and FIAT_DEPOSIT_CREATED is delivered, matching what a reconciled transfer does in production. Only available to Program-Funded projects, which are the ones that have a master collateral account. currency must be one the project accepts top-ups in, which is the project’s billing currency. Each simulated transfer is capped, so test with realistic amounts; a larger one is rejected with SIMULATION_AMOUNT_LIMIT_EXCEEDED, whose detail names the maximum.
POST
/
simulation
/
fiat-deposits
Simulate a fiat deposit
curl --request POST \
--url https://sg.sandbox.api.reap.global/simulation/fiat-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"amount": 100.5,
"currency": "<string>",
"senderName": "MOON INC LIMITED",
"reference": "INV-2024-0142"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100.5,
currency: '<string>',
senderName: 'MOON INC LIMITED',
reference: 'INV-2024-0142'
})
};
fetch('https://sg.sandbox.api.reap.global/simulation/fiat-deposits', 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/fiat-deposits"
payload = {
"amount": 100.5,
"currency": "<string>",
"senderName": "MOON INC LIMITED",
"reference": "INV-2024-0142"
}
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",
"transactionId": "20240115HKHHXXXX000123456",
"status": "SETTLED",
"amount": 100.5,
"currency": "USD",
"originalAmount": 100.5,
"originalCurrency": "USD",
"senderName": "COMPANY LIMITED",
"reference": "INV-2024-0142",
"occurredAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:35:00Z"
}{
"error": {
"code": "SIMULATION_INVALID_STATE",
"message": "<string>",
"detail": {}
}
}Required scope: CARDS_SIMULATE
Headers
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Simulate a bank transfer credited to the project's master collateral account
Response
Response for status 200