Cancel a payment link
Overview
You can cancel a payment link, if necessary.
For example, if a merchant's payment request is for a travel purchase, but the price is no longer valid, you can cancel the payment link.
To cancel a payment link, it must fulfil the following conditions:
- The payment in Checkout must be unpaid.
- The payment link must be in the initiated state.
- The payment link must not have expired.
After cancelling a payment link, you cannot change it back to any available state. You must create a new payment link.
Flow
To learn more about the required and optional parameters, see the API reference section.
The cancel payment link flow works as follows:
- The merchant initiates the payment link cancellation by making a request to the
/api/payments/{paymentId}
endpoint. - The Payment Links API cancels the payment link.
Example requests and responses
For sample requests and responses, see the interactive API playground or use the Peach Payments Postman collection:
Updated 3 months ago