All templates

Stripe Starter

Tags:

Built with:

npm create convex -- -t get-convex/convex-stripe-demo

This example app demonstrates how to integrate Stripe, the payments platform, with Convex, the backend application platform. We keep track of payments in Convex and fulfill orders when they're confirmed by Stripe.

You can test the payment flow end to end using Stripe's test card numbersTo test the payments flow, follow these steps:

  1. Sign up for Stripe for free at https://stripe.com/
  2. Install the stripe CLI
  3. Runstripe listen --forward-to localhost:5173/stripe
  4. Copy the "Your webhook signing secret" from the output of the listen command, and set it as STRIPE_WEBHOOKS_SECRET environment variable on your Convex dashboard
  5. Copy your test secret API key from the code example on https://stripe.com/docs/checkout/quickstart and set it as STRIPE_KEY environment variable on your Convex dashboard

You can then use the test credit card details to go through the payment flow, see https://stripe.com/docs/checkout/quickstart#testing

Template hero image