{% extends "meta.html" %} {% block title %} Billing - {{cfg("sr.ht", "site-name")}} meta {% endblock %} {% block content %}
{% if message %}
{{message}}
{% endif %} {# Non-paying users are redirected to /billing/initial #} {% if current_user.payment_status == PaymentStatus.free %}
Your account is exempt from billing. All features are available to you free of charge. You may choose to set up billing if you wish to support the site.
{% elif current_user.payment_status == PaymentStatus.subsidized %}
Your account has been approved for financial aid. You will receive subsidized services until your financial aid term expires {{current_user.payment_due | date}}, at which point you are encouraged to apply again.
{% elif current_user.payment_status == PaymentStatus.current %} {% if not sub.autorenew %}
Your renewal payment has been cancelled. When your term expires {{current_user.payment_due | date}}, you will no longer have access to paid features.
{% else %}
Your account is paid and up-to-date. Your next {% if sub.interval == PaymentInterval.monthly %} monthly {% else %} annual {% endif %} payment of {{"${:.2f}".format(sub.amount / 100.0)}} will be billed {{current_user.payment_due | date}}.
{% endif %} {% elif current_user.payment_status == PaymentStatus.delinquent %}
Notice: Your payment is past due. Please check that your payment information is correct or your service may be impacted.
{% endif %}
{% if current_user.payment_status == PaymentStatus.current and sub.active and sub.autorenew %}
Change your plan {{icon('caret-right')}}
{{csrf_token()}}
{% elif current_user.payment_status == PaymentStatus.current and not sub.autorenew %}
Renew your account {{icon('caret-right')}}
{% elif current_user.payment_status == PaymentStatus.delinquent %}

You are subscribed to paid services with {% if sub.interval == PaymentInterval.monthly %} monthly {% else %} annual {% endif %} payments of ${{"{:.2f}".format(sub.amount / 100.0)}}. method to restore access to paid services.

Modify payment amount or term {{icon('caret-right')}}
{{csrf_token()}}
Add payment method {{icon('caret-right')}}
{% elif current_user.payment_status == PaymentStatus.free %}
Set up billing {{icon('caret-right')}}
{% endif %}
{% if methods %}

Payment methods

{% for method in methods.data %} {% set card = method["card"] %}
{{card.brand}} ending in {{card.last4}}
{% if card.address_zip %} Post code {{card.address_zip}}. {% endif %} Expires {{card.exp_month}}/{{card.exp_year}}.
{% if method.id == customer.default_source %} {{icon('check', cls="text-success")}} Default {% else %}
{{csrf_token()}}
{{csrf_token()}}
{% endif %}
{% endfor %}
New payment method {{icon('caret-right')}} {% endif %}
{% if len(invoices) != 0 %}

Invoices

{% for invoice in invoices %}

{{icon('check')}} ${{"{:.2f}".format(invoice.cents/100)}} with {{invoice.source}} Export as PDF

Paid {{invoice.created | date}}
Valid for service until {{invoice.valid_thru | date}} {% if invoice.comment %}
{{invoice.comment}} {% endif %}

{% endfor %}
{% endif %}
{% endblock %}