#tudor_ang

1 messages · Page 1 of 1 (latest)

dark heartBOT
sturdy wedge
#

hello

narrow latch
#

Hello! We can't provide code reviews here, but I'm happy to answer specific questions about specific parts of this code if you have them!

sturdy wedge
#

sure

#

ok so here is my flow on account creation i also create a customer on stripe

#

i am building a saas app where users have premium

#

so on customer.subscription.created i give the user premium

#

but when he renew the subscription what event should i handle?

#

when he pays automaticaly the subscription

#

ps above is my code

narrow latch
sturdy wedge
#

yeah i was there but i am not sure about what to handle

#

so thats why i made this ticket

#

you have some minutes?

narrow latch
#

The ones you listen to depend on your use case, business needs, etc. There's not a general list of ones to listen to that works for everyone.

sturdy wedge
#

i need the event that is triggered with stripe automaticaly charge my clients

#

my product is a subscription that is charged monthly

narrow latch
#

There are several Events you can listen to for that. invoice.paid is one of them, for example.

sturdy wedge
#

ok but if the paymenth fails?

narrow latch
#

A Subscription will generate an Invoice for each period.

sturdy wedge
#

so lets say the user dont have money on card

#

we listen for invoice.payment_failed

#

?

#

right

narrow latch
#

Then you would get invoice.payment_failed, yeah.

sturdy wedge
#

oh awesome

#

and i can trigger this events with a tool somehow?

narrow latch
sturdy wedge
#

awesome

#

thanks for the info man

#

have a nice time