Connecting Stripe
Benecaster uses Stripe to process payments — for Listener Support donations (Phase 1) and for subscriber billing if you use the built-in membership system (Phase 2). One Stripe connection covers both. This guide walks through getting your API keys, adding them to Benecaster, and setting up the webhook Stripe uses to notify your site when payments happen.
What You Need
- A Stripe account. If you don’t have one, create it at stripe.com. Use a Business account, not a personal account — this is what processes payments on behalf of your podcast.
- Your Stripe API keys. These are generated inside the Stripe Dashboard and pasted into Benecaster.
- A webhook endpoint configured in Stripe so Stripe can notify Benecaster when a payment succeeds, a subscription renews, or a payment fails.
Getting Your API Keys
- Log in to your Stripe Dashboard.
- In the top-right corner, make sure you’re in Test mode if you’re setting this up for the first time. You’ll switch to live keys when you’re ready to accept real payments.
- Go to Developers → API keys.
- You’ll see two keys:
- Publishable key — starts with
pk_test_(test) orpk_live_(live). This can be shared — it appears in client-side code. - Secret key — starts with
sk_test_orsk_live_. Never share this key. It has full access to your Stripe account.
- Publishable key — starts with
- Copy both keys. Keep them in a password manager or secure document until you paste them into Benecaster.
Adding Your Keys in Benecaster
- In your WordPress admin, go to Benecaster → Settings → Payments.
- Under Stripe, paste your Publishable key and Secret key.
- If you run multiple shows and need separate Stripe accounts per show, you can override the site-wide keys with per-show keys from Benecaster → Shows → [your show] → Payment Settings. For most podcasters, the site-wide keys are all you need.
- Click Save.
Benecaster detects whether your keys are test or live automatically from the key prefix. When test keys are active, a TEST MODE badge appears on all payment-related admin screens — this is intentional and stays visible until you switch to live keys.
Setting up the Webhook
Stripe sends events to your site when things happen — a donation goes through, a subscription renews, a payment fails. Without the webhook, Benecaster doesn’t know payments occurred and can’t take action (updating subscriber status, sending receipts, etc.).
Step 1: Copy Your Webhook URL from Benecaster
Go to Benecaster → Settings → Payments → Stripe. Your webhook URL is shown there:
https://yoursite.com/wp-json/benecaster/v1/stripe-webhook
Copy this URL.
Step 2: Add the Webhook Endpoint in Stripe
-
In the Stripe Dashboard, go to Developers → Webhooks.
-
Click Add endpoint.
-
Paste your webhook URL.
-
Under Events to listen to, select the events Benecaster needs:
For Listener Support donations (Phase 1):
payment_intent.succeeded
If you’re using Phase 2 built-in membership (subscriptions):
customer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
You can select all of these now even if Phase 2 isn’t set up yet — Benecaster ignores events it doesn’t have handlers for.
-
Click Add endpoint.
Step 3: Copy the Signing Secret Back into Benecaster
After saving the endpoint, Stripe shows a Signing secret for it — a string starting with whsec_. This secret lets Benecaster verify that webhook requests actually came from Stripe and weren’t forged.
- Copy the signing secret.
- Back in Benecaster → Settings → Payments → Stripe, paste it into the Webhook signing secret field.
- Save.
Benecaster validates the HMAC-SHA256 signature on every incoming webhook request. Without the signing secret configured, all webhook requests are rejected.
Testing with Test Mode
Before accepting real payments, test the full flow using Stripe’s test environment. With test keys configured:
- No real money moves. All transactions are simulated.
- Test customers and test subscriptions don’t appear in your live Stripe dashboard.
- The TEST MODE badge is visible on all payment screens in Benecaster.
Test cards (use any future expiry date and any 3-digit CVC):
| Card number | What it simulates |
|---|---|
4242 4242 4242 4242 |
Payment succeeds |
4000 0000 0000 9995 |
Payment declined |
4000 0000 0000 3220 |
Requires 3D Secure authentication |
4000 0000 0000 0341 |
Card attaches but a later payment fails — tests what happens during dunning |
Testing webhooks locally: If you’re developing on a local environment, the Stripe CLI can forward webhook events to your local site:
stripe listen --forward-to https://yoursite.local/wp-json/benecaster/v1/stripe-webhook
The Stripe CLI also lets you trigger specific test events: stripe trigger payment_intent.succeeded. This is the recommended approach for local webhook testing.
Switching to Live Mode
When you’re ready to accept real payments:
- In Benecaster → Settings → Payments → Stripe, replace your test keys with your live keys from the Stripe Dashboard.
- In the Stripe Dashboard (Developers → Webhooks), check whether your webhook endpoint is set up under Live mode (not just Test mode). Stripe keeps separate webhook endpoints per mode — you may need to add the endpoint again under Live mode and copy a new signing secret.
- Update the signing secret in Benecaster to match the Live mode endpoint’s secret.
- Confirm the TEST MODE badge no longer appears on your payment screens.
- Run a quick sanity check: place a $1 test donation through your live Listener Support form before announcing it to subscribers.
If You Have a Staging Site
Your staging site is a copy of production, which means your live Stripe keys may be present in the copied database. Always use test keys on staging — see Setting Up a Staging Site for Benecaster for the full staging workflow, including the safety warning that appears if Benecaster detects live keys on a staging site.