Cancel an active payment link
active status can be cancelled.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Payment link ID (e.g., plink_abc123xyz) |
| Parameter | Type | Required | Description |
|---|---|---|---|
reason | string | No | Reason for cancellation (max 500 chars) |
| Field | Type | Description |
|---|---|---|
status | enum | Will be cancelled |
cancelled_at | timestamp | When link was cancelled |
cancellation_reason | string | Reason provided for cancellation |
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_state | Link is not in cancellable state |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Payment link not found |
| 429 | rate_limit_exceeded | Too many requests |
| Current Status | Can Cancel? | Result |
|---|---|---|
active | Yes | Status changes to cancelled |
paid | No | Error: Use refund endpoint instead |
expired | No | Error: Already expired |
cancelled | No | Error: Already cancelled |
active before attempting to cancelpayment_link.cancelled events