Commercial Integrations / Stripe
Fundamentals
A closer look at Fundamentals.
What is Stripe?
Stripe sits between your web application, your server, and the card networks: it stores customers and catalog data, runs Checkout or custom payment flows, and notifies your backend through webhooks. This overview maps the main API objects and test environments before you write integration code.
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.
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.