Convert Crypto Charge - GET

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.

FieldTypeDescription
walletObject"wallet": {
"symbol": "USDT", // String
"convert_id": "825", // String
"chart": "cmc" // String. Value must be "cmc"
}
localObject"local": {
"amount": "20", // String
"currency": "USD" // String
}
_idStringThe Crypto charge id returned when you made a post to the Create Crypto Charge endpoint
networkStringThe Crypto charge id returned when you made a post to the Create Crypto Charge endpoint

AUTHORIZATION - API Key

This request is using API Key from collection Overview

HEADERS

api-key - LIVE;PK;

Body - raw (json)

{
    "wallet": {
        "symbol": "USDT",
        "convert_id": "825",
        "chart": "cmc"
 
    },
    "local": {
        "amount": "20",
        "currency": "USD"
    },
    "_id": "641bf59387aae40037176543",
    "network": "bsc"
}

Example Request

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"
}'

Examples Response

json
headers
{
"amount": 19.950009004592847,
"currency": "USDT"
}