From 21a9596a3df280008f88ab23364a81a58e17bfe7 Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Fri, 8 Mar 2024 17:01:10 +0000 Subject: [PATCH] automatically collect taxes --- src/services/stripe/payments.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/stripe/payments.tsx b/src/services/stripe/payments.tsx index 8f1afedd..fbea9eb7 100644 --- a/src/services/stripe/payments.tsx +++ b/src/services/stripe/payments.tsx @@ -56,9 +56,12 @@ export const useCheckoutSessionUrl = (priceId: string, userId: string, { "checkout_sessions", ); + // For more info about the cloud function, see: + // https://github.com/invertase/stripe-firebase-extensions/blob/next/firestore-stripe-web-sdk/markdown/firestore-stripe-payments.commonsessioncreateparams.md addDoc(checkoutSessionRef, { price: priceId, allow_promotion_codes: true, + automatic_tax: true, success_url: successRedirectUrl, cancel_url: cancelRedirectUrl }).then((docRef) => {