{% extends "wagtail_subscriptions/base.html" %} {% load subscription_tags %} {% block title %}Customer Portal{% endblock %} {% block content %}

Customer Portal

Current Subscription

Plan

{{ subscription.plan.name }}

Status

{{ subscription.get_status_display }}

Next Billing

{{ subscription.current_period_end|date:"M d, Y" }}

{% if subscription.is_trial %}

Trial Period: Your trial ends on {{ subscription.trial_end|date:"M d, Y" }}

{% endif %}

Plan Management

{% if subscription.status != 'canceled' %}

Change Plan

{% csrf_token %}

Cancel Subscription

{% csrf_token %}
{% else %}

Reactivate Subscription

Your subscription was canceled. You can reactivate it to continue using our services.

{% csrf_token %}
{% endif %}

Billing History

{% if recent_payments %}
{% for payment in recent_payments %} {% endfor %}
Date Amount Status Method
{{ payment.created_at|date:"M d, Y" }} ${{ payment.amount }} {{ payment.get_status_display }} {{ payment.payment_method.get_payment_type_display|default:"Card" }}
{% else %}

No billing history available.

{% endif %}

Feature Usage

{% subscription_info as sub_info %} {% plan_features subscription.plan as features %} {% if features %}
{% for plan_feature in features %} {% if plan_feature.feature.feature_type == 'quota' %}

{{ plan_feature.feature.name }}

{% with quota=plan_feature.effective_quota %} {% if quota %}

Used: 45 / {{ quota }} {{ plan_feature.feature.quota_unit }}

{% else %}

Unlimited

{% endif %} {% endwith %}
{% else %}

{{ plan_feature.feature.name }}

✓ Included

{% endif %} {% endfor %}
{% else %}

No features configured for this plan.

{% endif %}
{% endblock %}