Stripe integration
Connect your Stripe account to sell subscriptions and pay-per-view on your website and apps. You add your Stripe keys yourself in Bamboo, and payments go straight to your Stripe account. Bamboo doesn't take any fees.
In this article:
- Before you start: set up your domain
- Choose Stripe as your payment gateway: and set your currency
- Add your Stripe API keys: Publishable Key and Secret Key
- Set up the Stripe webhook: so Bamboo knows when a payment goes through
- Events to select: the 7 events Bamboo uses
- Test mode: try purchases before going live
Before you start
Your Stripe webhook needs your site's own address. Before you set up Stripe, add a domain to your site in Domain & Access: either a Bamboo domain or your own custom domain. Learn more: Domains
Choose Stripe as your payment gateway
- Go to Monetization โ Payment Gateways.
- Under Payment Gateway, choose Stripe. Only one gateway can be active at a time.
- Under General, choose your Currency.

Add your Stripe API keys
- In your Stripe Dashboard, go to Developers โ API keys.
- Copy your Publishable key and Secret key.
- In Bamboo, paste them into Publishable Key and Secret Key under Stripe Live Keys.

Tip: Stripe shows a secret key only once. Save it somewhere safe. If you lose it, create a new one in Stripe and click Replace in Bamboo to update it.
Set up the Stripe webhook
The webhook tells Bamboo when a payment succeeds or fails, a subscription renews or ends, or a payment is refunded, so your viewers get the right access right away.
-
In your Stripe Dashboard, go to Developers โ Webhooks.

-
Click + Add destination.

- Select the 7 events below, one by one.
-
Choose Webhook endpoint and click Continue.

- In Endpoint URL, enter your site's domain followed by /api/purchasecallbackstripe, for example https://yoursite.com/api/purchasecallbackstripe.
-
Save the webhook, then open it and copy its Signing secret (it starts with whsec_).

- In Bamboo, paste it into Webhook Signing Secret.
Events to select
- payment_intent.succeeded: completes a one-time purchase and gives the viewer access.
- payment_intent.payment_failed: marks a payment as failed.
- invoice.paid: starts a subscription and extends it on each renewal.
- invoice.payment_failed: handles a failed subscription renewal.
- customer.subscription.updated: handles a cancellation at the end of the billing period, or undoing one. Access continues until the period ends.
- customer.subscription.deleted: the subscription has ended, so access is removed.
- charge.refunded: handles a refund.
Important: don't choose Select all events. Bamboo only handles the events above. If Stripe sends events Bamboo doesn't use, Stripe keeps retrying them, may email you about failures, and can eventually turn off your webhook.
Test mode
Want to try purchases before you go live? Turn on Enable Test Mode and add your Stripe test keys under Stripe Test Keys: the Publishable Key, Secret Key, and Webhook Signing Secret from Stripe's test mode. Set up a test webhook the same way, and paste its signing secret into Webhook Signing Secret (Test).
While Test Mode is on, Bamboo uses your test keys. Turn it off to start taking real payments with your live keys.

Learn more: PayPal integration ยท Monetization: Ads, Pay-Per-View & Giving



