Skip to content

Commit 24591c4

Browse files
authored
Revert "feat: Support flow_data parameter in createPortalLink function" (#558)
1 parent 2e63228 commit 24591c4

File tree

1 file changed

+1
-13
lines changed
  • firestore-stripe-payments/functions/src

1 file changed

+1
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,7 @@ export const createPortalLink = functions.https.onCall(
338338
);
339339
}
340340
try {
341-
const {
342-
returnUrl: return_url,
343-
locale = 'auto',
344-
configuration,
345-
flow_data,
346-
} = data;
347-
341+
const { returnUrl: return_url, locale = 'auto', configuration } = data;
348342
// Get stripe customer id
349343
const customer = (
350344
await admin
@@ -361,12 +355,6 @@ export const createPortalLink = functions.https.onCall(
361355
if (configuration) {
362356
params.configuration = configuration;
363357
}
364-
if (flow_data) {
365-
// Ignore type-checking because `flow_data` was added to
366-
// `Stripe.BillingPortal.SessionCreateParams` in
367-
// [email protected] (API version 2022-12-06)
368-
(params as any).flow_data = flow_data;
369-
}
370358
const session = await stripe.billingPortal.sessions.create(params);
371359
logs.createdBillingPortalLink(uid);
372360
return session;

0 commit comments

Comments
 (0)