๐Ÿ“ฃ New Region Unlocked: You can now send payouts directly to Malawi! ๐Ÿ‡ฒ๐Ÿ‡ผ
Quotes
Create Quote Examples

Create Quote API

The Create Quote API allows users to generate a quote for a specified source and destination currency. This quote locks in the exchange rate, fees, and amounts for a short period, which you can then use to initiate a payout transaction.

This endpoint creates a currency exchange quote for a user, considering applicable business rules. The response includes the converted amount, exchange rate, fees, and transaction limits.


Endpoint

POST {{baseURL}}/v1/quote


Request Headers

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


Request & Response Examples

This example demonstrates converting 100,000 NGN to EUR.

cURL Request

curl --location --request POST '{{baseURL}}/v1/quote' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
  "paymentChannel": "BANK_TRANSFER",
  "source": {
    "amount": 100000,
    "country": "NG",
    "currency": "NGN"
  },
  "target": {
    "country": "DK",
    "currency": "EUR"
  }
}'

Successful Response (200 OK)

{
  "message": "quote successfully created",
  "status": "success",
  "data": {
    "id": "74bgf9ea-141e-13c7-ade9-xxxxxxxxxxxxx",
    "source": { "currency": "NGN", "country": "NG", "amount": 100000 },
    "target": { "currency": "EUR", "country": "DK", "amount": 61.72 },
    "rate": 1620.21,
    "fee": { "amount": 1000 },
    "rules": [
      {
        "category": "LIMIT",
        "appliedCurrency": "EUR",
        "appliedCountry": "DK",
        "transaction": { "minimum": 10, "maximum": 25000 },
        "invoice": 25000
      }
    ],
    "summary": { "total": 101000 }
  }
}

General Response Breakdown

โ„น๏ธ

Note: Every quote expires 10 minutes after it has been created.

General Information

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

Source (Sending) Details

FieldTypeDescription
source.currencyStringCurrency being exchanged
source.countryStringCountry where the transaction originates
source.amountNumberAmount to be converted

Target (Receiving) Details

FieldTypeDescription
target.currencyStringTarget currency
target.countryStringDestination country
target.amountNumberConverted amount

Exchange Rate and Fees

FieldTypeDescription
rateNumberExchange rate applied
fee.amountNumberTransaction fee

Transaction Rules

FieldTypeDescription
rules[].categoryStringType of rule applied (e.g., LIMIT)
rules[].appliedCurrencyStringCurrency the rule applies to
rules[].appliedCountryStringCountry the rule applies to
rules[].transaction.minimumNumberMinimum allowed transaction
rules[].transaction.maximumNumberMaximum allowed transaction
rules[].invoiceNumberMaximum invoice amount

Summary & Expiration

FieldTypeDescription
summary.totalNumberTotal amount user pays (source amount + fee)
expiresInSecondsNumberQuote expiration time in seconds

Error Handling

Status CodeMeaningExample ResponseHow to Handle
400Bad RequestRequired field missing or invalid requestCheck API documentation for required fields and input formats.
401UnauthorizedInvalid authentication credentialsVerify API key in the header is correct and active.
403ForbiddenYour IP address is not allowed to access this serviceWhitelist your IP address in the API Management settings.
429Too Many RequestsAPI rate limit exceedImplement retry with exponential backoff.
500Internal Server ErrorAn unexpected error occurred on the serverRetry after some time; if persistent, contact support.

Best Practices

  • โœ… Always include a valid x-api-key in the request header.
  • โœ… Ensure that the source and target country and currency codes are valid to prevent request failures.
  • โœ… Handle transaction limits appropriately by inspecting the rules object in the response.
  • โœ… Save the data.id from the quote response, as it will be required to execute the payout.