#Mr Stinky Pants-webhook

1 messages · Page 1 of 1 (latest)

scarlet slateBOT
misty wyvern
#

What do you mean by check your webhook request body? How can I help?

low osprey
#

well my webhook works ok in test mode

#

but live i get an error The signature for the webhook is not present in the Stripe-Signature header.

#

so i managed to send the header and body in the response back to the stripe event

#

all my live ones failed so i have been waiting to get payments to test things out

#

i just realised i can put test api keys on the server to try that

#

so now i think the server must be modifying the body where my pc is not

#

evt_1M5ZviJKY8YXH2zhflXcZ39f

#

if you look at the response maybe its adding some text in the body?

misty wyvern
#

Just to double check - you're making sure to use the correct webhook endpoint secret for your live endpoint, right?

low osprey
#

yes but ive found using the test on my server is also not working

#

i mean the body format looks similar to if i run it locally

misty wyvern
#

Mr Stinky Pants-webhook

#

Gotcha - so what are you doing different locally compared to your server?

low osprey
#

nothing that i know of thats the problem

#

i just thought it might be modifying the body so the EventUtility.ConstructEvent(body, signatureHeader, endpointSecret); gives an error

misty wyvern
#

Okay just to confirm the current state of things:

  • Locally you had this working
  • Both your live and test mode webhook are failling to verify the signature on your server
#

Can you log the raw event payload from your server and show me what it looks like?

low osprey
#

the test mode is working on my pc

#

yes thats what i did, i just tried another here evt_1M5aKNJKY8YXH2zhswJwavEq

#

if you look at the webhook response you will see the body

misty wyvern
#

Just to clarify - is this a test mode event that's going to your server? This was perviously not working, right?

low osprey
#

the test mode event will work on my pc

#

but using the same fileson the server it doesnt

misty wyvern
#

what do you mean "the same files"

low osprey
#

the webhook

#

ive just got it to work locally by making a new endpoint

misty wyvern
#

Can you give full details on how you're testing locally and how you're testing on your server? I'm not fully grasping what you're saying, so hopefully getting all the details will help

low osprey
#

i have a setup intent created event that fires ok using a webservice that a run on local host on my pc

#

using the test endpointSecret

#

if i copy that webservice to the server using the test secret it works ok if i make a setup intent

#

if i change the api key and endpointSecret to live mode it doesnt work

misty wyvern
#

Live mode doesn't work in both scenarios? (localhost on your PC and when deploy to your server?)

low osprey
#

i didnt try live on my pc

misty wyvern
#

try it live on your pc really quick and tell me how it goes

low osprey
#

oh balls

#

i have a boolean to check if its local host for the right key

#

if the base path contains "repros"

#

some how the server base path must also contain that

austere jewel
#

Hi there. karbi had to step out

#

Give me a sec to catch up, but is there something you need help with atm?

low osprey
#

im on to something i hope

#

i think it might be because i made a new endpoint

#

and it seems to have fixed the problem i hope

#

so ill see what happens on next payment, cheers