On-ramp Request- Fiat to Stablecoins

In this scenario, your customer pays with fiat currency, and the equivalent stablecoin amount is sent to their crypto wallet.

Step 1: Get a Quote

Request a quote for a "BUY" transaction.

Endpoint: POST /quote

Request Body:

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

Success Response (201):

{ "data": { "id": "68bc5c8b52070a14acfeed8a", "status": "INACTIVE", "fiatAmount": 20000, "tokenAmount": 19.9, "price": 1000, "fee": 0.2, "createdAt": "2025-09-06T16:08:43.957Z", "type": "BUY", "address": "0x037d782373058981C3dfa06A4DdF6E7D921Db37e", "paymentAccount": { "accountName": "Praise Chukwuka", "accountNumber": "5003397590", "bankName": "VFD MICROFINANCE BANK" } }, "message": "success", "error": null, "statusCode": 201 }

Step 2: Execute the quote/order

Create the order using the quoteID and provide the user's destination crypto wallet address.

Endpoint: POST /quote/{quoteID}

Request Body:

quoteid string (query)

Success Response:

The API response will provide the bank account details where your user needs to send their fiat payment.

{ "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 3: Await Confirmation

Your application must display the paymentDetails to your user. Once DexPay's system confirms receipt of the fiat payment with the correct reference, the stablecoins will be automatically sent to the user's recipientWallet. You can track the order status via webhooks or by polling the GET /orders endpoint.

Last updated