Cancel Payment
This method cancels a payment.
shell
POST: {{endpoint}}/v1/payment/cancelHeaders
| Key | Type | Value | Description |
|---|---|---|---|
| x-api-key | string | key_xxxxxxxxxxxxxxxxxxxx | API Key string |
| x-signature | string | SHA256 | The HMAC SHA256 signature. |
| x-timestamp | string | 1730998051892 | Timestamp of the request |
Request Body
| Key | Type | Description |
|---|---|---|
| id | string | (required) the id of the payment |
Response Parameters
Response status: 200 OK
id: the id of the transactionseq_num: the sequence number of the transactionorder_id: the order idchain: the chain-idnetwork: the networkfrom_fiat_currency: the from fiat currencyto_crypto_currency: the to crypto currencyamount: the amountpayment_amount: the payment amountpayer_paid_currency: the payer paid currencypayer_paid_amount: the payer paid amountmerchant_amount: the merchant amounttxid: the txidaddress: the addressfrom_address: the from addressauto_convert: the auto convertconvert_to: the convert topayment_url: the payment urlurl_return: the return urlurl_success: the success urlurl_failed: the failed urlis_multiple_order: the is multiple orderlifetime: the lifetimeexpired_at: the expired atfee_subtract: the fee subtractfee_percent: the fee percentdiscount_percent: the discount percentdiscount_amount: the discount amountaccuracy_percent: the accuracy percentadditional_data: the additional datasupport_currencies: the support currenciesexcept_currencies: the except currenciesexchange_rate: the exchange rateexchange_rate_source: the exchange rate sourcepayment_status: the payment statuspayment_match_type: the payment match typeis_completed: the is completedstatus: the statuscreated_at: the created atowned_by_group: the owned by groupagent_id: the agent id
Example Response
json
{
"data": {
"id": "25e2c615-c90c-4868-b24d-0c1e3b81f92e",
"seq_num": 43,
"order_id": "391",
"chain": "tron",
"network": "testnet",
"from_fiat_currency": "USD",
"to_crypto_currency": "USDT",
"amount": "2",
"payment_amount": 2.006488233020612,
"payer_paid_currency": null,
"payer_paid_amount": null,
"merchant_amount": 0,
"txid": null,
"address": "TZAiamSzmrrTz5RnP8D8B96XAR2GsUvtw1",
"from_address": null,
"auto_convert": false,
"convert_to": "USDT",
"payment_url": "https://xpays.life/pay/25e2c615-c90c-4868-b24d-0c1e3b81f92e",
"url_return": "https://xpays.life/return",
"url_success": "https://xpays.life/success",
"url_failed": "https://xpays.life/failed",
"is_multiple_order": true,
"lifetime": 900,
"expired_at": "2024-11-25T06:53:21.256Z",
"fee_subtract": 0,
"fee_percent": 0.4,
"discount_percent": 0,
"discount_amount": 0,
"accuracy_percent": 0.5,
"additional_data": {},
"support_currencies": null,
"except_currencies": null,
"exchange_rate": 0.9967663737499999,
"exchange_rate_source": "COINGECKO",
"payment_status": "PAYMENT_CANCELED",
"payment_match_type": "EXACTLY",
"is_completed": true,
"status": "CANCELED",
"created_at": "2024-11-25T06:38:21.260Z",
"owned_by_group": "8e393308-28a9-4a6e-a689-0d7760483c7e",
"agent_id": "aacc3472-f3c3-49bb-9040-d5a6aff283bf"
}
}json
{
"error": "Error message"
}json
{
"error": "Forbidden"
}