django-payments-payzum
Accept crypto and stablecoin payments (USDC, USDT and more, multi-chain) in any django-payments project through Payzum — non-custodial: funds settle directly to your own wallet, Payzum never takes custody.
How it works
- The buyer picks Payzum at checkout and is redirected to a hosted checkout page, where they choose the asset and chain and send the payment. No wallet data touches your server.
- Crypto confirmation is asynchronous, so the payment is confirmed from
Payzum's signed server-to-server notification, never from the browser
return. A buyer who comes back while the payment is still confirming lands
on your success page with the payment in
waiting— the signed notification flips it toconfirmed. - Every notification is verified with HMAC-SHA-512 over the raw request bytes (with a replay window) before a single field of it is read, and the invoice amount and currency are re-checked against the payment before it is confirmed. Redelivered notifications are a no-op, so an order is never fulfilled twice.
Installation
pip install django-payments-payzum
Add the provider to your PAYMENT_VARIANTS:
PAYMENT_VARIANTS = {
"payzum": ("payments_payzum.PayzumProvider", {
"api_key": "...", # merchant.payzum.com → Settings → API Keys
"webhook_secret": "...", # shown once, at merchant creation or rotation
"endpoint": "production", # or "sandbox" (staging, separate API keys)
"pay_currency": "all", # or pin one asset, e.g. "usdcmatic"
}),
}
Keep both keys out of source control (environment variables or your secret store), like any other payment credential.
| Setting | Meaning |
|---|---|
api_key |
From your Payzum merchant dashboard |
webhook_secret |
Verifies incoming payment notifications |
endpoint |
production or sandbox |
pay_currency |
Optional. all lets the buyer choose; or a specific code like usdcmatic |
There is nothing to configure in the Payzum dashboard: the notification URL
(django-payments' own process/<token>/ route) is sent with every invoice.
The static process/payzum/ route also works — the payment is resolved from
the signed payload only.
Status mapping
| Payzum invoice | django-payments |
|---|---|
finished |
confirmed (after the amount and currency check) |
expired, failed |
rejected — but never downgrades a confirmed payment |
partially_paid |
unchanged (underpaid; logged, never fulfils) |
waiting, confirming |
unchanged |
| anything unknown | acknowledged and ignored |
Tests
pip install -e . pytest pytest-django
pytest
License
MIT. The payzum SDK it builds on is MIT
as well.
Release files for django-payments-payzum 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_payments_payzum-0.1.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_payments_payzum-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / django_payments_payzum-0.1.0.tar.gz
| Download URL | django_payments_payzum-0.1.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba8ded3dd752fefa51db261ce184f2a7b0f773ea63aa523db9275b347ef06607
|
|
BLAKE2b-256 checksum How to use checksums |
c3c03b2eccbfd9a874357143d830f7bae63d92724799384ba877ec10534adfee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / django_payments_payzum-0.1.0-py3-none-any.whl
| Download URL | django_payments_payzum-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dcbd325f03cbbdf45f07df410298e376c492df62bfee7d357ed68d83c45ddb8
|
|
BLAKE2b-256 checksum How to use checksums |
cfeeda4b14c0fbdc7e5269e28e5f834493c9ded2690bc3a06604d4b5b9466c76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|