#deepumi
1 messages ยท Page 1 of 1 (latest)
@azure stump let's chat here!
Thanks @alpine hamlet
adding your image from the main thread
Okay, sure!
May I know the reason?
Please let me know if you need API request information
Out of curiosity, do you have any webhooks configured? https://stripe.com/docs/invoicing/integration/workflow-transitions#finalized
Could you share the subscription ID for that particular subscription?
yea, it is. that's the another question, for some reason, I see test web hook is also getting notified on our production webhook endpoint
sub_1N2GMUHozpwNUrbx0pcLSgOU
charge โ ch_3N2GMVHozpwNUrbx1NZviV73
subscription โ sub_1N2GMUHozpwNUrbx0pcLSgOU
plan โ price_1N2GMTHozpwNUrbxbZpDRmce
customer โ cus_Nns63uSXoUqCjK
Thanks! The behavior you're seeing is expected, give me a minute to explain
sure no problem
So, the invoices are still in draft state because the test mode webhook endpoint needs to respond with a 2xx to the invoice.created event. It's currently returning a 500 response code
can you please share the json data which stripe is sending to the webhook.
Test mode webhooks will receive only test mode events, while live mode webhooks will receive both live and test mode events. This is mentioned here, under the "Hosted endpoints" screenshot: https://stripe.com/docs/connect/webhooks
so how do I determine when I get test webhook on live and ignore them on live
I can't share the event object here but if you view sub_1N2GMUHozpwNUrbx0pcLSgOU in the Dashboard, scroll down to the Event section and click on one of the "A draft invoice was created" lines
okay,,
That will load up the Event view and show you each of the successful and failed webhook attempts. You can expand one of the failed attempts to view the full Event object, as well as the response body and code returned to Stripe by your endpoint
this is a connect account.. by the way, and the webhook has been set up on platform a/c
which should still work correct?
And these are the events I've consuming via webhook.
invoice.created
invoice.deleted
invoice.finalized
invoice.marked_uncollectible
invoice.paid
invoice.payment_action_required
invoice.payment_failed
invoice.payment_succeeded
invoice.sent
invoice.upcoming
invoice.updated
invoice.voided
Not sure what you mean by it should still work. Platforms can create "account" endpoints (to receive events for actions triggered on their platform account) and "connect" endpoints (to receive events for actions triggered on connected accounts)
I am trying to check this, I see event section looks blank
I am on this page - https://dashboard.stripe.com/test/subscriptions/sub_1N2GMUHozpwNUrbx0pcLSgOU
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
The invoice link for each draft one I have selected and the detail page I see event section s blank
okay no worries, I found it.
let me try debugging this issue and will get back to you, is it okay if I can continue on this thread?
And thank you so much
yes, you can continue here if you're actively debugging now. These threads are short lived so if you plan on revisiting this in a few hours or tomorrow, feel free to send another message in the main channel and we can continue in a new thread
yea sure sound good.. thank you again
So, the webhook is returning 200: OK, however, the subscription json payload has status "draf"
the code checks for status as "invoice.payment_succeeded" where the json is getting from webhook as "draft" what is the reason?
๐ Taking over this thread
Can you share the event ID (evt_xxx) where your server responded 200 and the subscription status still remain as draft?
yes, one second please
the event id on today - "id": "evt_1N3LnwHozpwNUrbxMQjGTb85",
May 2, 12:11 PM was success
and the second event is returning error.
May I know the reason on "draft" status?
Thanks for sharing. Checking it now
All I understand from the above thread was "webhook" should return 200:OK status which is doing now, but when can I expect the status to change from "draft" to "invoice.payment_succeeded"
All the webhook endpoints have to return 200 in order to change from draft to open or paid. One of the webhook endpoint didn't respond 200: https://dashboard.stripe.com/test/webhooks/we_1HX1AlIcWSSPnlgr64g5txPP
How do I reproduce the issue?
Now that webhook is working, Should I wait until tomorrow to try?
You can use test clock to advance the time instead of waiting: https://stripe.com/docs/billing/testing/test-clocks
thank god.. let me read it
Okay, this event with ID 'evt_1N3TmdHozpwNUrbxRDTBUaKl' was sent to two webhooks and received 200 OK responses. Can you please tell me how long it usually takes for the 'draft' status to change to 'paid'?
Sub - sub_1N37IdHozpwNUrbxo1Tru8fC
Event-id - evt_1N3TmdHozpwNUrbxRDTBUaKl
Invoice-id - in_1N3TmdHozpwNUrbxXZoiTTAA
Time: 8:42 PM EST
From https://stripe.com/docs/invoicing/integration/workflow-transitions#finalized:
We wait an hour after receiving a successful response to the invoice.created event before attempting payment
It will take one hour to finalise after responding 200
okay, I will wait.. then thank you @hallow surge