Recurring Payment
Set up subscription plans that auto-generate and auto-bill orders on a schedule. Define billing cycles with custom intervals, handle proration for mid-cycle starts, and configure retry logic and grace periods for failed payments. The system handles the calendar — you define the rules.
Workflow
The recommended order of operations to set up and run a subscription.
-
Create a customerAPI . You need the
customer_uuidto bind the plan. -
Create a recurring itemAPI with
label,priceandcurrency. Items are reusable across plans. -
Create a recurring billing configAPI to define the billing rhythm -
billing_interval,interval_countandbilling_proration_enabled. -
Create a recurring planAPI to bind the
customer,billing config,item, andretry settingstogether. Define multiple cycles — like a free trial followed by paid billing — in one API call. -
Share the
recurring payment linkfrom the recurring plan's first order with the customer. The customer completes the first payment, and their card is automatically saved as apayment_token. -
The system auto-generates and auto-bills a new
recurring orderon each billing date using the saved token. Query plan lever ordersAPI or individual recurring orderAPI through the API.
Adding cycles mid-planAPI: Use the Add Plan Cycles API to upgrade, downgrade, or extend a plan. Choose immediate (start now, cancel active cycles), next_billing_date (start on the next billing date), or as_last_cycle (append to the end).
Recurring item
A recurring item is a product or service that will be billed on each cycle. Items are created once and can be reused across multiple plans.
| Field | Required | Description |
|---|---|---|
| Reference_id | No | Your external reference ID for this item. Use it to map with your inventory or product system. |
| Label | Yes | The product name displayed to the customer. |
| Price | Yes | The billing amount for this item per cycle. |
| Currency | Yes | ISO currency code. Must match your business configuration. |
| Description | No | Internal note or description for this item. |
Recurring billing config
A billing config defines the rhythm and rules for when invoices are generated. Configs are reusable — create one and assign it to multiple plans.
| Field | Required | Description |
|---|---|---|
| Billing_interval | Yes | The fequency:daily,weekly,monthly ,yearly. |
| Interval_count | Yes | Number of intervals between billings. interval_count = 1 + monthly = every month. interval_count = 3 + monthly = every 3 months. |
| Billing_type | Yes | 1. automated: start date = the date the plan is created. 2. customized: use billing_month and billing_day_of_month to set the billing date. Customized only works with monthly/yearly intervals. |
| Billing_month | No | Only applicable when billing_type = customized and billing_interval = yearly. |
| Billing_day_of_month | No | Only applicable when billing_type = customized.If the month doesn't have that day, the last day of the month is used (e.g. 31st → 28th/29th/30th). |
| Billing_proration_enabled | Yes | If true, partially completed billing periods are prorated. If false, the full amount is charged regardless of when the subscription starts within a cycle. |
| Description | No | Internal label for this config. |
Proration example: A customer subscribes on 1st May 2026 to a yearly plan with billing_month = 3 and proration enabled. They are billed for the period 1st May 2026 – 1st March 2027 (304 of 365 days). The next billing date is 1st March 2027 at the full annual rate.
POST /svc/payment/api/v1/openapi/recurring_payments/billing_configs
{
"config": {
"billing_interval": "monthly",
"interval_count": 1,
"billing_type": "automated",
"billing_proration_enabled": true,
"description": "Monthly billing - prorated first cycle"
}
}
Recurring plan
A plan binds a customer to a set of items and billing rules. It controls how payments are collected and what happens when a charge fails.
| Field | Required | Description |
|---|---|---|
| Name | Yes | The plan name. |
| Reference_number | Yes | Your reference. All orders generated by this plan receive the same reference with an incremental suffix. |
| Customer_uuid | Yes | The customer assigned to this plan. The customer's saved payment token will be used for automatic charges. |
| Default_collection_method | Yes | Currently only charge_automatically is supported — the system auto-charges the saved payment token on each billing date. |
| Payment_retry_count | Yes | How many times to retry a failed payment before giving up. |
| Payment_retry_day_period | Yes | How many days to wait between retry attempts. |
| Grace_period | No | Days after the final failed retry before the system permanently voids the recurring order. If null, the order is never auto-voided. |
| Callback_url | No | Webhook URL for plan and order state changes. |
| Redirect_url | No | Where to redirect the customer after completing the first order's payment. |
| Note | No | Notes applied to all recurring orders created by this plan. |
| Description | No | Internal remark about this plan. |
Recurring cycle
An ordered list of billing phases within a plan. Each cycle has its own billing config, items, and duration — cycles execute sequentially, one after the other (e.g. a 1-month free trial cycle followed by an indefinite annual cycle).
| Field | Required | Description |
|---|---|---|
| Previous_cycle | Output | The unique identifier (ID) of the previous cycle. |
| Next_cycle | Output | The unique identifier (ID) of the next cycle. |
| Estimated_start_date | Output | The estimated cycle start time. |
| Start_date | Output | The actual cycle start time. |
| Estimated_end_date | Output | The estimated cycle end time. |
| End_date | Output | The actual cycle end time. |
| Next_execute_time | Output | The next billing date time. |
Multiple cycles in one plan: You can define multiple cycles when creating a plan. Example: cycle 1 = free trial (1 month, 0 billing amount), cycle 2 = annual paid (12 months, full price). Cycles execute sequentially — the next one starts when the previous one completes.
Examples
| Scenario | Billing interval | Interval count | Billing type | Extra | Result |
|---|---|---|---|---|---|
| Monthly subscription | monthly | 1 | automated | - | Billed on the same day each month. |
| Quartely billing | monthly | 3 | automated | - | Billed every 3 months. |
| Ann ual plan, fixed month | yearly | 1 | customized | billing_month = 3 | Billed every March 1st |
| Annual plan, fixed date | yearly | 2 | customized | billing_month = 3, billing_day_of_month = 5 | Billed every 2 years on March 5th. |
| Weekly, every 2 weeks | weekly | 2 | automated | - | Billed every 2 weeks. |
Related APIs
Define a recurring product with a label, price, and currency. Items are reusable — create once, reference in multiple plans.
Define a billing schedule with interval, count, billing type, and proration settings. Configs are reusable across plans.
Create a recurring plan with customer, billing config, items, and retry settings. Define multiple cycles in one call. The response includes a current_payment_link to share with the customer for the first payment.
Get itemsAPI
Get billing configsAPI
List all recurring items or billing configs. Use the Advanced query DSLDOC for filtering and pagination.
Delete an itemAPI
Delete a billing configAPI
Remove an item or billing config. Ensure no active plan references the resource before deleting.
Get recurring plansAPI
Get a recurring planAPI
List all plans or get a single plan by ID. The response includes the plan details, active cycles, current order, and linked customer.
Add new cycles to an existing plan (upgrade/downgrade/extend). Choose immediate, next_billing_date, or as_last_cycle activation timing.
Cancel all active cycles of a plan. Choose immediate or next_billing_date. Optionally refund remaining credit.
Get plan ordersAPI
Get a recurring orderAPI
Query all orders generated by a plan, or get a single recurring order by ID. Use the Advanced query DSLDOC for filtering.