Skip to content
Docs

Payment links

POST/api/payments/{id}/cancel

Cancel a Payment Link

Cancel a Payment link and QR Code before payment. A link cannot be canceled once any payment on it has reached Pending or a later status (Pending, Authorized, Captured, Partially Captured, Captured Declined, Refund Pending, Refunded, Partially Refund Pending, Partially Refunded, Refund Declined, Void Pending, Voided, Void Declined). Payments that were only started, declined, session canceled or expired do not block the cancel.

Server-side request · headers mid + terminal-idTry it in Sandbox

Path parameters

FieldTypeDescription
idRequiredstring

Payment request id

Headers

FieldTypeDescription
midRequiredstring

Your MID, starts with ul-mid.

e.g. ul-mid-696f12de-46d0-48c4-a7c8-bb*********5
terminal-idRequiredstring

Your terminal id, starts with ul-tid.

e.g. ul-tid-6208df4ad7329e*********e

Responses

StatusDescription
200 OKSuccess
401 UnauthorizedUnauthorized
403 ForbiddenNot Allowed. The link is already used, already canceled, or has a payment in Pending or a later status.
404 Not foundNot Found

Response fields 200

FieldTypeDescription
messageOptionalstring

Payment link is canceled

e.g. Payment link is canceled
POSThttps://sandbox.geturbanledger.com/api/payments/ID/cancel
curl -X POST "https://sandbox.geturbanledger.com/api/payments/ID/cancel" \
  -H "mid: sb-ul-mid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  -H "terminal-id: ul-tid-xxxxxxxxxxxxxxxxxxxxxxxx"
Response
200 OK · Success
{
  "message": "Payment link is canceled"
}
Talk to ustalk-to-us