We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 144f29f commit f6d33fcCopy full SHA for f6d33fc
1 file changed
apps/web/app/api/stripe/checkout/route.ts
@@ -16,10 +16,11 @@ export async function POST(request: NextRequest) {
16
17
const data = await request.json();
18
const { priceId } = checkoutSchema.parse(data);
19
-
+
20
// Create checkout session
21
const session = await stripe.checkout.sessions.create({
22
payment_method_types: ['card'],
23
+ allow_promotion_codes: true,
24
line_items: [
25
{
26
price: priceId,
@@ -39,8 +40,8 @@ export async function POST(request: NextRequest) {
39
40
}
41
console.error('Stripe checkout error:', error);
42
return NextResponse.json(
- { error: 'Failed to create checkout session' },
43
+ { error: 'Failed to create checkout session' },
44
{ status: 500 }
45
);
46
-}
47
+}
0 commit comments