1. Integrate
  2. Payments

Integrate

Payments

Setting up Payments with Stripe

  1. Stripe Setup

    Create a Stripe Account Go to Settings -> Public Details, add your website URL

    • In Settings -> Branding, add your logo & colors
    • In Settings -> Customer Emails, turn on emails for successful payments & refunds
    • In your Settings ->Customer Portal, activate link to customer portal (in case you need later)
    • In the search box, type 'rules' and click [Fraud Prevention > Rules] , make sure the first 3DS rule is enabled. I also turn on the second one (recommended). Make sure to block payments if CVC fails (check below) Turn ON Test Mode.
  2. Getting Api keys & Testing

    • Create a new product and copy the product ID and price ID to .env.local for one-time payments or into /pricing/pricing_plans.ts Navigate to Developers, copy your public & private keys and add them to PRIVATE_STRIPE_API_KEY & PUBLIC_STRIPE_KEY in .env.local
    • To set up the webhook locally, follow the steps in -> Developers -> Webhook, After login to Stripe CLI, use this command to forward webhook events to our API: terminal
            stripe listen --forward-to localhost:1573/api/webhooks/stripe
    
          

    Copy the signing secret and add it to PRIVATE_STRIPE_WEBHOOK_KEY in .env.local