Skip to main content
Recurring mode lets you create a checkout session that, on successful payment, automatically enrolls the customer in a billing plan. The customer enters their card details once; OzuraPay handles every subsequent charge on the plan’s schedule.
How it works under the hood: When the customer pays, Checkout enrolls them in a recurring plan through OzuraPay API instead of making a one-time sale. The first charge happens right then, at signup; OzuraPay API runs every later charge on the plan’s schedule. Card details never reach your server.

Enable Recurring Mode

Set checkoutMode to "recurring" and include a recurringConfig object:
recurringConfig is required when checkoutMode is "recurring". Omitting it returns a 400 validation error.

recurringConfig Fields

Required

Optional

All fields below are optional. When omitted, they are not stored on the session and not sent to OzuraPay API — any defaults listed are applied by the OzuraPay API, not by Checkout.
Type note: intervalCount, initialCycles, maxCycles, and maxAttempts must be JSON numbers (not strings). initialAmount and setupFee must be JSON strings with at most 2 decimal places (like "9.99"). This matches how OzuraPay API expects them.

Billing Schedule

The plan’s schedule always starts when the customer completes payment:
  • First charge: at signup, when the customer pays. Checkout shows it as Due today.
  • Every later charge: one billing period after the previous one (interval × intervalCount), at the same time of day. Monthly and yearly plans keep the same day of the month (in UTC); in a shorter month the charge moves to that month’s last day (a plan started on January 31 next charges on February 28, or 29 in a leap year).
For example, a customer who signs up for a monthly plan on October 9 is charged on October 9, then November 9, December 9, and so on. Checkout shows the customer this date before they pay, as Next charge in the order summary and in the subscription notice. It’s calculated the same way OzuraPay API schedules the charge.
startDate doesn’t delay billing. It was never sent to the payment processor, so it never moved the first charge. To give customers a free first period, use initialAmount: "0.00" with initialCycles: 1: nothing is charged at signup, and the regular amount is charged one billing period later. See Trial Pricing.

amount Field

The amount on the session is the standard recurring charge — what the customer is billed on each normal billing cycle.
What gets charged on the first cycle? Checkout forwards amount, setupFee, initialAmount, and initialCycles as separate fields to OzuraPay API, which combines them and calculates the actual charge. Checkout shows the same first-charge amount to the customer as Due today (plus sales tax, see Sales Tax), but the charge itself is always calculated by OzuraPay API. The first cycle is charged at signup.
There is no field called intervalAmount. The field that overrides the billing amount for the first N cycles is initialAmount.
items arrays are not supported for recurring mode. Recurring charges are a fixed scalar amount, not a cart total. Providing items returns a 400 error.

Sales Tax

