Skip to main content
POST
/
widget
/
initialize
curl --request POST \ --url https://sandbox.dollarpe.xyz/widget/initialize \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <api-key>' \ --header 'X-SIGNATURE: <api-key>' \ --header 'X-TIMESTAMP: <api-key>' \ --data ' { "asset_code": "USDT", "fiat_amount": "1000", "fiat_currency": "INR", "flow_type": "buy", "network_code": "tron", "payment_method": "IMPS", "wallet_address": "TXqH4MnDw46f3yyrRwau3JF92Y1ie3pAXf" } '
{ "message": "Success", "status": true, "data": { "widget_link": "https://app.dollarpe.xyz/login?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmdfaWQiOiJmZjQ2YjNiMC04NTQ3LTRmNDgtODRhNS00MDdjMzhlMGM0ZTkiLCJhcHBfaWQiOiJkb2xsYXJwZSIsImZsb3dfdHlwZSI6ImJ1eSIsImFzc2V0X2NvZGUiOiJVU0RUIiwiYXNzZXRfbmFtZSI6IlRldGhlciIsImFzc2V0X2xvZ28iOiJodHRwczovL2RvbGxhcnBlLXB1YmxpYy1kZXZlbG9wbWVudC5zMy51cy1lYXN0LTEuYW1hem9uYXdzLmNvbS9hc3NldHMvY29pbnMvdXNkdC5wbmciLCJmaWF0X2N1cnJlbmN5IjoiSU5SIiwibmV0d29ya19jb2RlIjoidHJvbiIsIm5ldHdvcmtfbmFtZSI6IlRyb24iLCJwYXltZW50X21ldGhvZCI6ImltcHMiLCJmaWF0X2Ftb3VudCI6IjEwMDAiLCJ3YWxsZXRfYWRkcmVzcyI6IlRYcUg0TW5EdzQ2ZjN5eXJSd2F1M0pGOTJZMWllM3BBWGYiLCJ0eXBlIjoid2lkZ2V0IiwiZXhwIjoxNzc1Njc4OTMxLCJpYXQiOjE3NzU2NzcxMzF9.4xEn4pKEi_nKpi-vY7MoiXqMBdcPgr7xvqNSF8YzMbM&app_id=dollarpe&flow_type=buy" } }

Authorizations

X-API-KEY
string
header
required

API Key for authentication

X-TIMESTAMP
string
header
required

Current timestamp in seconds since epoch

X-SIGNATURE
string
header
required

HMAC SHA256 signature of the request encoded in Base64

Body

application/json
asset_code
string
required

Cryptocurrency asset code

Example:

"USDT"

fiat_amount
string
required

Fiat amount the user will pay (buy flow)

Example:

"1000"

fiat_currency
string
required

Fiat currency code

Example:

"INR"

flow_type
enum<string>
required

Must be buy for this request shape

Available options:
buy
network_code
string
required

Blockchain network code for the asset

Example:

"tron"

payment_method
string
required

Fiat payment method (e.g. IMPS, UPI)

Example:

"IMPS"

wallet_address
string
required

User's wallet address to receive crypto

Example:

"TXqH4MnDw46f3yyrRwau3JF92Y1ie3pAXf"

Response

Widget initialized successfully. The widget_link opens the widget; query parameters include app_id and flow_type.

status
boolean
required
Example:

true

message
string
required
Example:

"Success"

data
object
required