Stripe Error: No signatures found matching the expected signature for payload

前端 未结 5 1034
眼角桃花
眼角桃花 2021-01-03 19:02

I have a stripe webhook that call a Firebase function. In this function I need to verify that this request comes from Stripe servers. Here is the code :

cons         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-03 19:33

    Cloud Functions automatically parses body content of known types. If you're getting JSON, then it's already parsed and available to you in req.body. You shouldn't need to add other body parsing middleware.

    If you need to process the raw data, you should use req.rawBody, but I don't think you'll need to do that here.

提交回复
热议问题