{% extends "base.html" %} {% from "components/empty_state.html" import empty_state %} {% block title %}Payment History · CampusCart{% endblock %} {% block content %}

Payments & Subscription

Your current Premium subscription and payment history.

Back to Premium
{# ---------------- Current subscription ---------------- #}

Current Premium Subscription

{% if active_subscription %}
Status
Active
Plan
{{ active_subscription.plan_name|title }}
Started
{{ active_subscription.start_date.strftime('%d %b %Y') }}
Expires
{{ active_subscription.end_date.strftime('%d %b %Y') }}
{{ days_left }} day{{ 's' if days_left != 1 }} remaining
{% elif latest_subscription %}

Expired

Your Premium membership ended on {{ latest_subscription.end_date.strftime('%d %b %Y') }}.

Renew Premium {% else %}

You don't have a Premium subscription yet.

Upgrade to Premium {% endif %}
{# ---------------- Payment history ---------------- #}

Payment History

{% if payments %} {% for p in payments %}
{{ currency }}{{ '{:,.2f}'.format(p.amount|float) }} · {{ p.plan_name|title }}
{{ p.created_at.strftime('%d %b %Y, %H:%M') }} · {{ p.provider|title }} {% if p.provider_payment_id %}· {{ p.provider_payment_id }}{% endif %}
{{ p.status.value|title }} {% if p.status.value in ('captured', 'refunded') %} Receipt {% endif %}
{% endfor %} {% else %} {{ empty_state('bi-receipt', 'No payments yet', 'Your online Premium purchases will appear here.', cta_label='Explore Premium', cta_url=url_for('premium.index'), cta_icon='bi-star') }} {% endif %}
{% endblock %}