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.
You can also set discount options and metadata and saved-card options inside checkout on this server request. The collector preserves them through address collection. Merchant metadata stays out of browser-facing responses and events; browser preset creates cannot set these options.

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 appearance and locale_default set on your checkout configuration apply inside the embedded collector as the base layer. See Branding and appearance for the configuration fields. The host element supports CSS custom properties for basic visual alignment with your checkout:
Host-element CSS custom properties and any appearance you pass to the element layer over the configuration. Variables override per key. Host rules are emitted after configuration rules, so they win without replacing them. A locale on the element wins over locale_default. branding.display_name, branding.logo, and branding.custom_text are hosted-only. Your page owns its own chrome through the element’s logo, header, and footer slots.
The .TaxSummary and .Error selectors accept only borderColor, borderWidth, borderRadius, padding, and boxShadow. This applies to host-supplied appearance as well as configuration rules: an appearance that sets color on either selector is dropped, so the tax total and validation errors stay legible.

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.