Cancel Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/cancel/{id} \
--header 'x-access-id: <api-key>'const options = {method: 'POST', headers: {'x-access-id': '<api-key>'}};
fetch('https://secureapi.tender.cash/v1/api/payment/cancel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/cancel/{id}"
headers = {"x-access-id": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/cancel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "success",
"data": {
"txId": "66aec7de809b7f45c42a49f9",
"status": "cancelled",
"referenceId": "ORDER-9821",
"cancelledAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Transaction with status 'completed' can no longer be cancelled",
"data": null
}{
"status": "error",
"message": "INVALID_REQUEST_SIGNATURE",
"data": {}
}{
"status": "error",
"message": "Too many requests. Max 120 per 60s.",
"data": null
}Payment
Cancel Payment
Cancel a pending payment request
POST
/
v1
/
api
/
payment
/
cancel
/
{id}
Cancel Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/cancel/{id} \
--header 'x-access-id: <api-key>'const options = {method: 'POST', headers: {'x-access-id': '<api-key>'}};
fetch('https://secureapi.tender.cash/v1/api/payment/cancel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/cancel/{id}"
headers = {"x-access-id": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/cancel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "success",
"data": {
"txId": "66aec7de809b7f45c42a49f9",
"status": "cancelled",
"referenceId": "ORDER-9821",
"cancelledAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Transaction with status 'completed' can no longer be cancelled",
"data": null
}{
"status": "error",
"message": "INVALID_REQUEST_SIGNATURE",
"data": {}
}{
"status": "error",
"message": "Too many requests. Max 120 per 60s.",
"data": null
}Auth method: Basic (Access ID) — this endpoint only requires your
x-access-id header. No request signing is needed. See
Authentication.pending, for example when the customer abandons
checkout. Once cancelled, Tender stops checking the deposit address for this payment, and its
reference can be used for a new payment.
- Only
pendingpayments can be cancelled. A payment that has received funds, or has already completed, can’t be cancelled. - The call is idempotent: cancelling a payment that is already cancelled returns success again.
- A successful cancellation sends the
transaction_cancelledwebhook event. Repeating the call doesn’t send it again.
Path Parameters
string
required
The
txId returned when the payment was initiatedExample: "66aec7de809b7f45c42a49f9"Headers
string
required
Your API access ID provided by TenderExample:
"your-access-id-here"Response
string
required
Status of the API requestExample:
"success"string
required
Human-readable message describing the resultExample:
"success"object
required
The cancelled payment
Show data properties
Show data properties
string
The payment’s transaction IDExample:
"66aec7de809b7f45c42a49f9"string
Always
cancelledExample: "cancelled"string
Your
reference, or an empty stringExample: "ORDER-9821"string
ISO 8601 timestamp of the cancellation. Omitted when the payment was already cancelled.Example:
"2026-10-15T09:12:00.000Z"Errors
| HTTP | Message | Cause |
|---|---|---|
| 400 | Invalid tx id | The ID is unknown or doesn’t belong to your merchant account |
| 400 | Invalid resource ID format | The ID isn’t a valid transaction ID |
| 400 | Transaction with status '<status>' can no longer be cancelled | The payment isn’t pending (for example, it is completed or partial-payment) |
data: null. See Errors.
Example request
curl -X POST https://sandbox-api.tender.cash/v1/api/payment/cancel/66aec7de809b7f45c42a49f9 \
-H "x-access-id: your-access-id-here"
Example response
{
"status": "success",
"message": "success",
"data": {
"txId": "66aec7de809b7f45c42a49f9",
"status": "cancelled",
"referenceId": "ORDER-9821",
"cancelledAt": "2026-10-15T09:12:00.000Z"
}
}
Authorizations
Basic (Access ID) authentication. Only the x-access-id header is required; no request signing.
Headers
Your API access ID provided by Tender
Path Parameters
The payment's txId