- Documentation
- Premium roles
- Sources
Connecting Stripe
Sell a subscription without writing a line of code.
Bao can read Stripe events directly. No API key is needed: everything comes from the event's content.
Setting up
- In the Bao dashboard, enable the Stripe source and copy the webhook URL it offers.
- In Stripe, create a webhook endpoint pointing at that URL.
- Copy the Stripe signing secret (
whsec_...) and paste it into Bao. It is stored encrypted, never shown again in the clear. - Choose a default tier.
What Bao does with the events
| Stripe event | Effect |
|---|---|
checkout.session.completed | Opens the entitlement |
customer.subscription.deleted | Removes the entitlement, after the grace period |
customer.subscription.updated (non-active status) | Same |
Who receives the role
Stripe does not know Discord IDs. Two cases:
- You put the Discord ID in
metadata.discord_idat checkout: the role is granted immediately. - You do not: Bao creates a pending entitlement, attached to the buyer's email. They collect it through claiming in Discord.
Choosing the tier
Set metadata.tier to the tier's key. Failing that, Bao applies the default tier you chose.
One-off payment
A checkout in payment mode (rather than subscription) grants lifetime access: the role is never removed automatically.