#tenacious_fawn_62667
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tenacious_fawn_62667, 5 days ago, 4 messages
hi there!
you would use webhook events for this, and liten to checkout.session.completed
I recommend reading this guide: https://stripe.com/docs/payments/checkout/fulfill-orders
export async function retrieveCheckoutSession(req, res) {
try {
const retrieveSession = await stripe.checkout.sessions.retrieve(
${req.body.key},
{apiKey: "sk_test_..."}
);
console.log("Checkout session retrieved", retrieveSession);
res.status(201).json(retrieveSession);
} catch (error) {
console.log("Error retrieveCheckoutSession!", error);
res.status(400).json(error);
}
}
how can i pass api key
you can see code samples here: https://stripe.com/docs/api/checkout/sessions/retrieve
there is now way provided to add api key in the call