#cgy-webhook

1 messages · Page 1 of 1 (latest)

graceful schooner
#

The send test webhook button is deprecated. You would want to send via Stripe CLI

slate trail
#

Ok, I will have a try

#

I test Stripe CLI online. It can't edit webhook url right? I must install a Stripe CLI?

#

$ stripe trigger payment_intent.succeeded

#

I use this one

graceful schooner
#

Yeah that's to send a test event

slate trail
#

so how can I change this url to our's.

#

Onlie Stripe CLI seems inavailable to edit url

#

unable

#

forgive my poor english

graceful schooner
#

Let's use local Stripe CLI

slate trail
#

ok

slate trail
#

Invalid API Key provided: sk_test_***

#

I find the secret key from my dashboard

#

invaild?

graceful schooner
#

it's sk_test_xxx

slate trail
#

yes it is. Let me capture this command

graceful schooner
#

Don't put your key here

slate trail
#

ok

#

I finally trigger to my webhook

#

But when I test 'https' dashboard response shows 'err', then I update to 'http' shows '400 err'

#

I chekou my code. I return 400 when I didn't take any furthur action in our system

#

And Stripe says '400 err' will delivery 1 hour later

#

So first 'https' is wrong, right? And I can't return 400?

#

But I did this code four months ago. I remeberd 400 is OK

graceful schooner
#

I would suggest taking a step back and review your webhook handler

#

It should run using https yes, and it's your own server. Stripe sent event to it and expect to receive 200

#

You would want to develop a normal server that can response 200 to any request first, then can response 200 to request from Stripe

slate trail
#

Ok

#

I got what you said. There's two mistakes

#

Fisrt https should reachable, then 200 is required

graceful schooner
#

Yeah. It's just an ordinary server response to requests