From 59bc52a2e1f35ddfe770731c1739452e8fffa3fc Mon Sep 17 00:00:00 2001 From: Rohan Chaturvedi Date: Wed, 28 Aug 2024 16:05:03 +0530 Subject: [PATCH] chore: add trial period for pro self-checkout (#354) * chore: add 30-day trial for pro self-checkout * fix: remove print --- backend/ee/billing/graphene/mutations/stripe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/ee/billing/graphene/mutations/stripe.py b/backend/ee/billing/graphene/mutations/stripe.py index e1110a356..703632b0c 100644 --- a/backend/ee/billing/graphene/mutations/stripe.py +++ b/backend/ee/billing/graphene/mutations/stripe.py @@ -43,6 +43,9 @@ def mutate(self, info, organisation_id, billing_period): ], customer=organisation.stripe_customer_id, payment_method_types=["card"], + subscription_data={ + "trial_period_days": 30, + }, return_url=f"{settings.OAUTH_REDIRECT_URI}/{organisation.name}/settings?stripe_session_id={{CHECKOUT_SESSION_ID}}", ) return CreateProUpgradeCheckoutSession(client_secret=session.client_secret)