Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.92 KB

Stripe.md

File metadata and controls

40 lines (30 loc) · 1.92 KB

Set Up Stripe Env Vars

  1. Create Products and Pricing in Stripe

    • Go to the Stripe Dashboard.

    • Create a Product:

      • Navigate to Product Catalog > Create Product.

      add product

      • Enter product details (e.g., "Monthly Plan", "Yearly Plan").

      Monthly Plan Yearly Plan

  2. Retrieve Your Product Price IDs

    • After creating products, note the Price IDs (e.g., price_1...) from the pricing section.

      • STRIPE_PRICE_ONE = price_1AbCDeFgHiJkLmNOpQrStUv (Monthly Plan).
      • STRIPE_PRICE_TWO = price_1XyZaBcDeFgHiJkLmNoQrStUv (Yearly Plan).

      price id price id price id price id

  3. Set the Environment Variables Add the following to your .env file:

    STRIPE_SECRET_KEY=sk_test_4eC39HqLyjWDarjtT1zdp7dc
    WEBSITE_URL=http://0.0.0.0:3000
    STRIPE_PRICE_ONE=price_1AbCDeFgHiJkLmNOpQrStUv
    STRIPE_PRICE_TWO=price_1XyZaBcDeFgHiJkLmNoQrStUv
  4. Set the hard coded price values Set the following price values:

    plan_id: Some("price_1QO1"),
    plan_id: Some("price_1QO1"),

Your environment variables are set and ready for Stripe integration.