#mxd
1 messages · Page 1 of 1 (latest)
Hi there
hi
You want to provision access for a paid Subscription?
Yes, and Ive been led to webhooks, and now Im staring at a huge list of events, and I am unsure which one I really need
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Got it. You want customer.subscription.updated
https://stripe.com/docs/billing/subscriptions/webhooks will give you info on each of the different Sub webhooks
But you basically want to use customer.subscription.updated and examine the Sub's status in that Webhook in order to provision
When the status is active then that means the most recent invoice was paid
Otherwise, it will be something like past_due, which means payment failed.
And the other status will depend on how you have your Billing Settings set at https://dashboard.stripe.com/settings/billing/automatic for when all retries fail
whoa
ok, so am I creating a table that references the logged in user, and storing those event statuses in that table?
and thats how to provision the access?
You would store the status of the Subscription, yes.
like table membership, active = 1 or 0 <-- something like that?
This is mostly up to you but I'd likely use an Enum like we do with our Sub status's instead of a binary like that
ok so, the webhook can control all of that, thats basically its function to flip the statuses
just confirming
That is one way to look at it, yes. I would more say its function is to inform you of events that occur, and then you take action based on those events (like provisioning access or removing access).
But we are mostly saying the same thing
And using Webhooks is the proper way to handle provisioning, yes.