Skip to content

Commit b4596ae

Browse files
feat(firestore-stripe-payments): Support payment_method_collection parameter
1 parent 9b1b011 commit b4596ae

File tree

1 file changed

+2
-0
lines changed
  • firestore-stripe-payments/functions/src

1 file changed

+2
-0
lines changed

firestore-stripe-payments/functions/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ exports.createCheckoutSession = functions
145145
consent_collection = {},
146146
expires_at,
147147
phone_number_collection = {},
148+
payment_method_collection = 'always'
148149
} = snap.data();
149150
try {
150151
logs.creatingCheckoutSession(context.params.id);
@@ -204,6 +205,7 @@ exports.createCheckoutSession = functions
204205
sessionCreateParams.payment_method_types = payment_method_types;
205206
}
206207
if (mode === 'subscription') {
208+
sessionCreateParams.payment_method_collection = payment_method_collection
207209
sessionCreateParams.subscription_data = {
208210
trial_from_plan,
209211
metadata,

0 commit comments

Comments
 (0)