https://api.100pay.co/api/v1/pay/crypto/convert
This Endpoint will do the price conversion for you. Failure to call this endpoint with the required fields will result in a permanent lost of all funds sent to the generated address.
The customer needs to know exactly how many units of an asset to send. In our example response, we are converting $20 USD to USDT.
This is possible with the 100Pay Checkout conversion endpoint.
Send a post request with the required fields. Please note that the "_id" field is the Crypto Charge Id.
Field | Type | Description |
---|
wallet | Object | "wallet": { "symbol": "USDT", // String "convert_id": "825", // String "chart": "cmc" // String. Value must be "cmc" } |
local | Object | "local": { "amount": "20", // String "currency": "USD" // String } |
_id | String | The Crypto charge id returned when you made a post to the Create Crypto Charge endpoint |
network | String | The Crypto charge id returned when you made a post to the Create Crypto Charge endpoint |
This request is using API Key from collection Overview
api-key - LIVE;PK;
{
"wallet": {
"symbol": "USDT",
"convert_id": "825",
"chart": "cmc"
},
"local": {
"amount": "20",
"currency": "USD"
},
"_id": "641bf59387aae40037176543",
"network": "bsc"
}
curl --location 'https://api.100pay.co/api/v1/pay/crypto/convert' \
--header 'api-key: {{api-key}}' \
--data '{
"wallet": {
"symbol": "USDT",
"convert_id": "825",
"chart": "cmc"
},
"local": {
"amount": "20",
"currency": "USD"
},
"_id": "641bf59387aae40037176543",
"network": "bsc"
}'
{
"amount": 19.950009004592847,
"currency": "USDT"
}
Date
Thu, 23 Mar 2023 07:09:07 GMT
Content-Type
application/json; charset=utf-8
Content-Length
47
Connection
keep-alive
X-Powered-By
Express
Access-Control-Allow-Origin
*
ETag
W/"2f-1ly+1Asc9i6rVZ/ZyPLyiofbZrw"
CF-Cache-Status
DYNAMIC
Report-To
{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=a733G7sg6C90WS2FD6KZw3WmT4b7hN54gPXxI54imTTFgjkQQ20ylhr8s7sh3QbvZkquqI8LBDCCqPzJAhPJ7Vup6i%2FhVNKrZNIu5qPZDzIJMwqT%2BO4nKNnfZMcExBYy"}],"group":"cf-nel","max_age":604800}
NEL
{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server
cloudflare
CF-RAY
7ac4d8da5f9b4563-ATL
alt-svc
h3=":443"; ma=86400, h3-29=":443"; ma=86400