Create Quote
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch('https://sandboxapi.me-cash.com/v1/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "quote successfully created",
"status": "success",
"data": {
"id": "e5eec724-38f9-40e2-9i86-xxxxxxxxxxxxx",
"paymentChannel": "BANK_TRANSFER",
"source": {
"currency": "NGN",
"country": "NG",
"amount": 150000
},
"target": {
"currency": "USD",
"country": "US",
"amount": 81.97
},
"rate": 1830,
"fee": {
"amount": 0,
"stampDuty": 0
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "USD",
"appliedCountry": "US",
"transaction": {
"minimum": 1,
"maximum": 20000000000000
},
"invoice": 200000000000
}
],
"summary": {
"total": 150000
},
"settlementTime": "1 hr",
"settlement": "1 hr",
"quoteCurrency": "USD",
"expiresInSeconds": 600
}
}Quote
Create Quote
Creates a quote for a source and destination currency specified by a user.
POST
/
v1
/
quote
Create Quote
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch('https://sandboxapi.me-cash.com/v1/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "quote successfully created",
"status": "success",
"data": {
"id": "e5eec724-38f9-40e2-9i86-xxxxxxxxxxxxx",
"paymentChannel": "BANK_TRANSFER",
"source": {
"currency": "NGN",
"country": "NG",
"amount": 150000
},
"target": {
"currency": "USD",
"country": "US",
"amount": 81.97
},
"rate": 1830,
"fee": {
"amount": 0,
"stampDuty": 0
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "USD",
"appliedCountry": "US",
"transaction": {
"minimum": 1,
"maximum": 20000000000000
},
"invoice": 200000000000
}
],
"summary": {
"total": 150000
},
"settlementTime": "1 hr",
"settlement": "1 hr",
"quoteCurrency": "USD",
"expiresInSeconds": 600
}
}Error responses
| Status | Message | What it means | How to fix |
|---|---|---|---|
| 400 | Invalid country or currency ISO code | Source/target country or currency combination is unsupported. | Send ISO pairs for corridors enabled on your workspace. |
| 400 | Invalid Payment Channel, check docs or contact support | paymentChannel is not valid for the corridor. | Switch to a supported channel for the requested route. |
| 400 | Required field missing or invalid request | Payload is missing mandatory attributes. | Validate source, target, paymentChannel, and metadata before calling. |
| 400 | Minimum target amount for transaction is {minimum_transaction_amount} | Target amount is below the minimum allowed. | Increase the amount to at least the stated threshold. |
| 400 | Maximum target amount for transaction is {maximum_transaction_amount} | Target amount exceeds the allowed limit. | Reduce the amount to stay under the maximum. |
| 400 | Transaction target amount {transaction_amount} requires invoice | Amount requires invoice documentation. | Attach the relevant invoice and retry. |
| 401 | API key missing or incorrect | x-api-key header missing/invalid. | Include the correct API key for sandbox/production. |
| 403 | Quote route not available, contact support | Quote endpoint disabled in the current environment. | Reach out to support to enable the route. |
| 403 | Access denied: IP address not whitelisted | IP address has not been whitelisted. | Add your server IP in the dashboard. |
| 429 | API rate limit exceeded | Too many quote requests in a short window. | Implement exponential backoff before retrying. |
| 500 | Service temporarily unavailable | Temporary backend outage or maintenance. | Retry shortly and escalate if it continues. |
Authorizations
Body
application/json
Details for the new quote.
The channel through which the payment will be processed. For SWIFT transfers, use SWIFT_CUSTOMER (sender/customer bears all transfer charges), SWIFT_SHARED (charges split between sender and beneficiary), or SWIFT_BENEFICIARY (beneficiary bears all transfer charges).
Available options:
BANK_TRANSFER, INTERAC, SWIFT_CUSTOMER, SWIFT_SHARED, SWIFT_BENEFICIARY, MOBILE_MONEY Example:
"BANK_TRANSFER"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I

