Tag
express
Published articles tagged express.
Accepting payments with Stripe Checkout
Stripe Checkout hosts the payment UI on Stripe's domain: your server creates a Session, the browser redirects, and webhooks confirm the sale. This runbook wires Checkout into Express for one-time Prices with success and cancel pages.
Custom payment forms with the Payment Element
When Checkout's hosted page is not enough, embed the Payment Element: your server creates a PaymentIntent, the browser mounts Stripe.js UI, and confirmPayment finishes authentication. This runbook compares that path with Checkout for Express apps.
Customers in Stripe
A Stripe Customer is the billing profile for someone in your app: email, metadata, and saved payment methods. This chapter shows how to create customers at signup, map them to your user ids, and save cards for on-session and off-session charges with SetupIntents.
Stripe API keys and the Node.js SDK
Publishable keys belong in the browser, secret and restricted keys stay on the server, and every call goes through a Stripe client instance. This chapter shows how to wire the official stripe npm package into Express, pin an API version, and handle idempotency and errors safely.
Subscriptions in Stripe
Subscriptions bill Customers on a recurring Price, generate Invoices, and change state over time. This chapter uses Checkout in subscription mode, syncs access through webhooks, and touches upgrades, trials, and the Customer Portal.
Webhooks in Stripe
Webhooks deliver signed Event objects when payments and subscriptions change. Your Express handler verifies signatures, stays idempotent, and fulfills orders there—not on the success page. This chapter covers routing, key events, and local testing with the Stripe CLI.