payments billing⏱10 minutes
Get Started with Stripe
UnverifiedQuick Summary
“Financial infrastructure for the internet”
Best for: Developers building payment flows, SaaS billing, marketplaces, and e-commerce platforms
Time to first integration: 10 minutes
📋Prerequisites
- ✓Node.js 18+ installed
- ✓A Stripe account — sign up here
- ✓An existing project (Next.js, React, or Node.js recommended)
Setup Steps
4 steps1
1
Install
Add the Stripe Node SDK to your project.
bash
npm install stripe2
2
Add your secret key
Set your Stripe secret key as an environment variable (from the Stripe dashboard).
bash
STRIPE_SECRET_KEY=sk_...3
3
Create a payment
Initialize the client and create a Checkout Session or PaymentIntent.
typescript
import Stripe from 'stripe'
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY)
const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items: [{ price: priceId, quantity: 1 }],
success_url: successUrl,
cancel_url: cancelUrl,
})4
4
Handle webhooks
Verify webhook signatures to confirm payments server-side.
typescript
const event = stripe.webhooks.constructEvent(body, signature, webhookSecret)Related Guides
Setting up a full stack? Check out these complementary guides.