Skip to main content
Embedded collection keeps the address validation experience inside your checkout. Your server creates an embedded Bridge session with the numeral-tax SDK, and the browser mounts Numeral’s <numeral-checkout> custom element using the returned session capability.
The collector appears inside your page, but its sensitive form runs in a sandboxed, cross-origin iframe served by Numeral. Your page receives state, requirement codes, and tax amounts—not the buyer’s address or tax IDs.

1. Allow your checkout origin

In Developers → Numeral for Stripe Checkout, add the exact origin of your checkout page to Allowed embed origins. For example:
Success and cancel URLs must also use an origin listed under Allowed redirect origins. Click Save and publish after changing either list.

2. Create an embedded session on your server

The Numeral API key stays on your server. Only the session ID and session-scoped client_secret are sent to the browser.

3. Load and mount the collector

Load the versioned element loader once on your checkout page:
Then create the element after your server returns the embedded session:
The element asks only for fields Numeral still needs. After the location is validated and tax is calculated, it redirects the buyer to the prepared Stripe Checkout Session.

Presentation options

Set presentation to control how the collector appears: Use redirect="auto" to continue to Stripe automatically. Use redirect="manual" when your application needs to navigate itself. In manual mode, listen for both redirect paths:
  • numeral-session-created includes detail.url when the session can continue directly to Stripe without collecting more information.
  • numeral-before-redirect includes detail.url after the embedded collector finishes collecting the required information.

Events

The element emits bubbling, composed custom events with redacted details: When using redirect="manual", handle the provider URL from either redirect path:
You can listen for the remaining lifecycle events as needed:

Appearance

The host element supports CSS custom properties for basic visual alignment with your checkout:

Content Security Policy

If your site uses a Content Security Policy, allow Numeral’s loader, collector frame, and client API:
Merge these sources with your existing policy rather than replacing it.

Security checklist

  • Create Bridge sessions only from your server.
  • Never expose a Numeral sk_test_... or live secret key in browser code.
  • Assign clientSecret as a JavaScript property, never an HTML attribute or URL parameter.
  • Do not log or persist client_secret.
  • Allow only exact merchant origins that need to embed the collector.
  • Treat collector events as lifecycle signals; buyer PII is intentionally absent.
  • Reuse an idempotency key only for the same create-session request.