Card tokenization & 3DS
Time: ~20 minutes | Difficulty: Intermediate | Type: part of ExamplesFinished project:
core-js-tokenization. Clone it if you want the working demo first — or keep reading to understand each hop of the flow.The flow — who runs what
The whole point of this example is the client / server split. Raw card data stays in the browser; your API key stays on the server. Four hops:Run it
http://localhost:5173, paste a store id, and use a sandbox test card. The right-hand sidebar keeps a history of tokens and store ids in localStorage so you can replay flows quickly, and a failed 3DS can be retried from the beginning.
The minimal variant
core-js-card-payment is the same flow with everything non-essential removed: one page, one card form, one charge, plus a /return route that shows how to resume after a processor redirect. Read core-js-tokenization to learn; copy core-js-card-payment when you just want the skeleton.
Next
Finished project on GitHub
Clone
core-js-tokenization and watch every hop in the UIApple Pay & Google Pay
Same charge path, wallet buttons instead of a card form
core-js reference
The full API this demo is built on — every endpoint, every field
Sandbox testing
Test cards, forced 3DS, simulated declines
