django-athm
EN

ATH Móvil payments
for Django

Sync ATH Móvil transactions to your Django database via webhooks. Auto-persistence, admin dashboard, and signals included.

This is an unofficial, community-maintained package.

Not affiliated with Evertec, Inc. or ATH Móvil in any way.

Python 3.10 - 3.14
Django 5.1 - 6.0
Latest ATH Móvil API
Optional Quick-Start

Try it yourself

The included template tag provides a pre-built payment button for quick integration.

Support the Project

Tip Amount
$3.00
Supporting Django ATHM development
# views.py
def tip_page(request):
    context = {
        "ATHM_CONFIG": {
            "total": 3.00,
            "subtotal": 3.00,
            "tax": 0.00,
            # ...
        }
    }
    return render(...)
{# tip.html #}
{% load django_athm %}
{% athm_button ATHM_CONFIG %}

Everything you need

Developed for Django users who want payment integration without the complexity.

Auto-Persistence

Transactions, items, and customers automatically saved to your database on callback.

Django Admin Ready

Read-only dashboard with search, filtering, batch refunds, and webhook management.

Django Signals

Four signals: payment_completed, payment_cancelled, payment_expired, refund_sent.

One-Click Refunds

Process full or partial refunds directly from Django Admin with batch support.

Webhook Events

Automatic webhook handling with idempotency keys. Events logged and deduplicated.

Transaction Sync

Reconcile with ATH Móvil via athm_sync management command.

Purpose built for Django

Familiar patterns with batteries included.

Handle payment events with signals
# signals.py
from django.dispatch import receiver
from django_athm.signals import payment_completed
@receiver(payment_completed)
def handle_payment(sender, payment, **kwargs):
    # Send confirmation email
    # Update inventory
    # Trigger fulfillment
    send_receipt(payment.customer_email, payment)
Query webhook events with automatic deduplication
from django_athm.models import WebhookEvent
# Get all processed webhook events
WebhookEvent.objects.filter(
    event_type="ecommerce_completed",
    processed=True
)
# Events: ecommerce_completed, ecommerce_cancelled,
# ecommerce_expired, payment, refund
Reconcile transactions with ATH Móvil
python manage.py athm_sync \
  --from-date 2025-01-01 \
  --to-date 2025-01-31
# Query customer history
from django_athm.models import Client
client = Client.objects.get(phone="7871234567")
payments = client.payment_set.all()

How it works

  • Install

    pip install django-athm

  • Configure

    Add API keys and app to settings

  • Install Webhooks

    Via Admin or manage.py command

  • Done

    Transactions sync to your DB automatically

This project is not affiliated with or endorsed by Evertec, Inc. or ATH Móvil in any way.

View this page's source code