Skip to main content
Before a customer can pay, you create a “session” that holds all the payment details.

Quick Start (30 seconds)

Create a session and redirect your customer:
Then redirect your customer to the returned checkoutUrl. Done!

The Basics

What’s “your server”? Backend code like Node.js, PHP, Python, Ruby, etc. If you’re using a website builder (Shopify, Wix), check if they offer serverless functions. If you only have static HTML, use Payment Links instead.

Required Headers

Every request needs these two headers:
What’s a header? Headers are extra information sent with your request (like an ID badge). They’re set separately from the request body — see the code examples below.Vault API Key: Developers → Vault Key.Merchant API Key: Developers → API Keys.

Required Fields

Your request body must include these fields:
Why full URLs? Use absolute URLs like https://yoursite.com/success, not just /success. The redirect happens from Ozura’s servers, so we need the full URL to find your website.
*amount is required for standard payments. Accepts string (e.g., "25.00") or number (e.g., 25.00). Not needed when using items or checkoutMode: "donation".

Understanding the Three URLs

These three URLs control where customers end up after checkout.

Quick Summary

successUrl – Your Confirmation Page

Purpose: Where customers land after successful payment to see their receipt/confirmation. When it’s used: After payment is processed and confirmed. What you receive: Transaction details and card info as URL parameters:
See Handle the Payment Result for the full parameter reference.

cancelUrl – Your “Go Back” Destination

Purpose: Where customers return when they don’t complete checkout. When it’s used: Customer clicks “Cancel”, session expires (30 min), or customer visits old/bookmarked checkout URL. What you receive: Nothing – it’s just a return path. Best Practice: Point to your cart page or wherever the customer was before checkout.

errorUrl – Your System Error Handler

Purpose: Handle unrecoverable errors (NOT card declines). When it’s used: Server failures, connectivity issues, authentication errors. NOT for card declines – those show inline messages and let customers retry. What you receive: Error details as URL parameters:

Optional Fields

Common Options

Tax-exempt checkout experience

When taxExempt is false (the default), the customer enters their billing details on the checkout page first — Ozura uses these to calculate sales tax — then continues to the secure payment step. When taxExempt is true, there’s no tax to calculate, so checkout skips the billing-details step and takes the customer straight to the secure payment step — a faster, more direct flow for your customers.
Only set taxExempt: true when the products or customer are genuinely tax-exempt. A tax-exempt session calculates and collects no sales tax. If you mark a taxable order as tax-exempt, no tax is collected and you remain responsible for any sales tax that should have been collected. When in doubt, leave taxExempt as false.

Cart Items (Alternative to Amount)

Instead of a flat amount, you can send an array of cart items for a rich, itemized checkout display.
Limits: Maximum 100 items per cart, maximum cart total: $999,999,999.99. See the full Cart Item Fields section below for all options.

Checkout Modes

Mutual exclusivity rules: - Cannot use amount + items together - Cannot use items + checkoutMode: "donation" together - Cannot use items + checkoutMode: "recurring" — recurring requires a scalar amount - Can use amount + checkoutMode: "donation" (sets the default pre-selected donation amount)
See Donation Mode and Recurring Mode for full guides.

Cart Item Fields

Each item in the items array supports:

Required Fields

Visual Display Fields (Optional)

Pricing & Discount Fields (Optional)

discount object — pass this instead of computing price/originalPrice/discountLabel yourself: When discount is provided, the price field is treated as the original price. Checkout computes the final charge price, sets the strikethrough originalPrice, and generates a discountLabel badge automatically.

Response

What’s Next?

You have a checkoutUrl. Now redirect your customer to checkout.