Frame.js
Frame.js runs in the browser and handles every customer-facing surface that must not touch your secret key. It tokenizes card details before they reach your server, renders Apple Pay and Google Pay wallet buttons, embeds the frameOS onboarding flow inline, and captures Terms of Service acceptance.
The SDK is loaded from Frame's CDN as a single <script> tag — no bundler integration required, and no framework lock-in. It works with any frontend stack: vanilla HTML, React, Vue, Svelte, or anything else that can render a DOM node.
Start here
- Architecture — the 3-actors model: your frontend, your backend, and the Frame API. Read this first; the rest assumes it.
- Installation — drop in the script tag, initialize with your publishable key, switch between sandbox and production.
- Card configurations — compose the Card element with billing address and identity fields.
- Embed onboarding — server-side prep before opening the onboarding component in the browser.
Element reference
The four elements you mount in the browser, plus the Frame entry point that constructs them. Generated from TypeDoc.
- Frame — the SDK entry point.
Frame.init()and the element factories. - Card — encrypted card input, optionally extended with billing and identity fields.
- Embedded Onboarding —
FrameOnboardingcomponent for inline KYC and compliance flows. - Payment Request Button — Apple Pay and Google Pay wallet button.
- Terms of Service — customizable TOS acceptance with a signed token.