Skip to content

Commit e2b030d

Browse files
authored
feat: invoice creation on one-time payments
1 parent f0da14b commit e2b030d

File tree

1 file changed

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

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ exports.createCheckoutSession = functions
128128
metadata = {},
129129
automatic_payment_methods = { enabled: true },
130130
automatic_tax = false,
131+
invoice_creation = false,
131132
tax_rates = [],
132133
tax_id_collection = false,
133134
allow_promotion_codes = false,
@@ -215,6 +216,11 @@ exports.createCheckoutSession = functions
215216
metadata,
216217
...(setup_future_usage && { setup_future_usage }),
217218
};
219+
if (invoice_creation) {
220+
sessionCreateParams.invoice_creation = {
221+
enabled: true,
222+
};
223+
};
218224
}
219225
if (automatic_tax) {
220226
sessionCreateParams.automatic_tax = {

0 commit comments

Comments
 (0)