#arvindkgs-webhook
1 messages · Page 1 of 1 (latest)
yes, hang on
evt_1JiKlhBuQq6cUmE7OkYT3JV0
this event is generated once subscription is newly created
What information are you not seeing in that event? From our side I can see the event having the invoice info in it
Also I see we got a 401 from your server, do you know what error is happening on your side?
I am using Kong for handling incoming requests
below is my code
local stripe_signature_value = kong.request.get_header(STRIPE_SIGNATURE)
local webhook_payload_value = kong.request.get_raw_body()
-- if the Stripe-Signature header is missing then return an error
if not stripe_signature_value then
return false, "No Stripe Signature header provided"
end
-- if the payload is missing then return an error
if not webhook_payload_value then
return false, "No Stripe webhook payload provided"
end
webhook_payload is null/empty
it should have worked
when using another account, and direct api handling without kong I do not see any issues
is it something to do with the account?
So now you have switched both the account and to kong and are seeing this error?
yes
What happens if you do direct API handling with this account? That can help us separate out what is happening here
So it does seem to be a kong specific issue in that case right? It wouldn't be a Stripe problem per se, and it's more "when I make a post request to my server, how do I access the raw post body for it"?
yes
I googled around but I've never used Kong and I didn't see much documentation about it unfortunately
You will have to debug this on your end, separate from your Stripe integration to start
okay, I was hoping that someone from stripe can valid my lua code for stripe signature verification
As stripe provides sample code for signature validation for other languages
I mean webhook signature validation
but it's unrelated to webhook signature validation right now right?
yes
once you figure out how to get the raw body you can move to signature verification and see if it works or not
but parsing the request body