#zgr0s_webhooks

1 messages ยท Page 1 of 1 (latest)

fallen iglooBOT
#

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

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

stable trout
#

Hi! Are you just trying to determine which event will conirm for you that you can provision the subsctiption?

true tiger
#

I am trying to increment my users credit everytime the subscription renews.

stable trout
true tiger
#

Thats not really what I want, I want to test the webhook for when a subscription is renewed

#

I need to test this code

if (!isset($invoice['billing_reason']) || $invoice['billing_reason'] !== 'subscription_cycle') {
Log::info('Skipping credit increment: Not a subscription renewal invoice', [
'billing_reason' => $invoice['billing_reason'] ?? 'not set',
'subscription_id' => $invoice['subscription']
]);
return;
}

#

I have Stripe CLI

stable trout
true tiger
#

Let me check those instructions...

stable trout
#

I don't think you can do this with Stripe CLI on its own, but I'm still looking.

#

Are you using Invoices for non-Subscription purposes too?

true tiger
#

I have just run a simulation, but how do i reset it to do another simulation? Do I just click on advanced time (as thats where the button that said 'run simulation' was before) ?

stable trout
#

Did you already advance time?

#

When you run a simulation on a subscription, it appears in the Test clocks tab of the Subscriptions page. You can delete it by clicking Finish simulation. Finishing a simulation deletes all objects associated with it, including the customer and subscription, from the sandbox or test mode. It doesnโ€™t affect live mode.

true tiger
#

Where is the test clocks tab?

stable trout
#

Should be on the Subscriptions page.

#

Did that emit the event you need?

true tiger
#

I need to test it further, i cannot find the test clocks tab can you show a screenshot please

#

my webhook was not fired

true tiger
#

thanks but my webhook was not fired through this simulation

#

shouldn't the simulation fire an invoice successufl payment with a billing_reason of subscription_cycle

stable trout
#

And if you scroll down you can see that it tried but failed to reach your listener.

true tiger
#

oh bare with me ... i had the subscription on set to be cancelled

#

how long will you be here until?

stable trout
#

We are here most times, but closed on the weekend. If this thread closes, you can just create another. ๐Ÿ™‚

true tiger
#

No I dont want to close this thread, it will take forever re-describing everything

stable trout
#

Idle threads get closed, but your old thread(s) will always be available for you (and whoever is helping you from this end)

true tiger
#

i ran a test clock to log if my webhook got fired, and it didnt.

stable trout
#

What's the Subscription ID from that test clock?

true tiger
#

sub_1R437UDtVwE7tlxaefql1sr5

#

when i finish the simulation it seems to delete the customer

#

i need to go have dinner

#

can you let me know why the webhook wasnt fired, im using Laravel 11 with Cashier

#

and why is the customer now deleted after finishing the simulation

stable trout
#

If you scroll down on that page you can see the details.

#

Everything is deleted after the test clock is finished, that's how they work.

true tiger
#

so how can i test my subscription renewal with test clocks if the customer and subscription gets deleted, im not understanding the concept of that

true tiger
true tiger
#

ive updaed my date and time on the webhook server and going to try another simulation

#

It worked thansk !!!

#

sub_1R43JzDtVwE7tlxa4p9u23lU

stable trout
#

Awesome. ๐Ÿ™‚