diff --git a/endpoints/api/subscribe.py b/endpoints/api/subscribe.py index 03d8a0b4c..9d3dcc00a 100644 --- a/endpoints/api/subscribe.py +++ b/endpoints/api/subscribe.py @@ -17,13 +17,17 @@ def carderror_response(exc): def subscription_view(stripe_subscription, used_repos): - return { + view = { 'currentPeriodStart': stripe_subscription.current_period_start, 'currentPeriodEnd': stripe_subscription.current_period_end, 'plan': stripe_subscription.plan.id, 'usedPrivateRepos': used_repos, + 'trialStart': stripe_subscription.trial_start, + 'trialEnd': stripe_subscription.trial_end } + return view + def subscribe(user, plan, token, require_business_plan): if not features.BILLING: diff --git a/static/directives/plan-manager.html b/static/directives/plan-manager.html index 5978043a7..da0975644 100644 --- a/static/directives/plan-manager.html +++ b/static/directives/plan-manager.html @@ -17,6 +17,11 @@ You are nearing the number of allowed private repositories. It might be time to think about upgrading your subscription to avoid future disruptions in your organization's service. + + +
+ Free trial until {{ parseDate(subscription.trialEnd) | date }} +
@@ -24,6 +29,11 @@ Repository Usage
+ +
+ Next billing period: {{ parseDate(subscription.currentPeriodEnd) | date }} +
+ @@ -57,7 +67,8 @@ ng-click="changeSubscription(plan.stripeId)"> Change - Subscribe + Start Trial + Subscribe