#amfpaulo_subscription-lifecycle-webhooks

1 messages ยท Page 1 of 1 (latest)

sand lionBOT
#

๐Ÿ‘‹ 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/1338550946006958230

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

dim zodiacBOT
sand lionBOT
long ore
undone turret
#

SO, not possible to use CLI ?

patent beacon
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needs to go.

We recommend stepping through the full process using the card number provided to ensure you can observe the complete behavior of the subscription process

undone turret
#

Ok, I understand it, however I am trying to be quicker and more objective using Stripe CLI to simulate events. Is there a way for me to test subscriptions failing payments using CLI ?

patent beacon
#

A Subscription does not have failed payments, but Subscription Invoices do have failed payments. It's a minor but important distinction. So, to test this, you would want to trigger the invoice.payment_failed event

undone turret
#

I uunderstand that, this was the test I did , however I noticed thare is a event : customer.subscription.updated, which I though could be part of the process , like, first the invoice payment will fail, and that subscription would be updates to past due or something, eventually if payment fails x times, the subscription would be updated to "canceled" .... I could not find this flow on the documentation

patent beacon
#

That is because the CLI is not intended to test complete flows

#

It is intended for simple, basic approaches

#

and doesn't include all events

undone turret
#

This is a simple flow from my perspective

#

Ok, got it

#

Can you tell me where can I find the subscription fail flow ?

#

like, invoice fail -> sub updates, etc

patent beacon
#

I just told you. Build it and test it manually

undone turret
#

Let me change my question

#

After Invoice Payment Fail, what is the next event stripe fires ?

patent beacon
#

There isn't a specific or guaranteed order to events. It is all highly dependent on your account settings and integration. Trying to build a checking system relying on CLI-triggered webhook events is a very bad idea for this reason.

I recommend you script scenarios instead, like using Test Clocks with Subscription & Customer objects to create a simulation of the behaviors you are trying to test for.

undone turret
#

if the invoice is related to a subscription

#

Ok, no problem, I'll try use the clock thing

#

I appreciate your help. thank you