Skip to main content
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, country: 'NG', currency: 'NGN'},
    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",
"source": {
"currency": "NGN",
"country": "NG",
"amount": 150000
},
"target": {
"currency": "USD",
"country": "US",
"amount": 81.97
},
"rate": 1830,
"fee": {
"amount": 0
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "USD",
"appliedCountry": "US",
"transaction": {
"minimum": 1,
"maximum": 20000000000000
},
"invoice": 200000000000
}
],
"summary": {
"total": 150000
},
"settlementTime": "1 hr",
"quoteCurrency": "USD",
"expiresInSeconds": 600
}
}

Error responses

StatusMessageWhat it meansHow to fix
400Invalid country or currency ISO codeSource/target country or currency combination is unsupported.Send ISO pairs for corridors enabled on your workspace.
400Invalid Payment Channel, check docs or contact supportpaymentChannel is not valid for the corridor.Switch to a supported channel for the requested route.
400Required field missing or invalid requestPayload is missing mandatory attributes.Validate source, target, paymentChannel, and metadata before calling.
400Minimum target amount for transaction is {minimum_transaction_amount}Target amount is below the minimum allowed.Increase the amount to at least the stated threshold.
400Maximum target amount for transaction is {maximum_transaction_amount}Target amount exceeds the allowed limit.Reduce the amount to stay under the maximum.
400Transaction target amount {transaction_amount} requires invoiceAmount requires invoice documentation.Attach the relevant invoice and retry.
401API key missing or incorrectx-api-key header missing/invalid.Include the correct API key for sandbox/production.
403Quote route not available, contact supportQuote endpoint disabled in the current environment.Reach out to support to enable the route.
403Access denied: IP address not whitelistedIP address has not been whitelisted.Add your server IP in the dashboard.
429API rate limit exceededToo many quote requests in a short window.Implement exponential backoff before retrying.
500Service temporarily unavailableTemporary backend outage or maintenance.Retry shortly and escalate if it continues.

Authorizations

x-api-key
string
header
required

Body

application/json

Details for the new quote.

paymentChannel
enum<string>
required

The channel through which the payment will be processed.

Available options:
BANK_TRANSFER,
INTERAC,
SWIFT
Example:

"BANK_TRANSFER"

source
object
required
target
object
required

Response

Quote created successfully.

message
string
Example:

"quote successfully created"

status
string
Example:

"success"

data
object