Cancels a payment that has not been sent, or that failed or came back, so it is never paid.
Requires the Write permission.
When you can cancel. The payment must be DRAFT, FAILED, RETURNED, WAITING_PAYABILITY or RESTRICTED and not being
sent. isCancellable on the payment tells you; check it first. For a few seconds after creation a new payment cannot be
cancelled yet while its service fee is charged; retry if you get 423.
What happens. The payment shows CANCELLED immediately and the cancellation completes in the background. The service fee
charged for the payment is refunded when you cancel inside the grace period (until the end of the day that is your account's
grace period, 5 days unless agreed otherwise, after creation); refundableServiceFee in the response tells you. The
payment-status-changed webhook fires with CANCELLED. A cancelled payment cannot be restored; create a new one.
Errors
404 NOT_FOUND: the payment does not exist.423 NOT_EDITABLE: the payment is not in a status that can be cancelled, or it is being sent.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
