#zgr0s_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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.
Hi! Are you just trying to determine which event will conirm for you that you can provision the subsctiption?
I am trying to increment my users credit everytime the subscription renews.
Here is the code to handle this https://codeishot.com/lKzi1f7A
Gotcha. We have details related to provisioning for paid/unpaid invoices here: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=stripe-hosted#provision-and-monitor
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
Best way to test this will probably be with Test Clocks: https://docs.stripe.com/billing/testing/test-clocks/simulate-subscriptions
Let me check those instructions...
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?
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) ?
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.
Where is the test clocks tab?
I need to test it further, i cannot find the test clocks tab can you show a screenshot please
my webhook was not fired
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
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
And if you scroll down you can see that it tried but failed to reach your listener.
oh bare with me ... i had the subscription on set to be cancelled
how long will you be here until?
We are here most times, but closed on the weekend. If this thread closes, you can just create another. ๐
No I dont want to close this thread, it will take forever re-describing everything
Idle threads get closed, but your old thread(s) will always be available for you (and whoever is helping you from this end)
i ran a test clock to log if my webhook got fired, and it didnt.
What's the Subscription ID from that test clock?
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
https://dashboard.stripe.com/test/events/evt_1R4392DtVwE7tlxaHdbqBPmj Stripe attempted to reach your webhook but your webhook returned a 403.
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.
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
ok i think my WSL2 date time is out of sync
can you let me know this
ive updaed my date and time on the webhook server and going to try another simulation
It worked thansk !!!
sub_1R43JzDtVwE7tlxa4p9u23lU
Awesome. ๐