#vell_2x

1 messages · Page 1 of 1 (latest)

bright hollowBOT
vestal marten
#

app.post('/cancel-subscription', async (req, res) => {
// Get the subscription ID from the request body
const subid = req.body.subid;
console.log("Sud ID: ", subid);

// TODO: Implement authentication and authorization logic here
const deleted = await stripe.subscriptions.cancel(subid);

// TODO: Use the Stripe library to close the subscription
// Call the Stripe API to cancel or close the subscription with the given subscriptionId

// Return a response
res.send({
clientSecret: paymentIntent.client_secret,
});
});

winged pendant
#

The error sounds not related. Do you see your request on Dashboard log?

vestal marten
#

yes it has a 200 status