library · inferred from evidence
@stripe/stripe-js
The client-side Stripe JavaScript library for loading Stripe.js.
- Stripe PaymentIntent in Svelte/SvelteKit: stripe-js directly, server route mints the secret
Svelte apps confirm PaymentIntents with stripe-js directly: no wrapper needed. This skill shows the SvelteKit pattern with a server route minting the client secret.
- Stripe PaymentIntent in a React SPA: Elements provider plus confirmCardPayment
In a Vite or Create React App SPA, the backend mints the PaymentIntent and the app confirms the card with Elements. This skill shows the provider setup and the confirm call.
- Stripe PaymentIntent on Next.js App Router: route handler mints the secret, client confirms
The safe PaymentIntent flow keeps the secret key server-side: a route handler creates the intent and returns the client secret, and a client component confirms it with Stripe Elements.