Cancel a payment request

Cancels a payment request that has not been paid. The response carries no data key.

Requires the payment_links:cancel ability. It does not require a verified account, and it reaches the same set of payment requests the read operation does — every one belonging to the key's user.

Two conditions are checked, in this order. The request must still be active, and it must not already have been used. Each has its own code and its own errors value, and neither is an array: PAYMENT_LINK_NOT_ACTIVE carries errors.status as a string, PAYMENT_LINK_CANNOT_CANCEL carries errors.current_uses as an integer.

Cancelling here notifies your webhook endpoints. A successful cancel dispatches payment_link.cancelled to every active endpoint subscribed to it, exactly as a cancel from the dashboard does.

Refusals past the shared ones: 401 INVALID_API_KEY in the ordinary envelope, 404 USER_NOT_FOUND, 404 PAYMENT_LINK_NOT_FOUND, 404 RESOURCE_NOT_FOUND, 422 PAYMENT_LINK_NOT_ACTIVE, 422 PAYMENT_LINK_CANNOT_CANCEL and 500 SYSTEM_DATABASE_ERROR.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json