Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(billing): enable Stripe automatic tax on checkout sessions (#13058)

Toran Bruce Richards16ceb0917c61
diff --git a/autogpt_platform/backend/backend/data/credit.py b/autogpt_platform/backend/backend/data/credit.py
index bbaf4d8b54..926dab8663 100644
--- a/autogpt_platform/backend/backend/data/credit.py
+++ b/autogpt_platform/backend/backend/data/credit.py
@@ -1087,6 +1087,9 @@ class UserCredit(UserCreditBase):
success_url=base_url + "/settings/billing?topup=success",
cancel_url=base_url + "/settings/billing?topup=cancel",
allow_promotion_codes=True,
+ automatic_tax={"enabled": True},
+ billing_address_collection="auto",
+ customer_update={"address": "auto"},
)
await self._add_transaction(
@@ -2274,6 +2277,9 @@ async def create_subscription_checkout(
}
},
allow_promotion_codes=True,
+ automatic_tax={"enabled": True},
+ billing_address_collection="auto",
+ customer_update={"address": "auto"},
)
if not session.url:
# An empty checkout URL for a paid upgrade is always an error; surfacing it