Skip to main content

Card Payments — Using Elements

Ozura Elements lets you build a card form that lives on your own page — your brand, your layout — while keeping raw card data completely off your servers. Input fields run inside isolated iframes served from Ozura’s domain. Tokenization happens in the browser; you receive a vault token (and an optional CVC session) that your backend can use to process payment.
Want to skip the client-side integration? If you prefer a fully hosted payment page, see Checkout instead. If you need to tokenize from your backend, see Using the API.

How It Works

Card data travels directly from the browser to the Ozura Vault — your server only ever sees a token.

Install the SDK


Quick Start

1. Get your credentials

Get your Vault API Key from ozuravault.com → your project → Applications. Your first vault project is a test project by default. To create a production project, use the project dropdown in the top-left → Create new project → enable the Production switch.
Test/sandbox vault API key? No pub key needed — you can omit pubKey entirely. Production vault API key? Pass your production pub key as pubKey. Do not hardcode credentials in source code; use environment variables.See Sandbox for how to create a Test project at ozuravault.com and grab a test vault key.

2. Initialize the vault and mount card fields

3. Process the payment on your backend

Your backend receives the token and cvcSession and proxies them to your payment processor:

React Integration

Using React? The OzElements provider and hooks make wiring up card fields straightforward:

Field Validation & UX

Elements fire change events so you can reflect validation state in your UI without ever seeing the raw value:
Elements automatically:
  • Format card numbers as the user types (4111 1111 1111 1111)
  • Validate with the Luhn algorithm
  • Detect card brand and adjust the CVV length (3 digits for most, 4 for Amex)
  • Auto-advance focus from card number → expiry → CVV on completion

Styling

Pass a style option to each element to match your design system. All standard CSS properties for text, color, and spacing are supported:
For a full style reference and appearance theming, see the Elements SDK — Styling guide.

Test Cards

Use these test card numbers during integration: See the full list in Test Credentials.

Next Steps

Elements SDK Reference

Complete API reference — all methods, options, events, and TypeScript types.

Styling & Appearance

Customize fonts, colors, and states to match your brand.

Proxy

Forward the token to your payment processor.

API Reference — Tokenize

Token response shape and all tokenize options.