Skip to main content

Payments Estimated

MixPay API to get the estimated price and the estimated amount of the transaction.

GET /payments_estimated

Get the estimated price and the estimated amount of the transaction.

This API is used to calculate the total amount that a customer has to pay and show it for the customer to confirm.

Endpoint URL

https://api.mixpay.me/v1/payments_estimated

Parameters

ParamOptionalTypeDescription
paymentAssetId*requiredStringassetId of payment cryptocurrency. You can see the supported asset id in Payment Assets.
settlementAssetId*requiredStringassetId of settlement cryptocurrency. Settlement assets you prefer. For more options, see here.
quoteAmount*requiredNumericCorresponding to the amount of quoteAssetId, for example, the current commodity value is 10 USDT
quoteAssetId*requiredStringassetId of quote cryptocurrency. You can see the supported asset id in Quote Assets.
paymentAmountoptionalNumericThe quoteAmount parameter is invalid when paymentAmount is not null.

Example request - Payments Estimated.

curl -i -X GET -G https://api.mixpay.me/v1/payments_estimated \
-d "paymentAssetId"="c6d0c728-2624-429b-8e0d-d9d19b6592fa" \
-d "settlementAssetId"="c6d0c728-2624-429b-8e0d-d9d19b6592fa" \
-d "quoteAssetId"="usd" \
-d "quoteAmount"="10"
// title: Response
{
"code":0,
"success":true,
"message":"",
"data":{
// paymentAmount/quoteAmount
"price":"0.00147078",
"estimatedSettlementAmount":"0.0001",
"settlementAssetId":"c6d0c728-2624-429b-8e0d-d9d19b6592fa",
"settlementAssetSymbol":"BTC",
"paymentAssetId":"c6d0c728-2624-429b-8e0d-d9d19b6592fa",
"paymentAssetSymbol":"BTC",
"paymentAmount":"0.0001",
"quoteAssetSymbol":"BTC",
"quoteAssetId":"c6d0c728-2624-429b-8e0d-d9d19b6592fa",
"quoteAmount":"0.0001",
},
"timestampMs":1645768221722
}