File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,9 @@ export async function POST(req: NextRequest) {
185185 } ,
186186 ] ,
187187 mode : 'payment' ,
188+ invoice_creation : { enabled : true } ,
189+ tax_id_collection : { enabled : true } , // optional (EU B2B)
190+ customer_update : { name : "auto" , address : "auto" } ,
188191 success_url : `${ env . NEXT_PUBLIC_CODEBUFF_APP_URL } /payment-success?session_id={CHECKOUT_SESSION_ID}&purchase=credits&amt=${ credits } ` ,
189192 cancel_url : `${ env . NEXT_PUBLIC_CODEBUFF_APP_URL } /usage?purchase_canceled=true` ,
190193 metadata : {
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ export async function POST(req: NextRequest) {
7272 const checkoutSession = await stripeServer . checkout . sessions . create ( {
7373 customer : user . stripe_customer_id ,
7474 mode : 'subscription' ,
75+ tax_id_collection : { enabled : true } , // optional (EU B2B)
76+ customer_update : { name : "auto" , address : "auto" } ,
7577 line_items : [ { price : priceId , quantity : 1 } ] ,
7678 allow_promotion_codes : true ,
7779 success_url : `${ env . NEXT_PUBLIC_CODEBUFF_APP_URL } /profile?tab=usage&subscription_success=true` ,
You can’t perform that action at this time.
0 commit comments