#abdurrehman_webhooks

1 messages ยท Page 1 of 1 (latest)

peak shuttleBOT
#

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

๐Ÿ“ 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.

pliant gate
#

hi there

#

i have these webhooks defined. the issue is with corner-vibrant

#

that does not seems to be responding to stripe webhook events.only through cli its actually responding but as compared this, corner-connected-accounts seems to running fine

#

kindly do help me in solving this issue

hazy tusk
#

๐Ÿ‘‹ Hi there, just taking a look now

pliant gate
#

oj

#

ok*

hazy tusk
#

So I can see that the above event (evt_1SZstAPqwSINQbc3TXrCE9FM) was sent to this corner-vibrant webhook, but got a 400 error response. We got this in the response body: {"data":"No subscription obj was found for this stripe subscription id sub_1SZst6PqwSINQbc3k1R9sr5B"}

pliant gate
#

yeah it was trigger by cli

#

in normal scenario it gonna response different

#

my primary most important issue is why its not responding

#

when normal happens on my app

#

as compared to corner-connected-accounts which is working ok

hazy tusk
#

So there are other events not triggered by the CLI that are not being delivered to the webhook endpoint? Do you have an example of one of these?

pliant gate
#

yeah SUBSCRIPTION_CREATED = "customer.subscription.created" this is the event for example

#

that is not being delivered to this webhook

#

is there any config issue for this specfic webhook that i am missing?

#

@hazy tusk can u kindly share

hazy tusk
#

Do have an example event ID for an event that wasn't delivered?

#

From what I can see, the config looks ok

pliant gate
#

i am saying that events do get delivered to this only via cli

#

stripe-cli. but not with the flow in which in my custom app i am checking out to stripe for payment and subscription

#

i can share screenshots of that if u need

hazy tusk
pliant gate
#

wait a sec

#

i cant see those requests. i mean those requests are not being logged here somehow

peak shuttleBOT
pliant gate
#

I can tell u the specific event though!

leaden oasis
#

hi there ๐Ÿ‘‹ taking over as my colleague needs to step away

pliant gate
#

hello

leaden oasis
#

yes, if you can share the event ID that would be great

pliant gate
#

I am facing this critical issue here

#

ok

#

evt_1SZstAPqwSINQbc3TXrCE9FM this the one

#

the issue is that 1 webhook does not respond to events under normal flow

#

it only get triggered only by stripe cli

#

but corner-connected-account webhook seems to be working normal

leaden oasis
#

I see that the response received from your server for that event is {"data":"No subscription obj was found for this stripe subscription id sub_1SZst6PqwSINQbc3k1R9sr5B"}

pliant gate
#

yeah as it triggered through cli

leaden oasis
#

is there specific logic that your webhook endpoint performs when an event is received? it seems like some action on your side is checking for the subscription object after the invoice.payment_succeeded event is received

pliant gate
#

yeah a log is generated

leaden oasis
#

ok, so just to confirm, are you trying to debug the error on that failed example (triggered through the CLI)? or are you trying to debug the events from the 'normal flow'?

#

or both?

pliant gate
#

its actually both

#

but my main pain point is request does not land to corner-vibrant destination

#

it was working every since. but its only like 2 weeks its not responding!

leaden oasis
#

ok cool!

for the failed example (CLI), I'd recommend following the guide I linked above to debug - ultimately, since the error is coming from your server, you'll need to review your webhook code and ensure that you're responding properly to the request from Stripe

#

for the 'normal flow' you said: "the issue is that 1 webhook does not respond to events under normal flow"

can you share the IDs for any of these events? or the related payments/invoices?

pliant gate
#

at this point i dont think we have any id?

#

i have this destination ID we_1SYR3FPqwSINQbc38OmNbOza

leaden oasis
#

the cs_test_xxxx ID in the URL is the Checkout Session ID, but you're right that there won't be any events if that page isn't completed

#

so at that point, no webhooks would be expected - they'd only be expected if a payment was actually attempted

pliant gate
#

wait a sec

#

it generates a /subscribe/success?session_id=cs_test_a10NY1ABfbMnTIlPiGehqYU61EDtLj2htrz6kgxPd4oNAlf89doO6vr1b2 session_id after form is filledout

#

i have these events defined for corner-vibrant

leaden oasis
#

looks like the webhooks are working successfully for those events

#

let me explain

#

-cs_test_a10NY1ABfbMnTIlPiGehqYU61EDtLj2htrz6kgxPd4oNAlf89doO6vr1b2 is the Checkout Session ID
-evt_1SaE2TLt4pZ9EDCL3pnZQB2L is the checkout.session.completed event that was triggered when the form was completed
-sub_1SaE2SLt4pZ9EDCLdHFEBjhe is the resulting subscription, created on the connected account

when you open evt_1SaE2TLt4pZ9EDCL3pnZQB2L in the connected account's dashboard, you can see that the webhook was successful (status code returned by your server was 200)

#

when you say "it's not responding", what specifically are you looking at?

pliant gate
#

customer.subscription.created

#

yeah i know that i connected accounts its being updated

#

payment being done ,customer added

leaden oasis
#

ah I see, so this is specifically about the customer.subscription.created event type

#

and you're right, no webhook was attempted for that event

#

looking into this now

pliant gate
#

yeah!

leaden oasis
#

ah, I see the issue

pliant gate
#

kindly share detaiils

#

details*

leaden oasis
#

you have two endpoints/destinations:

  1. we_1SYR3FPqwSINQbc38OmNbOza (Corner-vibrant)
    -Account endpoint (i.e. receiving events from your platform account)
    -listening for customer.subscription.created events
    https://dashboard.stripe.com/acct_1RGxF0PqwSINQbc3/test/webhooks/we_1SYR3FPqwSINQbc38OmNbOza

  2. we_1SNBmhPqwSINQbc36T56jADl
    -Connect endpoint (i.e. receiving events from your connected accounts)
    -not listening for customer.subscription.created events
    https://dashboard.stripe.com/acct_1RGxF0PqwSINQbc3/test/webhooks/we_1SNBmhPqwSINQbc36T56jADl

#

since evt_1SaE2TLt4pZ9EDCLfrScpjGM is a customer.subscription.created event, which happened on a connected account, it's expected that no webhook would be attempted

#

to correct this, you'd need to update the Connect endpoint to listen for customer.subscription.created

pliant gate
#

sorry i didnt get it. can u kindly explain

#

the subscription.created is done for connected account and i am assuming its for platform account???right?

leaden oasis
#

there are two different ways to set up a webhook endpoint:

  1. Listening for events on your platform account,
  2. Listening for events on your connected accounts

in your flow, you're creating the subscription on the connected account

so you need to listen for customer.subscription.created in the webhook endpoint that receives event data from connected accounts

#

currently, you're listening for customer.subscription.created events happening the platform account

pliant gate
#

.... listen for customer.subscription.created in the webhook endpoint that receives event data from connected accounts that i got it now!

#

but how to do that?can u explain ???

leaden oasis
#

if you open that link, you should have an option to update/edit the webhook endpoint

when you click that option, you can add customer.subscription.created to the list

pliant gate
#

ok simply saying its about changing customer.subscrption.created to connected account instead of platform account if i am not wrong!

leaden oasis
#

sort of!

it's more that you're adding it to the list of event types that your webhook receives from connected accounts

#

currently it's not in that list, which is why it's not being sent

pliant gate
#

let me update

peak shuttleBOT
pliant gate
#

yeah its listening now

#

now updating secret for sig verification