Metadata-Version: 2.4
Name: pretix-payzum
Version: 0.2.0
Summary: Accept crypto and stablecoin payments (USDC, USDT and more) in pretix through Payzum, non-custodially.
Author-email: Payzum <dev@payzum.com>
License: MIT License
        
        Copyright (c) 2026 Payzum
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/payzum-dev/pretix-payzum
Keywords: pretix,payments,crypto,stablecoin,usdc,usdt
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: payzum~=0.1.0
Dynamic: license-file

# Payzum for pretix

Accept crypto and stablecoin payments (USDC, USDT and more, multi-chain) for
your events. [Payzum](https://payzum.com) is **non-custodial**: funds settle
directly to your own wallet.

- Buyers are redirected to a hosted checkout page where they pick the asset and
  network; the ticket price stays denominated in your event currency. No card
  fields, no extra PCI surface.
- Orders are marked as paid from the **signed payment notification**
  (HMAC-SHA-512, verified by the official [`payzum`](https://pypi.org/project/payzum/)
  Python SDK), never from the buyer's browser return.
- Redelivered notifications are idempotent, and a late `expired` event can never
  downgrade an order that already settled.

## Installation

On a pip-based pretix installation (pretix ≥ 2025.2, Python ≥ 3.11):

```bash
pip install pretix-payzum
```

Then restart pretix, enable **Payzum** under *Settings → Plugins* for your
event, and configure it under *Settings → Payment → Payzum*:

| Field | Value |
|---|---|
| API key | From **Dashboard → Settings → API Keys** at [merchant.payzum.com](https://merchant.payzum.com) |
| Webhook secret | Shown once, at merchant creation or rotation |
| Environment | Production, or the isolated sandbox (`staging.payzum.com`, **separate API keys**) |
| Pay currency | `all` (default) lets the buyer pick on the hosted page; or pin a code like `usdcmatic` |

No webhook needs to be configured in the Payzum dashboard: every invoice the
plugin creates carries its own callback URL pointing back at your pretix
instance. The instance must be publicly reachable — Payzum delivers
notifications server-to-server.

## Statuses

The gateway emits five payment statuses; only `finished` marks the order paid:

| Payzum status | Effect on the pretix payment |
|---|---|
| `finished` | confirmed (order paid) |
| `expired`, `failed` | failed |
| `partially_paid` | pending, logged (underpaid — never fulfils) |
| `waiting` | no change |

## Development

```bash
pip install -e . pytest-django
pytest
```

## License

MIT
