#deepumi

1 messages ยท Page 1 of 1 (latest)

boreal elbowBOT
alpine hamlet
#

@azure stump let's chat here!

azure stump
#

Thanks @alpine hamlet

alpine hamlet
#

adding your image from the main thread

azure stump
#

Okay, sure!

#

May I know the reason?

#

Please let me know if you need API request information

alpine hamlet
#

Could you share the subscription ID for that particular subscription?

azure stump
#

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

alpine hamlet
#

Thanks! The behavior you're seeing is expected, give me a minute to explain

azure stump
#

sure no problem

alpine hamlet
#

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

azure stump
#

can you please share the json data which stripe is sending to the webhook.

alpine hamlet
#

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

azure stump
#

so how do I determine when I get test webhook on live and ignore them on live

alpine hamlet
azure stump
#

okay,,

alpine hamlet
#

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

azure stump
#

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

alpine hamlet
#

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)

azure stump
#

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

alpine hamlet
#

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

azure stump
#

yea sure sound good.. thank you again

boreal elbowBOT
azure stump
#

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?

hallow surge
#

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

azure stump
#

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?

hallow surge
#

Thanks for sharing. Checking it now

azure stump
#

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"

hallow surge
azure stump
#

How do I reproduce the issue?

#

Now that webhook is working, Should I wait until tomorrow to try?

hallow surge
azure stump
#

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

hallow surge
#

It will take one hour to finalise after responding 200

azure stump
#

okay, I will wait.. then thank you @hallow surge