The meCash Docs is live 🎉 🎉
Quotes
NGN - USD Example

Create Quote Example - NGN to USD

The Create Quote API generates a foreign exchange quote for a specific transaction. This quote includes the exchange rate, transaction fee, applicable rules (e.g., limits), and the total amount the sender will pay.

In this example, we create a quote to convert 100,000 NGN (Nigerian Naira) to USD (United States Dollar) using BANK_TRANSFER as the payment channel.


Endpoint

POST https://{{baseURL}}/v1/quote


Authentication

Include these headers in your request:

HeaderDescriptionRequiredExample Value
x-api-keyAPI key for authentication✅ YesYOUR_API_KEY
Content-TypeRequest content type✅ Yesapplication/json

Request Example

curl --location --request POST 'https://{{baseURL}}/v1/quote' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
   "paymentChannel": "BANK_TRANSFER",
   "source": {
        "amount": 100000,
        "country": "NG",
        "currency": "NGN"
    },
    "target": {
        "country": "US",
        "currency": "USD"
    }
}'
ℹ️
Note: BANK_TRANSFER is currently supported for NGN to USD quotes.

Sample Response (200 OK)

{
  "message": "quote successfully created",
  "status": "success",
  "data": {
    "id": "855a128a-f93f-4998-8227-dc4a4da86af3",
    "source": {
      "currency": "NGN",
      "country": "NG",
      "amount": 100000.00
    },
    "target": {
      "currency": "USD",
      "country": "US",
      "amount": 61.39
    },
    "rate": 1629.00,
    "fee": {
      "amount": 200
    },
    "rules": [
      {
        "category": "LIMIT",
        "appliedCurrency": "USD",
        "appliedCountry": "US",
        "transaction": {
          "minimum": 2.00,
          "maximum": 10000000.00
        },
        "invoice": 134000.00
      }
    ],
    "summary": {
      "total": 100200.00
    },
    "expiresInSeconds": 600
  }
}

Response Breakdown


General Information

FieldTypeDescription
messageStringConfirmation message
statusStringIndicates success or failure
data.idStringUnique identifier for the quote

Source (Sending) Details

FieldTypeDescription
source.currencyStringCurrency being sent (NGN)
source.countryStringSender country (NG)
source.amountNumberAmount to be sent (100,000 NGN)

Target (Receiving) Details

FieldTypeDescription
target.currencyStringCurrency to be received (USD)
target.countryStringRecipient country (US)
target.amountNumberAmount recipient receives (61.39 USD)

Exchange Rate and Fees

FieldTypeDescription
rateNumberExchange rate applied (1629.00)
fee.amountNumberTransaction fee (200 NGN)

Transaction Rules

FieldTypeDescription
rules[].categoryStringRule category (LIMIT)
rules[].appliedCurrencyStringCurrency rule applies to (USD)
rules[].appliedCountryStringCountry rule applies to (US)
rules[].transaction.minimumNumberMinimum transaction amount (2.00 USD)
rules[].transaction.maximumNumberMaximum transaction amount (10,000,000 USD)
rules[].invoiceNumberMax invoice value (134,000 NGN)

Summary

FieldTypeDescription
summary.totalNumberTotal user pays (100,000 + 200 = 100,200 NGN)

Key Takeaways

  • This quote converts 100,000 NGN to 61.39 USD at a rate of ₦1,629.00/USD.
  • A 200 NGN processing fee is included in the total amount.
  • The total amount payable by the sender is 100,200 NGN.
  • The recipient will receive 61.39 USD.
  • The transaction must comply with the limit rules: minimum 2 USD, maximum 10,000,000 USD.
  • The quote expires after 10 minutes (600 seconds).

Best Practices

  • ✅ Include a valid API key in the x-api-key header.
  • ✅ Use correct ISO codes for both country and currency.
  • ✅ Always inspect the rules returned in the response to ensure the transaction complies with set limits.