#chunyu

1 messages · Page 1 of 1 (latest)

lucid grottoBOT
jaunty crystal
#

Does it work before?

idle jay
#

yes

jaunty crystal
#

Did you create a new webhook endpoint?

idle jay
#

no sir, only one webhook endpoint of my test

#

the version "2020-08-27" is ok, but the version "2022-08-01" is wrong

#

both of them can receive the webhook

jaunty crystal
#

What I meant is that did you create a new webhook endpoint recently in the dashboard?

#

can you share your account ID?

idle jay
#

yes i did,but i deleted that

#

ok my account is "Tripalink-Rent"

jaunty crystal
#

Every webhook endpoint has different webhook secret. You can go to https://dashboard.stripe.com/webhooks > Select your endpoint > Look for "Signing secret" > Click "Reveal" to get the webhook secret

#

It's likely that the webhook secret is not updated in your code

idle jay
#

the secret in my code is the same as shown in the picture

#

i am sure they are not different sir

jaunty crystal
#

Please do not share your webhook secret in this channel as all the messages are public

idle jay
#

ok

jaunty crystal
idle jay
#

acct_1LkW18H2RTKkgRbt

jaunty crystal
#

Can you double check that there's no extra space in the webhook secret of your code? Based on the check, the version shouldn't matter for signature verification

idle jay
#

in fact,i have checked it for many times, i can give u the secretkey sir

#

if i change the key of the apiversion “2020-08-27” everything is ok 😫

jaunty crystal
#

This is interesting

#

Let me test on my end

idle jay
#

haha do u need my key and requestbody of webhook?

jaunty crystal
#

it's okay! i can test in my own account

idle jay
#

OK

idle jay
#

👀

jaunty crystal
#

Sorry! Discord is a bit busy, still testing

idle jay
#

thanks

jaunty crystal
#

I tested on my end with different versions and it works fine as long as the webhook secret is set correctly

#

can you try to print the webhook secret just right before the validation and ensure it's indeed correct

#

when you mentioned that you tested with 2020-08-27 and it works. did you create a new webhook endpoint with 2020-08-27 or you're referring to the old integration?

idle jay
idle jay
#

i didnot create any new endpoint sir

#

i have printed the secret key,it is the same with the dashboard indeed

#

😂

#

can u use my account to try ?

jaunty crystal
#

if you create a new webhook endpoint with 2020-08-27 again with its secret and disable the one in 2022-08-01, will it work?

idle jay
#

yes it works, i did it with my another account

#

but my current account only has 2022-08-01,doesnot have 2020-08-27

jaunty crystal
#

yup! can you also double check that your API key uses the one from acct_1LkW18H2RTKkgRbt as well?

idle jay
#

i am using acct_1KwenHDGC4EHz3jv now

#

acct_1KwenHDGC4EHz3jv

#

this is result of 2020-08-27

#

this is result of 2022-08-01

#

my current test account has two endpoints, when i test one,another one is disabled

#

👀

#

are u still with me sir?

jaunty crystal
#

I'll be stepping away. My colleague @jaunty jasper will be taking over

idle jay
#

thanks a lot

jaunty jasper
#

Hi! I'm taking over this thread. Give me a few minutes to catchup.

idle jay
#

👌🏻

jaunty jasper
#

So if I understand correctly you set two different webhook endpoint (with different API versions), one is working and for the other you get errors?

#

Are you using Java for your code?

idle jay
#

yes i use java

#

yes you are absolutely right,sir

#

there are two endpoints of my account,apiversion of the first endpoint is ‘2020-08-27’,and the other one is ‘2022-08-01’,when i use the first endpoint to receive webhook,everything is ok,when i use the ‘2022-08-01’,it show me error message “No signatures found matching the expected signature for payload”

#

my account id is "acct_1KwenHDGC4EHz3jv"

#

same code and same webhook endpoint with different API versions has two different results

jaunty jasper
#

Which version of stripe-java are you using?

idle jay
#

20.121.0

jaunty jasper
#

Thanks! So if you look at the changelog of the stripe-java library: https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md you can see that:

  • API version 2022-08-01 should work with version 21.0.0 and later
  • API version 2020-08-27 should work with version 20.0.0 and later
    If you are using 20.121.0, than I think you have to use API version 2020-08-27 for it to work.
idle jay
#

aaa i try it now

jaunty jasper
#

And if you want to use a newer version of the API, you would need to also upgrade the version of your library.

idle jay
#

ok i will upgrade the sdk to 21.0.0 and try it

idle jay
#

thanks a lot, my problem has been solved @jaunty jasper @jaunty crystal

jaunty jasper
#

Happy to help 🙂