#Tobq
1 messages · Page 1 of 1 (latest)
Hello! I work for stripe - give me a minute to read through your questions
I'd ask chatgpt but it would probably give me incorrect info
So quick question - what specifically are you referring to when you talk about user credentials? I assume this is some concept of "user" in your own database?
yes
A quick solution would be for you to set metadata when you create the Checkout Session with enough data that you can link the session back to your user
oh I could just store the user ID in the metadata
is this advised?
does slack fire the webhook every month when the user gets charged?
What do you mean by slack firing the webhook? Are you using some slack plugin?
i saw in the api docs
one second
@tame moss https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout#provision-and-monitor
Yeah, so we send webhook events to notify you whenever a subscription is renewed, but I'm not sure why you're talking about slack?
gotcha
So yes, we'll send you events every time the user is charged - you'll likely want to look through this list: https://stripe.com/docs/billing/subscriptions/webhooks#events
@tame moss does invoice_paid represent the monthly payment? is it sent on the first payment (when the subscription is setup)?
The invoice.paid event is sent for every successfully paid Invoice - so yes, it'll be sent for each monthly payment as well as the first Invoice that was created when the Subscription was first set up
whats the best way to protect against chargebacks / subscription cancellations
I konw there's invoice.payment_failed
does this cover either of those 2 events?
I guess I should simply assume the subscription is always cancelled - and add a new entry any time a new invoice_paid event comes in
but it would be good to know/show the status of the subscription
@tame moss are any events sent for chargebacks?
There isn't a Subscription-specific event for chargebacks, there's the general charge.dispute.created event (and you'll want to read https://stripe.com/docs/disputes/responding)
I believe there's a dashboard setting you can set so that if a Subscription charge is disputed it automtaically cancels the subscription
Yeah it's here (https://dashboard.stripe.com/settings/billing/automatic) under the "Manage disputed payments" section
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
but I think that wont invalidate the existing month, right?
it will just prevent future charges
I want to prevent people trying to get free usage of my SaaS service
ive heard about peoples nightmares with chargebacks
What do you mean by "wont invalidate the existing month"? It'll cancel the subscription immediately and it would be up to you to listen for the Subscription cancellation event and then immediately revoke their access
but with an actual user cancellation, their current month is still valid - the following months are cancelled
with a charge-back, the current month should be invalidated - as well as future months cancelled
Is there no way for you to revoke access at the time the Subscription is cancelled? That's what I would recommend at least
wdym?
If they cancel a subscription, their payment for the current month will still go through, no?
Their payment for the current month has still gone through but if they've disputed it that means they're going to attempt to get some of those funds back. Through the settings, you have the option of deciding whether you'd like to cancel the Subscription immediately (and no longer give them access), canceling at the end of the current period, or not cancelling at all
It all depends on what specifically you want to do/how your subscrptions work
i mean, if they cancel - not dispute - they will still pay for the current period, right?
Let's back up for a second and approach this a different way since I think we're talking past each other - what specific behavior are you trying to achieve?
user cancel -> continue existing subscription, no more future charges.
user disputes -> cancel existing subscription, no more future charges
@tame moss
Yes, so you can do both of those things:
- user cancel -> Use
cancel_at_period_end: trueto wait until the end of the month to cancel the Subscription - user disputes -> Use the dashboard setting that cancels the subscription immediately
oh
i thought users could cancel directly from stripe
makes sense, i should just cancel on their behalf wiht the at-end-of-period
thanks
👍 happy to help!