Cancel an agreement for recurring payments API reference
Path parameters for ‘Cancel a recurring payments agreement’
This page is part of GOV.UK Pay’s API reference and is an index of the following things you’ll use when cancelling a recurring payments agreement:
- example requests
- example responses
- attributes you’ll get in your response
The URL for this endpoint is:
You can use this endpoint to cancel a recurring payments agreement in the
active status. Read more about agreement
You cannot use a cancelled agreement to take recurring payments. Reactivate a cancelled agreement by taking a payment from the user and telling the GOV.UK Pay API to save the user’s card details.
The data from this endpoint is strongly consistent, meaning it is updated immediately after you make any changes. You can read more about data consistency in our API.
Example request for ‘Cancel an agreement for recurring payments’
This example request cancels the recurring payments agreement with the ID
curl -X POST "https://publicapi.payments.service.gov.uk/v1/agreements/cgc1ocvh0pt9fqs0ma67r42l58/cancel" -H "Authorization: Bearer api_test_123abc456def"
You do not need to send anything in the body of requests to this endpoint.
Example response for ‘Cancel an agreement for recurring payments’
A successful agreement cancellation returns a
204 HTTP status code without a response body.