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
SetcheckoutMode to "recurring" and include a recurringConfig object:
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.
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.Surcharge
Add a credit card surcharge to the recurring charge usingsurchargePercent. 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
amountbefore tax
Trial Pricing
UsesetupFee, 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
Useinterval 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
UseendDate or maxCycles to automatically stop billing:
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
surchargePercentis set) - End date and cycle cap (if configured)
- Setup fee and trial pricing (if applicable)
Success Redirect
After a successful recurring signup, the customer is redirected to yoursuccessUrl with the standard transaction parameters:
Combine with Payment Links
Create a shareable recurring subscription link: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
Subtotal $100.00 + Surcharge (3.00%) $3.00 = Total $103.00