Your own Stripe checkout
Already sell with Stripe Payment Links or subscriptions? Give buyers access to an invite-only script from your own Stripe account's webhook.
If you already sell with your own Stripe account (Payment Links, a Checkout page on your site, subscriptions), your buyers can get your invite-only script automatically. Stripe tells ChartDeck about each payment through a webhook you add in your own Stripe Dashboard. ChartDeck never gets an API key for your account and never calls Stripe. It only reads the events you send. It takes no cut.
To sell inside ChartDeck instead, with prices on the script's card, see Selling access.
#Set it up
- In ChartDeck, open Account → Selling & access → Integrations and choose Stripe (your own account). ChartDeck shows a webhook URL made for this connection, like
https://chartdeck.trade/api/integrations/stripe/hook/…. Treat it like a password. - In your Stripe Dashboard, open Developers → Webhooks → Add endpoint (in newer dashboards: Workbench → Webhooks → Create an event destination, your account, webhook endpoint). Paste the URL and select these events:
checkout.session.completedcheckout.session.async_payment_succeededinvoice.paidcustomer.subscription.updatedcustomer.subscription.deletedcharge.refundedcharge.dispute.created
- Open the new endpoint, reveal its Signing secret (it starts with
whsec_), and paste it into ChartDeck under Update credentials. - Map what you sell to your invite-only scripts:
- a Price ID (
price_…, from the product's page in Stripe) for subscriptions and invoices, and/or - a Payment Link ID (
plink_…, from the Payment Link's page) for one-off sales. Prices and Payment Links that ChartDeck has already seen in your events show up as choices.
- a Price ID (
#Pending until the first event
ChartDeck has no key to test your secret with, so the connection says Waiting for the first event until Stripe sends one that is correctly signed. Then it turns Active. To check it straight away, use Send test event on the endpoint in Stripe. A test event only activates the connection, see Test mode.
#What gives and removes access
| Stripe event | What happens |
|---|---|
invoice.paid | Each mapped price on the invoice gives access. For a subscription, access runs to the end of the paid period plus 3 days for payment retries. Each renewal extends it. |
checkout.session.completed (paid), checkout.session.async_payment_succeeded | A paid checkout through a mapped Payment Link gives access. Unpaid sessions (a bank debit still processing) wait for the second event. |
customer.subscription.deleted, or customer.subscription.updated to unpaid, canceled or incomplete_expired | Access from that subscription ends (after the grace days you set on the mapping). |
charge.refunded (full refund) | Access from that payment ends at once. For a subscription payment it ends the subscription's access. A partial refund changes nothing. |
charge.dispute.created | Access from that payment ends at once. |
The term rule on the mapping still applies. While a member (here: while they keep paying) is the usual choice for subscriptions. A Fixed term (for example lifetime for a one-off Payment Link) gives that term on each purchase. A full refund or a dispute ends a while-a-member claim, and it also takes back a fixed term that payment gave, unless the member has access another way (another purchase, a role you gave them, or access you added by hand).
Every event is applied once, however often Stripe delivers it.
#How buyers get their access
Your Stripe customers are yours, so ChartDeck never matches them to ChartDeck accounts on its own:
- The first time a customer pays, ChartDeck keeps the purchase waiting for them. ChartDeck sends no email for your own Stripe: it can't read your Stripe account to confirm a payment, so it never mails an address on your word.
- The buyer signs in to ChartDeck (or creates a free account) with the same email address they paid with and confirms it. The purchase then shows under Account → Connections, and access turns on when they press Claim. A buyer who uses another address can get in with an access code you give them.
- After that, the same Stripe customer's renewals and other purchases on this connection go to the same member.
ChartDeck never tells you, or anyone, whether an email address has a ChartDeck account. A waiting purchase can be claimed for 30 days.
#Test mode
The first event sets the connection's mode. Once it has received a live event, test-mode events are ignored (the event log says so), so a test can never give or take real access. To try it out first, point a test-mode endpoint at a separate connection.
#Good to know
- Stripe events don't name the account they came from, so the connection is identified by its own URL and secret. To use two Stripe accounts, make two connections.
- Payments made before you connected are not imported. Only new events count.
- Disconnecting ends all the access this connection gave. Remove the endpoint in Stripe too. Access you gave in other ways is never touched.