Documentation
Create Quote

Creating a quote

Overview

The first step in utilizing the Offramps, is to create a quote. This allows you to determine the exchange rate, settlement amount and other transaction details before proceeding. The quote will be valid for 15 minutes

Request

You create a quote by sending a POST request to the /api/v1/payouts/quotes, providing the required details. The request body should include the asset to send, the amount, and the destination currency amongst other things. Here's a sample request payload:

Sample Request Payload

{
  "fromAsset": "usdt",
  "toCurrency": "ngn",
  "source": "onchain",
  "chain": "trc20",
  "amount": 20000
}

The complete specification of the endpoint and its properties can be found in the API reference (opens in a new tab).

NOTE: The amount property in the request payload should be in the lowest denomination of the source currency (in this case it's USD and the source currency is in cents), in this case the 20000 will translate to an amount of 200 USD. Remember to check the amount returned in the response to verify before proceeding.

Response

The response should include details about the quote such as the exchange rate, settlement amount, expiration time, etc. Here's a sample response

Sample Response

{
  "status": true,
  "message": "OffRamp quote generated successfully",
  "data": {
    "id": "6ae40f3c-0eb5-478e-8892-560ee427ee3c",
    "status": "quote",
    "settlementCurrency": "NGN",
    "exchangeRate": 1626.1,
    "quoteId": "QT_6156",
    "settlementAmount": 325220,
    "amount": 200,
    "expiryTimeStamp": 1736937216,
    "expiresInText": "This quote expires in 15 minutes",
    "quoteText": "NGN 325,220 will be settled for this transaction"
  }
}

If you are satisfied with the response, you can proceed to initializing the quote.