@@ -29,7 +29,7 @@ import * as logs from './logs';
2929import config from './config' ;
3030import { Timestamp } from 'firebase-admin/firestore' ;
3131
32- const apiVersion = '2022 -11-15 ' ;
32+ const apiVersion = '2024 -11-20.acacia ' ;
3333const stripe = new Stripe ( config . stripeSecretKey , {
3434 apiVersion,
3535 // Register extension as a Stripe plugin
@@ -126,7 +126,7 @@ exports.createCheckoutSession = functions
126126 cancel_url,
127127 quantity = 1 ,
128128 payment_method_types,
129- shipping_rates = [ ] ,
129+ shipping_options = [ ] ,
130130 metadata = { } ,
131131 automatic_payment_methods = { enabled : true } ,
132132 automatic_tax = false ,
@@ -183,7 +183,7 @@ exports.createCheckoutSession = functions
183183 const sessionCreateParams : Stripe . Checkout . SessionCreateParams = {
184184 billing_address_collection,
185185 shipping_address_collection : { allowed_countries : shippingCountries } ,
186- shipping_rates ,
186+ shipping_options ,
187187 customer,
188188 customer_update,
189189 line_items : line_items
@@ -441,6 +441,7 @@ const createProductRecord = async (product: Stripe.Product): Promise<void> => {
441441 role : firebaseRole ?? null ,
442442 images : product . images ,
443443 metadata : product . metadata ,
444+ marketing_features : product ?. marketing_features ,
444445 tax_code : product . tax_code ?? null ,
445446 ...prefixMetadata ( rawMetadata ) ,
446447 } ;
0 commit comments