Generate Quote

Generate a quote with source and destination details before you execute a transaction.

Generate a quote so you can price a transaction before you execute it.

When to use this page

Use this page after you know the source account, beneficiary account or destination details, amount, and rail you want to price.

Prerequisites

  1. Set your NadaPay API base URL in $baseUrl.
  2. Export your NadaPay API key as YOUR_API_KEY.
  3. Generate a unique idempotency key for the request.
  4. Confirm the source and destination details for the transaction you want to price.

Before you continue

  • confirm the source account is the one you intend to debit
  • confirm the beneficiary account or destination details are complete
  • validate the transaction amount against the corridor limits
  • confirm the rail and destination type you want to use

Start with these values for the recommended flow

For the example below, fill in these values first:

  • source.accountId
  • source.currency
  • source.amount
  • source.rail
  • destination.beneficiaryAccountId
  • destination.currency
  • destination.type
  • destination.country
  • destination.paymentMethod

Step 1 — Generate the quote

For the example below, fill in these values first:

  • source.accountId
  • source.currency
  • source.amount
  • source.rail
  • destination.beneficiaryAccountId
  • destination.currency
  • destination.type
  • destination.country
  • destination.paymentMethod

Step 1 — Generate the quote

curl --request POST \
  --url $baseUrl/transactions/quote \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'x-idempotency-key: YOUR_UNIQUE_UUID' \
  --data '{
    "source": {
      "accountId": "string",
      "currency": "USD",
      "amount": 1000000,
      "rail": "ACH",
      "chain": "Ethereum",
      "address": "string",
      "type": "CRYPTO"
    },
    "destination": {
      "beneficiaryAccountId": "string",
      "accountId": "string",
      "currency": "NGN",
      "type": "BANK",
      "accountNumber": "string",
      "bankCode": "string",
      "country": "Nigeria",
      "chain": "Base",
      "address": "string",
      "name": "string",
      "paymentMethod": "Bank Transfer"
    },
    "metadata": {}
  }'

Use the source object to describe where funds come from and the destination object to describe which beneficiary account or destination will receive the funds.

Step 2 — Review the response

A successful response returns the quote you will use when you execute the transaction.

What this step returns

  • the quoteId you need for execution
  • the priced source and destination terms for the transaction

Save the quoteId immediately and use it in the execute step.

Common reasons this step fails

  • the amount falls outside the supported limit range
  • the source and destination configuration is not supported
  • the destination details do not match the selected rail

Response — error:

{
  "statusCode": 500,
  "message": "Internal server error"
}

What success looks like

  • the quote request succeeds
  • you save the returned quoteId
  • the priced source and destination terms match the transaction you intend to execute

Do not continue if

  • the amount falls outside the supported limit range
  • the source or destination details do not match the selected rail
  • you do not receive a valid quoteId

Call this next