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
Param | Optional | Type | Description |
---|---|---|---|
paymentAssetId | *required | String | assetId of payment cryptocurrency. You can see the supported asset id in Payment Assets. |
settlementAssetId | *required | String | assetId of settlement cryptocurrency. Settlement assets you prefer. For more options, see here. |
quoteAmount | *required | Numeric | Corresponding to the amount of quoteAssetId, for example, the current commodity value is 10 USDT |
quoteAssetId | *required | String | assetId of quote cryptocurrency. You can see the supported asset id in Quote Assets. |
paymentAmount | optional | Numeric | The 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
}