#soumit_webhooks

1 messages ยท Page 1 of 1 (latest)

rough kelpBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1301641257407352904

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

abstract runeBOT
fast kayak
mellow robin
fast kayak
#

So lets say a subscription is up for renewal, can I safely assume that
customer.subscription.updated will always be sent before invoice.paid

mellow robin
#

No, you should never assume you'll receive Events in a particular order.

fast kayak
#

So, lets say that I didnot receive this customer.subscription.updated webhook, and i received the invoice.paid, so do you suggest to call subscription show api to look up for the current_period_end key

mellow robin
#

Yup, exactly.

fast kayak
#

Great, thanks for the help

mellow robin
#

Any time!

fast kayak
#

@mellow robin just a last question, assuming that I received the payment_intent.created event, before receiving any invoice.xxx event, so do you suggest to fetch the invoice, using payment_intent.created's invoice_id ?

mellow robin
#

Yup, exactly. The Payment Intent object in the Event should include an invoice field, which will contain the ID of the associated Invoice object if the Payment Intent is associated with an Invoice.
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-invoice

If you haven't already received the associated Invoice Event to capture the Invoice ID and details, then you can use the ID in the invoice field on the Payment Intent to retrieve the Invoice object and get its current state.

fast kayak
#

thanks for the help @mellow robin

mellow robin
#

Can you share the error, or what you're referring to by payload?

fast kayak
#

can you open that thread again, will share it over there

mellow robin
#

Sorry, we typically don't reopen threads. You can share those details here

fast kayak
#

req_0ySsoudBCGSwrG

mellow robin
rough kelpBOT