From 725e850802cf384b101915876bd3ca7fd5c33071 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Mon, 15 Dec 2025 11:55:13 +0100 Subject: [PATCH] Enable automatic taxes and calculate based on mandatory billing address https://app.fizzy.do/5986089/cards/3465 --- saas/app/controllers/account/subscriptions_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/saas/app/controllers/account/subscriptions_controller.rb b/saas/app/controllers/account/subscriptions_controller.rb index 5a7f27fcd..1e4c6d87e 100644 --- a/saas/app/controllers/account/subscriptions_controller.rb +++ b/saas/app/controllers/account/subscriptions_controller.rb @@ -12,7 +12,10 @@ class Account::SubscriptionsController < ApplicationController line_items: [ { price: Plan.paid.stripe_price_id, quantity: 1 } ], success_url: account_subscription_url + "?session_id={CHECKOUT_SESSION_ID}", cancel_url: account_subscription_url, - metadata: { account_id: Current.account.id, plan_key: Plan.paid.key } + metadata: { account_id: Current.account.id, plan_key: Plan.paid.key }, + automatic_tax: { enabled: true }, + billing_address_collection: "required", + customer_update: { address: "auto" } redirect_to session.url, allow_other_host: true end