> For the complete documentation index, see [llms.txt](https://docs.dexpay.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexpay.io/b2b-integration/core-transaction-workflows/off-ramp-request-stablecoins-to-fiat.md).

# Off-ramp Request- Stablecoins to Fiat

**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"\
}\ <br>

**Request Body (by fiatAmount):**

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

**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):**

`[`\
&#x20;   `{`\
&#x20;       `"name": "Kuda Bank",`\
&#x20;       `"code": "090267",`\
&#x20;       `"currency": "NGN"`\
&#x20;   `},`\
&#x20;   `{`\
&#x20;       `"name": "9 Payment Service Bank",`\
&#x20;       `"code": "120001",`\
&#x20;       `"currency": "NGN"`\
&#x20;   `}`\
&#x20;   `// ... and more`\
`]`\
&#x20;

**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`\
`}`<br>

**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.

<br>
