curl -X POST https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel \
-H "Authorization: Bearer lid_live_..."
const res = await fetch(
'https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lid_live_...' }
}
);
const { success } = await res.json();
{ "success": true }
Payments
Cancel a payment
Void a Liddie invoice that is still waiting for funds. Once any money has arrived, cancel answers 400 — use a refund on the settled payment instead.
POST
/
api
/
v1
/
payments
/
{paymentId}
/
cancel
curl -X POST https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel \
-H "Authorization: Bearer lid_live_..."
const res = await fetch(
'https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lid_live_...' }
}
);
const { success } = await res.json();
{ "success": true }
Cancels a payment. You can only cancel while no funds are involved (e.g. status
WAITING) — otherwise the call answers 400 {"error":"Payment cannot be cancelled"}. The action is audit-logged.
This endpoint takes no request body — the payment is identified by the paymentId path parameter, so an empty playground body is expected.
Check the payment’s
status before cancelling: once any funds are involved, cancel answers 400. For a payment that has already settled, use a refund instead.curl -X POST https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel \
-H "Authorization: Bearer lid_live_..."
const res = await fetch(
'https://api.liddie.io/api/v1/payments/6a0000000000000000000001/cancel',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lid_live_...' }
}
);
const { success } = await res.json();
{ "success": true }
Authorization
- API-key scope:
payments:cancel· JWT team permission:payments:manage - Your merchant account must be active.
string
required
24-hex payment id from create/list.
Response fields
boolean
true when the payment was cancelled; its status flips to CANCELLED — also visible on the public GET /getInvoiceStatus. Cancelling the same payment again answers 400.Errors
| Status | Body | Why |
|---|---|---|
| 400 | {"error":"Payment cannot be cancelled"} | funds already involved, or the payment was already cancelled |
See also
- Get a payment: check the current
statusbefore attempting a cancel. - Payments overview: where
CANCELLEDsits in the lifecycle. - Create a payment: issue a fresh invoice after cancelling.