Bugfix/payment options (#5805)

* removed locale to use automatic detection in teams/lib/payments.ts

* removed payment_method_types to manage payment methods in the Dashboard

* added customer_update and automatic_tax to apply tax rates to payments

* added allow_promotion_codes to allow promotion codes

* removed multiple usages of `allow_promotion_codes` in payments.ts

Co-authored-by: René Müller <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: alannnc <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-12-05 13:02:59 -07:00
1 parent c38588b93d
commit bcfd57c953
1 file changed
+6 -2
+6 -2
View File
@@ -31,7 +31,6 @@ export const purchaseTeamSubscription = async (input: { teamId: number; seats: n
allow_promotion_codes: true,
success_url: `${WEBAPP_URL}/api/teams/${teamId}/upgrade?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${WEBAPP_URL}/settings/profile`,
locale: "en",
line_items: [
{
/** We only need to set the base price and we can upsell it directly on Stripe's checkout */
@@ -39,10 +38,15 @@ export const purchaseTeamSubscription = async (input: { teamId: number; seats: n
quantity: seats,
},
],
customer_update: {
address: "auto",
},
automatic_tax: {
enabled: true,
},
metadata: {
teamId,
},
payment_method_types: ["card"],
subscription_data: {
metadata: {
teamId,