add discount codes

This commit is contained in:
Emily
2024-06-13 16:19:25 +02:00
parent c89a14d58a
commit 4fd892e1bd

View File

@@ -27,6 +27,7 @@ class StripeService {
if (!this.stripe) throw Error('Stripe not initialized'); if (!this.stripe) throw Error('Stripe not initialized');
const checkout = await this.stripe.checkout.sessions.create({ const checkout = await this.stripe.checkout.sessions.create({
allow_promotion_codes: true,
payment_method_types: ['card'], payment_method_types: ['card'],
line_items: [ line_items: [
{ price, quantity: 1 } { price, quantity: 1 }