Configure

Learn how to set up Stripe payments for local development.

Set Up Stripe

Create an account

Sign up for sign in on on Stripe.

Activate test mode

Activate test mode at the top right corner of the dashboard.

Get the Stripe keys

Go to SettingsDevelopers and click Manage API keys.

Copy the Publishable key and paste it beside STRIPE_PUBLISHABLE_KEY in the .env file.

Copy the Secret key and paste it beside STRIPE_SECRET_KEY in the .env file.

.env
STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
STRIPE_SECRET_KEY=your-stripe-secret-key

Install the Stripe CLI

Follow the instructions on the Stripe CLI page to install it.

The Stripe CLI is needed to receive webhook events during local development.

Run the webhook listener:

pnpm stripe

Copy the webhook signing secret from the terminal output and paste it beside STRIPE_WEBHOOK_SECRET in the .env file.

.env
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
Keep the webhook listener running while developing locally.

Environment Variables

.env
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

Next Steps