Skip to main content

pretix-epay

CI PyPI

A pretix plugin that adds epay.eu as a payment provider, accepting card payments, Apple Pay, and Google Pay through the epay.eu Checkout page.

Maintained by ByteServ.

Features

  • Card payment, Apple Pay, and Google Pay via the epay.eu Checkout page (redirect flow, no card data ever touches your pretix server).

  • Automatic payment confirmation via a single, instance-wide webhook — you register it once with epay.eu, not per event.

  • Refunds can be triggered directly from the pretix backend, using epay.eu’s transaction refund endpoint.

  • German and English translations included (compiled .mo shipped in the package, no build-time translation step required).

Requirements

  • pretix >= 2024.5.0

  • Python >= 3.10 (CI tests Python 3.10 with pretix 2024.5, and Python 3.12/3.13 with the latest pretix release)

  • An epay.eu merchant account with at least one Point of Sale configured

Installation

Manual installation (no Docker)

If pretix runs as a manual small-scale deployment (a Python virtualenv managed by systemd, no Docker involved), plugin installation follows the same pattern pretix itself documents for any other plugin — plain pip, no container build step needed:

sudo -u pretix -s
source /var/pretix/venv/bin/activate

# From PyPI:
(venv)$ pip3 install pretix-epay
# ...or from a local checkout:
(venv)$ pip3 install /path/to/pretix-epay
# ...or straight from GitHub:
(venv)$ pip3 install "pretix-epay @ git+https://github.com/ByteServIT/pretix-epay.git"

(venv)$ python -m pretix migrate    # no-op for this plugin (no DB models), but harmless / standard practice
(venv)$ python -m pretix rebuild    # rebuilds static files
exit

sudo systemctl restart pretix-web pretix-worker

The webhook (see Configuration below) needs the EPAY_WEBHOOK_TOKEN environment variable to be visible to the pretix-web process (it is read directly in the request handler, not by the background worker). Add it to /etc/systemd/system/pretix-web.service:

[Service]
...
Environment="EPAY_WEBHOOK_TOKEN=Bearer xxxxxxxx"

Then:

sudo systemctl daemon-reload
sudo systemctl restart pretix-web

(pretix-worker doesn’t need this variable — only the web process handles the webhook request.)

Docker

If you run pretix via the official pretix/standalone Docker image, you cannot install plugins into a running container — you build a small custom image on top of it instead:

FROM pretix/standalone:stable

USER root
RUN pip3 install pretix-epay && \
    rm -rf ~/.cache/pip

USER pretixuser
RUN cd /pretix/src && make production

(To build from a local checkout instead, replace the pip3 install step with COPY pretix-epay /pretix-epay and RUN pip3 install /pretix-epay.)

Point your pretix and cron (or whichever service runs the scheduled pretix cron job) services in docker-compose.yml at this custom image instead of pretix/standalone:stable, then:

docker compose build --no-cache
docker compose up -d

Here, the EPAY_WEBHOOK_TOKEN variable goes into the pretix service’s environment: block in docker-compose.yml instead of a systemd unit file.

Configuration

Per event

In pretix, open Event → Settings → Plugins and enable epay.eu. Then under Event → Settings → Payment → epay.eu, fill in:

  • Point of Sale ID — from your epay.eu backoffice under Point of Sale.

  • API key — the API key belonging to that Point of Sale.

Global (once per pretix instance)

The webhook is intentionally not scoped per event. It is registered once for your whole pretix instance and works for every organizer and event automatically — the specific payment is identified from the reference field epay.eu sends back, not from the URL.

  1. Log in to the epay.eu backoffice and open the Point of Sale you configured above. Find the webhook authorization / verification value there (not in a separate generic “Webhooks” section — it is tied to the specific Point of Sale).

  2. Copy the complete value, including its scheme (e.g. Bearer xxxxxxxx or Basic xxxxxxxx).

  3. Set it as the EPAY_WEBHOOK_TOKEN environment variable for your pretix web process — see the systemd or Docker instructions above, depending on how you installed the plugin.

  4. The webhook endpoint itself is: https://YOUR-DOMAIN/_epay/webhook/

We compare the incoming Authorization header byte-for-byte against EPAY_WEBHOOK_TOKEN — including the scheme — as recommended by the epay.eu webhook documentation, which explicitly warns not to assume the scheme is always Bearer.

Architecture notes

A few design decisions that aren’t obvious from the code alone:

  • Global webhook, not per-event. OrderPayment.full_id (e.g. ABC12-P-1) is only unique within an event, not across the whole instance. Since the webhook has no event context, we instead send epay.eu the payment’s Django primary key (payment.pk) as the reference — a plain integer, globally unique, and trivially valid against epay.eu’s reference validation regex (^[a-zA-Z0-9\-]{1,36}$).

  • ``@scopes_disabled()`` on the webhook view. pretix uses django-scopes to scope most queries to an active organizer, for multi-tenant safety. Since the global webhook doesn’t know the organizer in advance, the whole view (not just the lookup) needs @scopes_disabled() — exactly like pretix’s own PayPal2 webhook does internally.

  • No ``LazyI18nString`` for provider metadata. It’s tempting to use i18nfield.strings.LazyI18nString for translatable strings without a compile step. Don’t use it for verbose_name, public_name, or PretixPluginMeta.name/description — pretix core treats these as plain strings internally (.startswith() calls, sorted(key=...) comparisons), which LazyI18nString does not support and which will crash the plugin list and payment settings pages. This plugin uses gettext_lazy with a pre-compiled .mo file instead.

  • Refunds use the transaction ID, not the session ID. epay.eu’s refund endpoint is POST /transactions/:transactionId/refund. The transaction ID only exists once a payment attempt actually happened, so it’s captured from the webhook payload (transaction.id) and stored in payment.info, not from the initial session-creation response.

Known limitations

  • Amounts are converted to minor units using pretix’s own list of currency decimal places, so zero-decimal currencies (e.g. JPY) are handled correctly. pretix has no notion of three-decimal currencies (e.g. BHD, KWD) and treats them as two-decimal; these are not supported.

  • Does not yet handle refunds initiated directly in the epay.eu backoffice (i.e. there’s no webhook handling for externally-triggered refund events) — refunds must go through the pretix backend to be reflected in pretix.

Development

See CONTRIBUTING.rst for the local setup (native or Docker), running the tests, translations, and the release process.

License

Apache License 2.0. See LICENSE for the full text.

Metadata

Release files for pretix-epay 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pretix-epay 0.1.0
File Size Uploaded Provenance Actions
pretix_epay-0.1.0.tar.gz 33.1 kB With provenance Details for pretix_epay-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pretix-epay 0.1.0
File Interpreter ABI Platform Actions
pretix_epay-0.1.0-py3-none-any.whl Python 3 none any Details for pretix_epay-0.1.0-py3-none-any.whl

Total release size: 56.4 kB

Release files / pretix_epay-0.1.0.tar.gz

Download URL pretix_epay-0.1.0.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8f926d1be8c970ace67b378caecc18416994efe8cdadca61cf91f7f0b0365e75
BLAKE2b-256 checksum
How to use checksums
ed1649eacb14f738037c3af3ad13078ed9c2d7c14727df57493655fd96870d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / pretix_epay-0.1.0-py3-none-any.whl

Download URL pretix_epay-0.1.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15afe665628d6d7e3fb97e990b658f9aa557c3b8ca1fb9fa34d969de78fb2182
BLAKE2b-256 checksum
How to use checksums
a03b7a136bb115522f5e44c7200c94c7cf8b63606c0b691a5ecca1b68f41f524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for pretix-epay 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pretix_epay-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page