#devparry

1 messages · Page 1 of 1 (latest)

blazing ginkgoBOT
past flume
#

Hi
For each subscription you'll have one upcoming Invoice at the time, so you can refer to the Subscription Id as an Id

warped prism
#

but the problem is invoice.paid event trigger in so many other cases like user payment failed due to card expiration and meanwhile new invoice will generated if we are talking about weekly subscription or daily based subscriptions...

#

then how i can find which invoice status update?

past flume
#

but the problem is invoice.paid event trigger in so many other cases like user payment failed due to card expiration
No, invoice.paid is triggered only if the payment was successful

past flume
warped prism
#

and what about under invoice.updated and invoice.created

past flume
#

when you have invoice.created then there is an upcoming invoice that you need to convert to an invoice.... for invoice.updated you must have an invoice created already.

warped prism
#

so when we fetch list in realtime we have more then 500 subscriptions and under loop

past flume
#

the logic is like this....
You receive an invoice.upcoming event => create an invoice A
invoice.created => match invoice A by its subscriptionID
invoice.update => you have the id here ...

warped prism
#

and our server overload and stoped

warped prism
#

So my question is after this how much time invoice.upcoming event will fire by stripe

#

so that i will modify my code while save and update invoice data ?

past flume
#

the upcoming event is sent one time before the renewal of the subscription.

warped prism
#

okay

#

Could you please also let me know about these parameters

#

Could you please let meaning of these
"number": "CF2B5C78-0036"
"period_end": 1681743176
"period_start": 1681138376

#

as these are always returned under invoice.upcoming

past flume
warped prism
#

so based on this Number we can easliy find the invoice we have to update under the local database. Right ? as it is a unique invoice_prefix

#

?

past flume
warped prism
#

okay let me try this

#

thanks your your helps really appreciate 🙂

past flume
#

Welcome!