{% extends 'base.html' %} {% load humanize %} {% block title %}My Payments{% endblock %} {% block content %}

My M-Pesa Payments

Back to Dashboard
How to Make a Payment
  1. Go to M-Pesa on your phone
  2. Select Lipa na M-Pesa
  3. Select Pay Bill
  4. Enter Business Number: 4159523
  5. Enter Account Number: Your Loan Number (optional)
  6. Enter Amount
  7. Enter your M-Pesa PIN and confirm
ℹ️ Tip: Use your registered phone number ({{ user.phone_number }}) to ensure automatic payment matching.
Payment History {% if page_obj %} {{ page_obj.paginator.count }} payments {% endif %}
{% if page_obj %}
{% for transaction in page_obj %} {% endfor %}
Date Transaction ID Amount Loan Status
{{ transaction.created_at|date:"Y-m-d H:i" }}
{{ transaction.created_at|timesince }} ago
{{ transaction.trans_id|default:"N/A" }} {% if transaction.mpesa_transaction_id %}
{{ transaction.mpesa_transaction_id }} {% endif %}
KES {{ transaction.amount|floatformat:2|intcomma }} {% if transaction.loan %} {{ transaction.loan.loan_number }}
Loan Amount: KES {{ transaction.loan.amount|floatformat:2|intcomma }} {% else %} Not matched {% endif %}
{% if transaction.status == 'confirmed' or transaction.status == 'processed' %} Processed {% if transaction.repayment %}
Repayment created {% endif %} {% elif transaction.status == 'pending' or transaction.status == 'validated' %} Pending {% else %} {{ transaction.get_status_display }} {% endif %}
{% if page_obj.has_other_pages %} {% endif %} {% else %}
ℹ️ You haven't made any M-Pesa payments yet. Follow the instructions above to make your first payment.
{% endif %}
{% endblock %}