Unless the session is taxExempt, tax (sales tax in the US; VAT, GST or sales tax in other covered countries) is calculated from the customer’s billing address and added to every charge: the first charge at signup and each later charge. In the order summary, once the customer has entered a complete billing address, checkout shows:
  • Tax and Due today: the exact tax on the first charge and the total charged at signup.
  • *Then Xeverymonth∗∗(ortheplan′sinterval):theregularchargeincludingtoday′stax.Ifintropricingcontinuesaftersignup(‘initialCycles‘greaterthan1),itreads,forexample,∗ThenX every month** (or the plan's interval): the regular charge including today's tax. If intro pricing continues after signup (`initialCycles` greater than 1), it reads, for example, *Then 10.98 every month for 2 more charges, then $109.75 every month, with each amount taxed on its own.
Before the address is complete, the summary reads **X+tax∗∗instead.AX + tax** instead. A 0 first charge shows No tax due today. Each later charge’s tax is recalculated when that charge runs, so it follows any change in tax rates. The subscription notice says so: Amounts include tax at today’s rate; tax is recalculated on each charge. See Sales tax in the order summary for how the address is checked and what the customer sees if it can’t be verified.

Surcharge

Add a credit card surcharge to the recurring charge using surchargePercent.
Hosted payment sessions: when the customer enters their card on the processor’s secure hosted payment page (the default), Checkout doesn’t apply surchargePercent: it’s accepted but ignored, and no surcharge line is shown in the order summary. Any surcharge is applied by the processor on its hosted page, based on how your processor account is configured.
On sessions where Checkout applies the surcharge, it’s shown as a line item in the order summary and forwarded to the payment processor.
  • Accepts a string ("2.00") or number (2.0)
  • Maximum "3.00" (Florida 3% cap)
  • Displayed as a separate line item: Surcharge (2.00%)
  • Applied to the base amount before tax
See Surcharge below for the full reference.

Trial Pricing

Use setupFee, initialAmount, and initialCycles together to offer introductory pricing.

Setup Fee Only

A one-time fee added to the first billing cycle:

Introductory Rate

Override the amount for the first N cycles:

Combined (Setup Fee + Trial)

Sales tax is added to each of these amounts unless the session is tax-exempt — see Sales Tax.

Interval Examples

Use interval alone for standard periods. Add intervalCount to create any custom period — the two fields multiply together.
intervalCount is a JSON number (not a string). "intervalCount": "3" will return a 400 validation error.

Capped Plans

Use endDate or maxCycles to automatically stop billing:
Either field alone is sufficient; you can set both for belt-and-suspenders control. maxCycles counts the first charge at signup, so 12 means the signup charge plus 11 more.

Full Example

Monthly subscription with a $5.00 setup fee, a free first month, a 12-cycle cap, and a 3% surcharge (applied only on sessions where Checkout applies surcharges — see Surcharge):

What the Customer Sees

The checkout page displays a Subscription Summary block above the payment form showing:
  • Plan name and description
  • The regular amount and billing interval (e.g. $49.99 / month)
  • Next charge: the date of the first charge after signup — see Billing Schedule
  • Billing ends and Total cycles (if endDate or maxCycles is set)
  • Intro price (for example $10.00 for the first 3 charges) and One-time setup fee (if initialAmount or setupFee is set). The first charge is the intro price plus the setup fee.
  • Tax, Due today, and Then $X every month — see Sales Tax
  • A surcharge row, only on sessions where Checkout applies surchargePercent — see Surcharge
Above the payment button, a Subscription Notice tells the customer what they’re authorizing after the signup charge: the regular amount on the plan’s interval, starting on the date it first applies. With intro pricing that continues after signup, it names both, for example $10.98 every month for the next 2 charges, starting November 9, 2026, then $109.75 every month starting January 9, 2027. Dates the plan won’t reach (because of endDate or maxCycles) are left out. The payment form and button are otherwise identical to a standard payment session.

Success Redirect

After a successful recurring signup, the customer is redirected to your successUrl with the standard transaction parameters:
planId is not included in the success URL redirect. The OzuraPay API plan ID is part of the raw payment processor response but is not appended to the redirect URL. To retrieve the plan ID for subscription management (pause, cancel, lookup), query the OzuraPay API recurring plan endpoints using your merchant credentials — OzuraPay API associates plans with the merchantRecurringReference or by listing plans for your merchant account.
Create a shareable recurring subscription link:
Post this to POST /api/payment-links/create and share the returned url. Each customer who visits the link and pays is enrolled in their own plan, with a schedule that starts when they pay. See Payment Links for full details.

Surcharge Reference

surchargePercent is independent of checkoutMode — it works on standard payment sessions too. On hosted payment sessions (the default) it’s accepted but ignored; see Surcharge. When Checkout applies it, the surcharge is:
  • Displayed as a line item in the order summary: Surcharge (X.XX%)
  • Applied to the base amount (before tax)
  • Forwarded to the payment processor on every charge (including recurring cycles)
  • Applied to debit cards at the processor’s discretion — OzuraPay API performs a BIN lookup and excludes debit cards automatically where required
Order summary: Subtotal $100.00 + Surcharge (3.00%) $3.00 = Total $103.00