#mariuszgit_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/1414941238360014868
π Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
our recommendation is to use invoice.paid, as mentioned here: https://docs.stripe.com/billing/subscriptions/webhooks#active-subscriptions
Thanks. But those are the events I received after time advance (1 month):
customer.subscription.updated
homevariants@gmail.com's subscription has changed
111:53:54 AM
invoice.created
A draft invoice was created
111:53:54 AM
invoice.upcoming
homevariants@gmail.com has an upcoming invoice scheduled for automatic payment in 30 days
111:53:52 AM
customer.updated
homevariants@gmail.com's details were updated
111:53:50 AM
test_helpers.test_clock.created
A new billing clock with ID clock_1S5OFG1dm66kXkqZ8kqOgeU6 was created
111:53:50 AM
There is no invoice.paid event. And I dodnt understand why invoice is scheduled for automatic payment in 30 days. Shouldn't it be paid immediately upon issuance?
can you share the Subscription ID (sub_xxx)?
here's the invoice.paid event: https://dashboard.stripe.com/acct_1S1s251dm66kXkqZ/test/events/evt_1S5PN01dm66kXkqZe9rP92g2
invoice.payment_succeeded?
Let me try. Give mi 2 min please.
So. Ive created new subscription: sub_1S5QSs1dm66kXkqZL7CLfxYW
Everything is ok. I received:
checkout.session.completed
A Checkout Session was completed
12:16:03 PM
customer.subscription.created
homevariants@gmail.com subscribed to price_1S51Uk1dm66kXkqZZAo0oDVL
12:16:02 PM
invoice.payment_succeeded
homevariants@gmail.com's payment for an invoice for USD 10.00 succeeded
12:16:02 PM
invoice.paid
homevariants@gmail.com's invoice for USD 10.00 was paid
12:16:02 PM
invoice.finalized
A draft invoice for USD 10.00 to homevariants@gmail.com was finalized
12:16:02 PM
invoice.created
A draft invoice was created
12:16:02 PM
payment_intent.succeeded
The payment pi_3S5QSq1dm66kXkqZ1zafUNBw for USD 10.00 has succeeded
12:16:01 PM
payment_method.attached
A card payment method ending in 4242 was attached to customer cus_T1TPcRSnOWYY6c
12:16:01 PM
charge.succeeded
homevariants@gmail.com was charged USD 10.00
12:16:01 PM
payment_intent.created
A new payment pi_3S5QSq1dm66kXkqZ1zafUNBw for USD 10.00 was created
12:16:00 PM
customer.updated
homevariants@gmail.com's details were updated
12:16:00 PM
and the invoice.paid event is here π
But...
Now i have clicked in subscription -> simulate -> advance time (1 month and 1 week)
And it works :/ weird...
Must check it one more time, but this time with advance time 1month onlyπ
And it works :/ weird...
why is it weird that things work?
what didn't work exactly? I'm not sure I follow.
Now in my subscription I have clicked -> Run simulation -> avdance time -> (1month and 1 hour) and I received only:
invoice.created
A draft invoice was created
12:31:46 PM
invoice.upcoming
homevariants@gmail.com has an upcoming invoice scheduled for automatic payment in 30 days
12:31:45 PM
customer.updated
homevariants@gmail.com's details were updated
but no "invoice.paid"
Do You maybe know why?? :/
sub_1S5Qfy1dm66kXkqZvLynURGj
and what's the issue? that you didn't get invoice.paid?
the Invoice is still in draft: https://dashboard.stripe.com/acct_1S1s251dm66kXkqZ/test/invoices/in_1S5Qi61dm66kXkqZABIEcaOs
because your webhook endpoint didn't respond with a 200 response to the invoice.created event. so the finalizeation of the invoice is delayed by a couple of days.
this is mentioned here: https://docs.stripe.com/invoicing/integration/workflow-transitions#finalized
Sooo. If I do not need to edit this invoice, can I just responde with 200 on this event?
case "invoice.created":
console.log("Invoice created:", event.data.object.id);
return new Response("OK", { status: 200 })
correct. or stop listening to that event completly if you don't need it.
so have a nice day Soma! and thank You very much again!
happy to help π