Off-ramp Request- Stablecoins to Fiat

In this scenario, your customer pays with a stablecoin (e.g., USDT, DUSD), and the equivalent fiat amount is settled to their local bank account.

Step 1: Get a Quote

First, get a real-time quote for the transaction. You can request a quote based on either the amount of stablecoin the user wants to sell or the amount of fiat they wish to receive.

Endpoint: POST /quote

Request Body (by tokenAmount):

{ "tokenAmount": 20, "asset": "DUSD", "chain": "BSC", "type": "SELL", "bankCode": "0201", "accountName": "Taiwo Daniel", "accountNumber": "3133233059" }

Request Body (by fiatAmount):

{ "fiatAmount": 20000, "asset": "DUSD", "chain": "BSC", "type": "SELL", "bankCode": "0201", "accountName": "Taiwo Daniel", "accountNumber": "3133233059" }

Success Response (201):

The response contains the exchange rate and a unique quoteId that is valid for a short time.

{ "data": { "id": "68bc5a2c40bcf4c1c1625b05", "status": "INACTIVE", "fiatAmount": 20200, "tokenAmount": 20, "price": 1000, "fee": 0.2, "createdAt": "2025-09-06T15:58:36.179Z", "type": "BUY", "address": "0x037d782373058981C3dfa06A4DdF6E7D921Db37e", "paymentAccount": { "accountName": "Praise Chukwuka", "accountNumber": "5003397590", "bankName": "VFD MICROFINANCE BANK" } }, "message": "success", "error": null, "statusCode": 201 }

Step 2: Get Bank Information (Optional)

If you need to present your user with a list of supported banks, you can fetch them with this endpoint.

Endpoint: GET /banks

Success Response (200):

[ { "name": "Kuda Bank", "code": "090267", "currency": "NGN" }, { "name": "9 Payment Service Bank", "code": "120001", "currency": "NGN" } // ... and more ]

Step 3: Create the Order

Using the quoteId, create the order and provide the user's bank account details for settlement.

Endpoint: POST /quote/{quoteID}

Request Body:

quoteid string (query)

Success Response:

The API response will provide a unique orderId and, most importantly, a deposit address. Your application must display this address to the user and instruct them to send the exact tokenAmount from the quote to it.

{ "data": { "id": "68bc5d3c52070a14acfeedf2", "status": "PENDING", "fiatAmount": 20200, "tokenAmount": 20, "price": 1000, "fee": 0.2, "createdAt": "2025-09-06T16:11:40.604Z", "type": "BUY", "address": "0x037d782373058981C3dfa06A4DdF6E7D921Db37e", "paymentAccount": { "accountName": "Praise Chukwuka", "accountNumber": "5003397590", "bankName": "VFD MICROFINANCE BANK" } }, "message": "success", "error": null, "statusCode": 201 }

Step 4: Await Confirmation

DexPay's system will automatically monitor the deposit address. Once the correct amount of stablecoin is received, the order status will update, and the fiat settlement will be processed instantly. You can use webhooks (contact us for setup) or poll the GET /orders endpoint to track the status.

Last updated