#cynnez

1 messages · Page 1 of 1 (latest)

woeful torrentBOT
shrewd root
#

It's just like any other backend to handle webhook. Did you get it working on your localhost?

viral stone
#

like example; in stripe webhook will show this but status 200 which is weird:

#

in lambda function:

  1. when i run it: successfully given me a checkout url : [Picture attached]
  2. but when i open up the function url and check, my lambda function is facing the same error from the stripe webhook side. which is the "SyntaxError" [2nd picture attached]
shrewd root
#

Hmm you probably want to add some more log in the lambda code. You want to find where exactly is the line it started throwing error

viral stone
#

Okay noted, I will try first. But also, for this subscription, do I need to check the webhook signature or just leave it like this where it's technically working but just having the error for the lambda function?

shrewd root
#

That's a lambda function to accept the webhook event right? So you will always want to verify the signature

#

I would recommend separate the endpoint to receive webhook, with endpoint to do anything else

viral stone
#

What do you mean by endpoint? Is it the lambda function?

So meaning, u recommend me to do one lambda function to retrieve the webhook? Do you have any example on how to do this?

Another lambda function to maybe do the checkout url ?

shrewd root
#

Yes if you need the checkout url separately

#

To retrieve webhook event, you will only need to respond 200 to Stripe, and nothing more

#

but before that you would need to pass the signature verification