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 fills in their card details once; OzuraPay handles every subsequent charge on the schedule you define.
How it works under the hood: When the customer pays, Checkout calls OzuraPay API’s createRecurringPlan endpoint rather than the standard cardSale endpoint. The customer’s card is tokenized by the vault and never stored by 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 (quoted decimals like "9.99"). This matches how OzuraPay API expects them.

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. OzuraPay API combines them and calculates the actual charge ? Checkout does not compute a combined total locally.
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.

Surcharge

Add a credit card surcharge to the recurring charge using surchargePercent. The surcharge is 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)

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.

Full Example

Monthly subscription with a 3% surcharge, 1-month trial, and a 12-cycle cap:

What the Customer Sees

The checkout page displays a Subscription Summary block above the payment form showing:
  • Plan name and description
  • Billing interval and start date
  • Surcharge row (if surchargePercent is set)
  • End date and cycle cap (if configured)
  • Setup fee and trial pricing (if applicable)
The payment form and button are 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. See Payment Links for full details.

Surcharge Reference

surchargePercent is independent of checkoutMode ? it works on standard payment sessions too. 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