mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
add stripe webhook to handle cancelled subscriptions
This commit is contained in:
@@ -87,4 +87,14 @@ api.subscribeCancel = {
|
||||
},
|
||||
};
|
||||
|
||||
api.handleWebhooks = {
|
||||
method: 'POST',
|
||||
url: '/stripe/webhook',
|
||||
async handler (req, res) {
|
||||
await stripePayments.handleWebhooks({requestBody: req.body});
|
||||
|
||||
return res.respond(200, {});
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = api;
|
||||
|
||||
Reference in New Issue
Block a user