![](assets/images/image01.png?v=a63dee8d)
BILLETS - Événement à venir!
const stripe = require('stripe')(process.env.pk_live_51OUtw6BHLXoHkaS17UNJ5ZaF2o1BxcE3IesxWbiNBMgjg4LjQ4Pw5dgw1nobdXNzsnYtnb7bbtOZmA94paVSrXRz00bCfp6h0p); export default async function handler(req, res) { if (req.method === 'POST') { try { // Create Checkout Sessions from body params. const session = await stripe.checkout.sessions.create({ line_items: [ { // Provide the exact Price ID (for example, pr_1234) of the product you want to sell price: '{{PRICE_ID}}', quantity: 1, }, ], mode: 'payment', success_url: `${req.headers.origin}/?success=true`, cancel_url: `${req.headers.origin}/?canceled=true`, }); res.redirect(303, session.url); } catch (err) { res.status(err.statusCode || 500).json(err.message); } } else { res.setHeader('Allow', 'POST'); res.status(405).end('Method Not Allowed'); } }
Suggérer un événement
Photos
Clique ici pour les photos de nos événements!