Cancel a recurring payment.
DELETE
/v1/recurring-payments/{reference}
const url = 'https://api.ridleypay.com/v1/recurring-payments/WOO-SUB-456';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.ridleypay.com/v1/recurring-payments/WOO-SUB-456 \ --header 'Authorization: Bearer <token>'Cancels an active recurring payment schedule. No further charges will be made.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”reference
required
string
The recurring payment reference.
Example
WOO-SUB-456Responses
Section titled “ Responses ”Cancelled
Media typeapplication/json
object
data
object
id
string
type
string
attributes
object
reference
string
status
string
cancelled_at
string
links
object
self
string
meta
object
message
string
Example
{ "data": { "id": "1", "type": "recurring-payments", "attributes": { "reference": "WOO-SUB-456", "status": "cancelled", "cancelled_at": "2026-03-06T12:00:00.000000Z" }, "links": { "self": "https://pay.example.com/api/v1/recurring-payments/WOO-SUB-456" } }, "meta": { "message": "Recurring payment cancelled." }}Not found
Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{ "errors": [ { "status": "404", "title": "Not Found", "detail": "Recurring payment not found." } ]}Already cancelled
Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{ "errors": [ { "status": "422", "title": "Unprocessable Entity", "detail": "Recurring payment is already cancelled." } ]}