Payment links
POST
/ api/ payments/ {id}/ cancelCancel 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
| Field | Type | Description |
|---|---|---|
idRequired | string | Payment request id |
Headers
| Field | Type | Description |
|---|---|---|
midRequired | string | Your MID, starts with ul-mid. |
terminal-idRequired | string | Your terminal id, starts with ul-tid. |
Responses
| Status | Description |
|---|---|
| 200 OK | Success |
| 401 Unauthorized | Unauthorized |
| 403 Forbidden | Not Allowed. The link is already used, already canceled, or has a payment in Pending or a later status. |
| 404 Not found | Not Found |
Response fields 200
| Field | Type | Description |
|---|---|---|
messageOptional | string | Payment link is canceled |
POST
https://sandbox.geturbanledger.com/api/payments/ID/cancelcurl -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"
}