Installation¶
Install the Package¶
pip install django-athm
Configure Django Settings¶
Add the package to INSTALLED_APPS and configure your ATH Móvil tokens:
INSTALLED_APPS = [
# ...
"django_athm",
]
DJANGO_ATHM_PUBLIC_TOKEN = "your-public-token"
DJANGO_ATHM_PRIVATE_TOKEN = "your-private-token"
Find your tokens in the ATH Móvil Business app under Settings > Development > API Keys.
Warning
Never commit tokens to version control. Use environment variables or a secrets manager.
Add URL Configuration¶
Include the URL patterns in your root urls.py:
from django.urls import include, path
urlpatterns = [
# ...
path("athm/", include("django_athm.urls")),
]
This exposes:
/athm/webhook/- Webhook endpoint for ATH Móvil events/athm/api/- Payment API endpoints (used by the template tag)
Run Migrations¶
Create the database tables:
python manage.py migrate django_athm
Install Webhook URL¶
Register your webhook URL with ATH Móvil. See Webhooks for details.
Verify Installation¶
Check that the admin interface is accessible at /admin/django_athm/.