{% extends "admin/layout.html" %} {% block title %}Payment Gateways – Admin{% endblock %} {% block body %}

{% trans %}Payment Gateways{% endtrans %}

{% trans %}Configure Stripe, PayPal, and manual payment options. Set yearly discounts per plan.{% endtrans %}

{% with messages = get_flashed_messages(with_categories=true) %}{% for cat, msg in messages %}{% endfor %}{% endwith %}

{% trans %}Stripe{% endtrans %}

{% trans %}Stored encrypted in the database. Never shown in plaintext.{% endtrans %}

{% trans %}Used to verify incoming webhook events from Stripe. Endpoint:{% endtrans %} {% trans %}/webhook/stripe{% endtrans %}

{% trans %}PayPal{% endtrans %}

{% trans %}Manual / Bank Transfer{% endtrans %}

{% trans %}Yearly Subscription Discounts{% endtrans %}

{% trans %}Set the discount % applied when users choose the yearly billing period for each paid plan.{% endtrans %}

{% if plans %}
{% for plan in plans %} {% set periods = plan_periods.get(plan.id, []) %} {% set yearly = periods | selectattr('months', 'equalto', 12) | list %} {% set yearly_period = yearly[0] if yearly else None %}
{{ plan.name }}
${{ "%.2f"|format(plan.price_monthly) }}/{% trans %}mo{% endtrans %} · {% trans %}Yearly total without discount:{% endtrans %} ${{ "%.2f"|format(plan.price_monthly * 12) }}
{% if yearly_period %}
{% trans %}Current:{% endtrans %} {{ yearly_period.discount_percent|int }}% {% trans %}off{% endtrans %} → ${{ "%.2f"|format(plan.price_monthly * 12 * (1 - yearly_period.discount_percent / 100)) }}/{% trans %}year{% endtrans %} (${{ "%.2f"|format(plan.price_monthly * 12 * (1 - yearly_period.discount_percent / 100) / 12) }}/{% trans %}mo{% endtrans %})
{% endif %}
%
{% endfor %}
{% else %}
{% trans %}No paid plans found. Create a paid plan first.{% endtrans %}
{% endif %}
{% endblock %}