#.letscode

1 messages · Page 1 of 1 (latest)

tawdry pewterBOT
fast bridge
#

anything i missed?

torn breach
#

Hi there. Did everything work when you were testing with the same code in test mode?

#

Or did you just start in prod?

fast bridge
#

yes same code with different webhook id and url (dev server)

#

can i provide subscription id or signature,

#

?

torn breach
#

Don't provide signature

#

Can you send the event id of the event that got the above error?

fast bridge
#

sure

#

evt_1NYVHVFG3Dh3H5V4t8tUfia4

#

can you please take high priority as it's in production? Sorry to bother

torn breach
#

Looking now

fast bridge
#

@torn breach any update?

torn breach
#

Discord is busy, so I'll get to you when I can

#

There's no response body for the request we made to your endpoint

#

Can you paste the exact error you saw in your server logs?

fast bridge
#

No signatures found matching the expected signature for payload

#

this is message i'm reciving in code

#

} catch (SignatureVerificationException e) {
log.info("Failed signature verification");
log.info(e.getMessage());
log.info("end of stripeWebhook");

#

code block to print error

#

let me know if any changes need to get more details

torn breach
#

And you confirmed the webhook signing secret you're using matches the LIVE mode one from the dashboard by printing it out in that block?

fast bridge
#

log.info("sigHeader: " + sigHeader);
log.info("endpointSecret: "+endpointSecret);

#

these two i'm printin

#

signature header printing long and ( t=1690472055,v1=cacd073d1************************23b3a765)

#

it matching with code and dashboard

torn breach
#

Don't paste the endpoint secret, but does that match as well?

fast bridge
#

yes.. it's partial end point and matching with code and webhook

torn breach
#

Can you check that there's no whitespace in the secret (like a trailing or leading space or some character)?

#

That's a common cause for signature verification errors

fast bridge
#

hope this is the right way to verify in code

#

event = Webhook.constructEvent(payload, sigHeader, endpointSecret);

#

verified space also, not found in keys

#

what are the alternative ways to verify this issue?

tawdry pewterBOT
cyan solar
#

👋 hopping in here to help out

fast bridge
#

okay.. looks like taking time.. can i change keys and try?

#

@cyan solar suggest

cyan solar
#

There isn't really a way to roll the webhook endpoint keys, so ifyou want to ttry changing keys you'd have to create a new endpoint in the dashboard

fast bridge
#

yes

#

know

#

let me try taht

cyan solar
#

I have a couple of questions - did you confirm that the raw payload looks correct (when you log payload)

fast bridge
#

yes

cyan solar
#

and do you have an event ID I can take a look at (just want to see if I can see anything)

fast bridge
#

evt_1NYVHVFG3Dh3H5V4OZj9ddWw

cyan solar
#

Are you 100% sure this is failing at signature verification? Is it possible it's throwing the error after signature verification passes?

fast bridge
#

found the issue: i mentioned we_<key> instead of whsec_<key>

#

testing

cyan solar
#

Aha, that would definitely do it

fast bridge
#

working

#

thank you