Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# UPDATE 2023-10-08:
This project has now being officailly transferred to [Invertase](https://github.com/invertase), who will maintain this extension going forward. Please see [this issue](https://github.com/stripe/stripe-firebase-extensions/issues/524) for more details.
It is now reccomended to uninstall the `stripe/firestore-stripe-payments` extension and install `invertase/firestore-stripe-payments` from the Firebase Extension Hub.
This project has now being officially transferred to [Invertase](https://github.com/invertase), who will maintain this extension going forward. Please see [this issue](https://github.com/stripe/stripe-firebase-extensions/issues/524) for more details.
It is now recommended to uninstall the `stripe/firestore-stripe-payments` extension and install `invertase/firestore-stripe-payments` from the Firebase Extension Hub.

Alternativley, you can also use the following link to convert your current installation to the Invertase version
Alternatively, you can also use the following link to convert your current installation to the Invertase version

`https://console.firebase.google.com/project/_/extensions/install?instanceId=STRIPE_EXTENSION_INSTANCE_ID&ref=invertase%[email protected]`

Expand Down
11 changes: 7 additions & 4 deletions firestore-stripe-payments/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ exports.createCheckoutSession = functions
allow_promotion_codes = false,
trial_period_days,
line_items,
payment_intent_data,
billing_address_collection = 'required',
collect_shipping_address = false,
customer_update = {},
Expand Down Expand Up @@ -220,10 +221,12 @@ exports.createCheckoutSession = functions
sessionCreateParams.subscription_data.default_tax_rates = tax_rates;
}
} else if (mode === 'payment') {
sessionCreateParams.payment_intent_data = {
metadata,
...(setup_future_usage && { setup_future_usage }),
};
sessionCreateParams.payment_intent_data = payment_intent_data ?
payment_intent_data :
{
metadata,
...(setup_future_usage && {setup_future_usage}),
};
if (invoice_creation) {
sessionCreateParams.invoice_creation = {
enabled: true,
Expand Down