About attributes
pricing_type
This attribute is used when creating a charge to determine the pricing formation type for future payments. The following options are possible:
- fixed_price Indicates that the payment price will be fixed and constant from payment to payment, suitable for goods and services with a constant cost.
- no_price Indicates that the payment price will not be fixed for the product or service and will not be specified when presenting the payment page to the buyer, suitable for scenarios like receiving tips or donations.
info
Charge lifetime differs depending on pricing type:
- fixed_price charge will expire in 15 minutes after creation
- no_price charge will expire in 3 hours after creation
Request example from POST /v2.0/charges:
{
...
"theme": "dark",
"pricing_type": "fixed_price",
"crypto": {
"network": "tron",
"symbol": "USDT"
},
...
}
init_price
This is an object that specifies the currency and amount selected when creating a charge.
Response example from POST /v2.0/charges:
{
...
"init_price": {
"network": "fiat",
"symbol": "USD",
"amount": "1.23",
"amount_rest": "1.23",
"amount_paid": "0"
},
...
}
merchant_price
This is an object that specifies the currency and amount after conversion into the standard currency associated with your wallet.
Response example from POST /v2.0/charges:
{
...
"merchant_price": {
"network": "fiat",
"symbol": "USD",
"amount": "1.23",
"amount_rest": "1.23",
"amount_paid": "0"
},
...
}
pricing
An object with the details and required amount for the user to pay the charge in cryptocurrency.
Response example from POST /v2.0/charges:
{
...
"pricing": {
"tron.TRX": {
"network": "tron",
"symbol": "TRX",
"amount": "16",
"address": "TTDUnASbBcRHj13fkNea3VUzmTD17naYcG",
"rate": "0.077675",
"amount_rest": "16",
"amount_paid": "0"
}
}
...
}