{% extends "meta.html" %} {% import "partials/invoice.html" as invoice %} {% 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.
{% elif sub.status == SubscriptionStatus.ACTIVE %}
Your account is paid and up-to-date. Your next {% if sub.interval == PaymentInterval.monthly %} monthly {% else %} annual {% endif %} payment of {{sym}}{{"{:.2f}".format(sub.total / 100.0)}} will be automatically charged on {{current_user.payment_due.strftime("%B %d, %Y")}}.
{% elif sub.status == SubscriptionStatus.SETTLEMENT %}
Your subscription payment was charged {{sub.updated | date}} and is awaiting settlement, which should take place within the next 7 business days. As a courtesy, paid features are available for your account immediately.
{% endif %} {% elif current_user.payment_status == PaymentStatus.delinquent %}
{{icon('exclamation-circle')}} Important notice

Your most recent {% if sub.interval == PaymentInterval.monthly %} monthly {% else %} annual {% endif %} payment {% if sub["payment"]["error"] %} failed: {{ sub["payment"]["error"] }} {% else %} failed. {% endif %} You have an outstanding balance of {{sym}}{{"{:.2f}".format(sub.total / 100.0)}}. Your access to paid features may be affected as a consequence.

Your payment will be automatically retried over the next few days. You may also consider the following solutions:

{% endif %}
{% if current_user.payment_status == PaymentStatus.current and sub.status in [SubscriptionStatus.ACTIVE, SubscriptionStatus.SETTLEMENT] and sub.autorenew %}
Change your plan {{icon('caret-right')}}
Cancel your plan {{icon('caret-right')}}
{% elif current_user.payment_status == PaymentStatus.current and not sub.autorenew %}
Renew your subscription {{icon('caret-right')}}
{% elif current_user.payment_status == PaymentStatus.free %}
Set up billing {{icon('caret-right')}}
{% endif %}

Billing address

{% if address %} Edit {{icon('caret-right')}} {% if address.fullName %}{{address.fullName}}
{% endif %} {% if address.businessName %}{{address.businessName}}
{% endif %} {% if address.address1 %}{{address.address1}}
{% endif %} {% if address.address2 %}{{address.address2}}
{% endif %} {% if address.city %}{{address.city}}
{% endif %} {% if address.region %}{{address.region}}
{% endif %} {% if address.postcode %}{{address.postcode}}
{% endif %} {% if address.country %}{{address.country.name}}
{% endif %} {% if address.vat %}{{address.vat}}
{% endif %} {% else %} We do not have a billing address on file for your account. To include your address or business details on invoices, add a billing address. {% endif %}
{% if methods %}

Payment methods

{% for method in methods %}
{{method.name}} {% if method.expires %}
Expires
{{method.expires.strftime("%m/%Y")}}
{% endif %}
{% if method.id == default_method.id %}
{{icon('check', cls="text-success")}} Default
{% else %}
{{csrf_token()}}
{{csrf_token()}}
{% endif %}
{% endfor %}
Add payment method {{icon('caret-right')}} {% endif %}
{% if len(invoices) != 0 %}

Invoices

{% for i in invoices %} {{ invoice.render(i) }} {% endfor %} View all invoices {{icon('caret-right')}}
{% endif %}
{% endblock %}