recharge-api-node icon indicating copy to clipboard operation
recharge-api-node copied to clipboard

Can't get webhook.verify to work

Open krjo opened this issue 3 years ago • 5 comments

Having trouble with webhook.verify using express. I think your webhook method arguments might be backwards in the readme, but I tried the following with no luck:

recharge.webhook.validate(req.body, process.env.API_CLIENT_SECRET).then((webhook) => console.log(webhook)).catch((err) => console.error(err));

recharge.webhook.validate(req, process.env.API_CLIENT_SECRET).then((webhook) => console.log(webhook)).catch((err) => console.error(err));

recharge.webhook.validate(process.env.API_CLIENT_SECRET, req).then((webhook) => console.log(webhook)).catch((err) => console.error(err));

recharge.webhook.validate(process.env.API_CLIENT_SECRET, req.body).then((webhook) => console.log(webhook)).catch((err) => console.error(err));

krjo avatar Feb 24 '21 22:02 krjo