Create a recurring payment schedule.
const url = 'https://api.ridleypay.com/v1/recurring-payments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"payment_reference":"WOO-123","reference":"WOO-SUB-456","amount":29.99,"currency":"JMD","frequency":"daily","interval_count":1,"start_date":"2026-04-06","end_date":"2027-04-06","customer_email":"jane@example.com","customer_name":"Jane Doe","metadata":{"subscription_id":"sub_abc123"},"apply_tax":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ridleypay.com/v1/recurring-payments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "payment_reference": "WOO-123", "reference": "WOO-SUB-456", "amount": 29.99, "currency": "JMD", "frequency": "daily", "interval_count": 1, "start_date": "2026-04-06", "end_date": "2027-04-06", "customer_email": "jane@example.com", "customer_name": "Jane Doe", "metadata": { "subscription_id": "sub_abc123" }, "apply_tax": true }'Creates a new recurring billing schedule linked to a previously successful payment. The initial payment’s card token is stored and used for all future charges.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The reference of the initial successful payment to use as the card token source. Must not be greater than 255 characters.
Example
WOO-123A unique reference for this recurring schedule (e.g. your subscription ID). Must not be greater than 255 characters.
Example
WOO-SUB-456The amount to charge on each billing cycle. Must be at least 0.01.
Example
29.99ISO 4217 currency code. Defaults to the source’s configured currency. Must be 3 characters.
Example
JMDBilling frequency: daily, weekly, monthly, or yearly.
Example
monthlyNumber of frequency units between charges. Default 1. E.g. interval_count=2 + frequency=monthly = every 2 months. Must be at least 1. Must not be greater than 365.
Example
1When to start billing. Defaults to one interval from today. Must be a valid date. Must be a date after or equal to today.
Example
2026-04-06When to stop billing. Null for indefinite. Must be a valid date. Must be a date after start_date.
Example
2027-04-06Customer’s email address. Must be a valid email address. Must not be greater than 255 characters.
Example
jane@example.comCustomer’s full name. Must not be greater than 255 characters.
Example
Jane DoeArbitrary key-value data. Included in webhooks.
object
Example
{ "subscription_id": "sub_abc123"}Apply your team tax settings to every charge. With exclusive tax, amount is the subtotal and tax is added; with inclusive tax, tax is extracted from amount. Recalculated on each charge.
Example
trueResponses
Section titled “ Responses ”Schedule created
object
object
object
object
Example
{ "data": { "id": "1", "type": "recurring-payments", "attributes": { "reference": "WOO-SUB-456", "amount": "29.99", "currency": "JMD", "frequency": "monthly", "interval_count": 1, "status": "active", "next_billing_date": "2026-04-06", "manage_url": "https://pay.example.com/billing/mgt_abc123" }, "links": { "self": "https://pay.example.com/api/v1/recurring-payments/WOO-SUB-456" } }}Initial payment not found
object
object
Example
{ "errors": [ { "status": "404", "title": "Not Found", "detail": "Payment not found or not successful. A paid initial payment is required." } ]}Validation error
object
object
object
object
Example
{ "errors": [ { "status": "422", "title": "Unprocessable Entity", "detail": "The payment reference field is required.", "meta": { "errors": { "payment_reference": [ "The payment reference field is required." ] } } } ]}