#Robert-Ibracadabra - invoice.paid

1 messages ยท Page 1 of 1 (latest)

brave arch
#

Can you clarify what you mean when you say you are calling the webhooks directly?

#

I think invoice.paid should be getting triggered here so I am trying to think of what might be happening

ebon nexus
#

I am making a payment on a subscription in the Stripe Dashboard.

#

and that way the invoice.payment_succeeded gets triggered

#

And so I have a peace of mind ๐Ÿ™‚ can you please confirm that invoice.paid and customer.subscription.updated webhook events are enough to handle all subscription cases?

agile latch
#

Can you share the example invoice.payment_succeeded event?

#

There should absolutely be an invoice.paid event in that case, i can try to help you find it

ebon nexus
#

ok just a sec

#

I do the following to trigger payment succeeded via Dashboard

#

I create a new payment

#

Recurring

#

on a specific customer

#

with a product

#

and start the test subscription

agile latch
#

Sure, when you have it please share the event id like evt_123

ebon nexus
#

yes a sec

#

I have alot

#

I will share one

#

a sec

#

for example: evt_1KyZvfIAxCT2YDDaMoBvUYPy

#

Well

#

I am stupid

#

I did not have

#

the invoice.paid

#

added to the events to be sent

#

from the webhook :X sorry ๐Ÿ˜ฆ

#

sorry

#

Ok this is ok, so just to confirm once again

#

invoice.paid and customer.subscription.updated

#

are enough to handle all cases from subscriptions?

#

And wouldn't the customer.subscription.updated be triggered by the invoice.paid event?

agile latch
#

the events aren't triggered by each other, but they happen from related things in the processing of your subs/invoices

#

but great you got it figured out ๐Ÿ˜„

ebon nexus
#

Well sorry ๐Ÿ˜ฆ

#

So then

#

I would like to see it confirmed by you that those events are enough ๐Ÿ˜„

#

invoice.paid and customer.subscription.updated

#

so I can go to sleep soundly at night

agile latch
#

If it gets you what you need, its enough! it depends on what you need ๐Ÿ™‚

#

But generally those are the most commonly used ones, yes, to track subscription renewals

#

you might also want invoice.payment_failed to handle payment failure & recovery, but as i said thats up to you

ebon nexus
#

so can I use for example

#

only

#

invoice.payment_failed

#

and invoice.payment_succeeded?

#

or can I check the failed event on invoice.paid?

#

I mean if a payment failed do I still get invoice.paid with subscription on incomplete?

agile latch
#

no, if the payment fails you wont get invoice.paid, because the invoice wont transition to paid

ebon nexus
#

so I need: invoice.payment_succeeded, invoice.payment_failed and customer.subscription.updated

#

Oh and in case of canceling a subscription the delete event is triggered?

#

I am asking because I did not receive the cancel event on customer.subscription.updated

agile latch
#

Correct, if you also want the cancelations you need that

ebon nexus
#

Ok, I see I am unsure of how to handle the incomplete phase yet with firebase but I need to give it thought ๐Ÿ˜ฆ

#

I have a day leeway for subscription end

#

But I presume if the monthly cycle arrives and webhook is triggered and payment fails

#

It will put the subscription in incomplete status

#

and after the last retry is made

#

then it will arrive to past_due or incomplete_expired

#

is the above correct :)?

#

I am sorry for the repeated questions but this is my first time implementing with Stripe, and I am hoping that It will be a success ๐Ÿ˜„

agile latch
#

Which particular flow/case are you trying to track? The expiry before it completes?

#

That would be an update event on the subscription, then

ebon nexus
#

I am tracking 3 things in Firestore

#

per customer

#

subid

#

expiry

#

status

agile latch
#

Sure, but break it down. you have some flows covered

#

which ones are you trying to get coverage for now?

ebon nexus
#

Well with the success I dont think I will have much issues because on that if i have status paid then I would update the subscription on the user.

#

On the invoice.payment_failed I will have an issue because I think I will receive

#

incomplete status

#

in case the payment is not yet made

#

at the end of the subscription cycle

#

Oh

#

I think you just answered

#

my question

#

I can let the subscription

#

to be active even incomplete status

#

if the expiry time is not yet reached

agile latch
#

once active you would not go to incomplete_expired

#

if you start as incomplete (depends on your flow) then that either goes to active or incomplete_expired

ebon nexus
#

i think i dont allow incomplete payments

#

option is not ticked

#

so after active

#

on failed retry

#

what status do i get then?

#

if allow incomplete is not on then the subscription fails automatically?

#

and i get past_due?

agile latch
#

That depends on your settings in the dashboard

#

Manage failed payments

ebon nexus
#

Oh yes so I can mark the subscription as unpaid that would mean payment_failed webhook or i could cancel that would mean delete webhook

#

so that means my leeway time for the user should be atleast 3 days

#

if the status remains incomplete

#

And with Smart Retries even less leeway

blazing ginkgo
#

๐Ÿ‘‹ stepping in here as @agile latch needs to step away.

#

Is there an outstanding question I can help with @ebon nexus ?

ebon nexus
#

I think @agile latch explained the steps well, I just hope I can manage it ๐Ÿ˜„

#

Thank you very much for your help and time once again!