Stripe provides two environments for your integration:
- Test – Use for development and testing. No real charges are made.
- Live – Use for production. Real payments are processed.
Toggle between Test and Live in your Stripe integration settings before entering your API keys.
Adding Your Stripe API Keys #
To activate your Stripe integration, you need both keys from your Stripe Dashboard:
Live Stripe Publishable Key #
- Go to Stripe Dashboard → Developers → API Keys
- Copy your Publishable key (starts with
pk_live_) - Paste it into the Live Stripe Publishable Key field
Live Stripe Secret Key #
- In the same API Keys section, click Reveal live key
- Copy your Secret key (starts with
sk_live_) - Paste it into the Live Stripe Secret field
Important: Never share or expose your secret key publicly.
Setting Up Webhooks #
Webhooks allow Stripe to notify your application when events occur (e.g., successful payments, failed invoices).
Step 1: Copy Your Webhook URL #
Copy the Webhook URL displayed in your integration settings. This is the endpoint Stripe will send events to.
Step 2: Create Webhook in Stripe Dashboard #
- Go to Stripe Dashboard → Developers → Webhooks
- Click Add endpoint
- Paste your Webhook URL into the Endpoint URL field
- Click Select events
Step 3: Select Required Events #
Select the following events for your webhook:
- invoice.payment_failed – Triggered when an invoice payment fails
- invoice.payment_succeeded – Triggered when an invoice is successfully paid
- payment_intent.succeeded – Triggered when a payment is completed successfully
- payment_intent.payment_failed – Triggered when a payment attempt fails
Step 4: Add the Endpoint #
- After selecting events, click Add events
- Click Add endpoint to save
- Copy the Signing secret (starts with
whsec_) and add it to your integration settings if required
Testing Your Integration #
Use Stripe’s test cards to verify your integration before going live. Switch to Test environment and use test API keys during development.
