#crawl_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/1435745078181101749
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- crawl_best-practices, 1 day ago, 25 messages
Hello there
You can use test clocks to advance time: https://docs.stripe.com/billing/testing/test-clocks
could you provide, curl example or anything that could help using this ?
is this in the dashboard ?
like how do I simulate a subscription_cycle
using the test clock ?
Yes it is in the Dashboard and there are API snippets at https://docs.stripe.com/billing/testing/test-clocks/api-advanced-usage?dashboard-or-api=api
You create a Subscription and advance time past the renewal date
oh I see,
so i select run sim
then move the sim to past the date, and it should work ?
Yep pretty much
I get this
type: 'StripeRateLimitError',
raw: {
message: 'Test clock advancement underway - cannot perform modifications: clock_1SQEXrLM4GHVXwuALGvVvrOX',
request_log_url: 'https://dashboard.stripe.com/test/logs/req_7rSgngZJTR8q41?t=1762379409',
type: 'invalid_request_error',
headers: {
server: 'nginx',
date: 'Wed, 05 Nov 2025 21:50:09 GMT',
'content-type': 'application/json',
'content-length': '267',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET, HEAD, PUT, PATCH, POST, DELETE',
'access-control-allow-origin': '*',
}
Hi there! I'll be taking over for Bismarck here, who needed to step away
Usually you get that error when you try to modify a subscription or related objects while a test clock is turning its time forward, which can take a few minutes depending on the complexity of the scenario. Could you try again?
so my customer is kinda stuck in the future still
how do I go back to today's date ?
@slate wraith should I delete and start again ?
You can't turn a test clock back in time; you should start over
ah okk
@slate wraith
Ngl I have a hard time with this clock feature, is this stable ?
I just advanced for 1month, on a trial subscription monthly
and now it says that my next invoice is next year in. 2026
acct_1MVFwmLM4GHVXwuA/test/customers/cus_TMzAwJa7S1Vll3
Should be; I use it all the time. Can you share your exact Subscription?
the id - sub_123
let me try again once more
@slate wraith
cus_TMzLRmhlDj9Lhr
sub_1SQFN3LM4GHVXwuATAJecUls
$21.98 on Dec 5 next invoice
now I'm advancing for 1 month
and stripe webhook
2025-11-05 17:43:06 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFPxLM4GHVXwuAC4SYBUry]
2025-11-05 17:43:06 --> test_helpers.test_clock.created [evt_1SQFPyLM4GHVXwuACfwC5n1f]
2025-11-05 17:43:06 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFPyLM4GHVXwuACfwC5n1f]
2025-11-05 17:43:08 --> invoice.upcoming [evt_1SQFQ0LM4GHVXwuA7jZZ8wyz]
2025-11-05 17:43:08 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFQ0LM4GHVXwuA7jZZ8wyz]
2025-11-05 17:43:09 --> customer.subscription.trial_will_end [evt_1SQFQ1LM4GHVXwuAXkp5aR4O]
2025-11-05 17:43:09 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFQ1LM4GHVXwuAXkp5aR4O]
2025-11-05 17:43:11 --> invoice.created [evt_1SQFQ3LM4GHVXwuArVScqe57]
2025-11-05 17:43:11 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFQ3LM4GHVXwuArVScqe57]
2025-11-05 17:43:11 --> customer.subscription.updated [evt_1SQFQ3LM4GHVXwuAi3W96lnH]
2025-11-05 17:43:11 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFQ3LM4GHVXwuAi3W96lnH]
2025-11-05 17:43:16 --> test_helpers.test_clock.ready [evt_1SQFQ8LM4GHVXwuAYo3YVhHt]
2025-11-05 17:43:16 <-- [201] POST http://localhost:3000/services/stripe [evt_1SQFQ8LM4GHVXwuAYo3YVhHt]
that clock's time is frozen at 2025-12-05 currently
no invoice paid
and then advancing the clock again give me a code error on the listener (webhook)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
type: 'StripeRateLimitError',
raw: {
message: 'Test clock advancement underway - cannot perform modifications: clock_1SQFPxLM4GHVXwuApIKrCzIC',
request_log_url: 'https://dashboard.stripe.com/test/logs/req_wN0h3H19mwf1HT?t=1762382701',
type: 'invalid_request_error',
headers: {
is this the only way to test a trigger invoice.billing_reason === 'subscription_cycle'?
Without waiting for a month or week to pass, yes.
Could you summarize what your current problem is, apart from the error?
when I receive a paid webhook, I'm making modification to the subscription
but it looks like we cannot make modifications to a sub that is in the future
modifying a subscription that’s attached to a test clock that is currently advancing. While the clock is advancing, all those resources are locked.
that's correct and expected - have you considered adding a delay while you're testing or just doing the requests manually
hmmmm
so you mean, when receiving a invoice paid
I add a delay, wait for the clock to end, then process the invoice paid ?
Right, if you're trying to test webhooks with test clocks. the delay would need to be lengthy
I'd start at 30 seconds
okok
let me try this
@slate wraith also, is there a way to replay webhook on the local listener ?
I could also close my server, and miss the webhook, then replay it 1min later
oufff, I was able to test everything I wanted
@slate wraith I think something usefull for other dev is to add a copy saying that
you can't modifying a subscription that’s attached to a test clock that is currently advancing. While the clock is advancing, all those resources are locked. api/dashboard
then maybe explain that a turn arround is to accept the webhook but delay of 30sec the processing of it
That's great, glad to hear it