Secret keys are server only. If a secret key reaches a browser bundle, rotate it immediately from the dashboard.
Live and test are hard separated
A live key cannot touch a test rail and a test key cannot touch a live rail. This is enforced server side rather than left as advice, so a misconfigured environment fails loudly instead of moving real money.
Checkout sessions
The browser must never hold a secret key, and must never be able to change where money goes. A checkout session is scoped to one funding intent that already exists:
Because the intent exists before the session does, a leaked session token cannot be replayed to create new intents against your destination. It can only complete the one it was issued for.
Wallet app handoff
Mobile flows often jump from a browser into a wallet app and back. Exchanging a short-lived handoff token keeps the long-lived session token out of deep links and app-switch logs:
The SDK does this for you. You only need it if you are building your own checkout.