Pretix plugin for tracking and reporting payment provider fees (Mollie, SumUp)
Project description
Pretix Payment Fees Tracker
A Pretix plugin that automatically tracks, synchronizes and reports payment provider fees from Mollie and SumUp, providing comprehensive accounting reports with fee breakdowns.
Supported Languages
๐ This plugin is available in 8 languages with 100% translation coverage:
- ๐ฌ๐ง English (Base)
- ๐ซ๐ท Franรงais (French)
- ๐ฉ๐ช Deutsch (German)
- ๐ช๐ธ Espaรฑol (Spanish)
- ๐ณ๐ฑ Nederlands (Dutch)
- ๐ฎ๐น Italiano (Italian)
- ๐ต๐น Portuguรชs (Portuguese)
- ๐ต๐ฑ Polski (Polish)
Features
- Automatic Fee Synchronization: Automatically fetch and sync payment fees from Mollie and SumUp APIs
- Comprehensive Reporting: Generate detailed accounting reports including:
- PDF accounting reports with payment provider fee sections
- Payment and refund lists with fee columns
- CSV/Excel exports with complete fee data
- Multi-Provider Support: Currently supports:
- Mollie (including OAuth integration)
- SumUp
- Real-time Fee Display: View payment fees directly in Pretix order details
- Bulk Operations: Synchronize fees for multiple events at once
- Smart Caching: Reduces API calls with intelligent Django caching
- Diagnostic Tools: Monitor cache status and API errors
Installation
Prerequisites
- Pretix >= 2024.0.0 fre
- Python >= 3.11
- Access to Mollie and/or SumUp APIs
Docker Installation (Recommended)
The plugin should be integrated into the Pretix Docker image:
FROM pretix/standalone:stable
USER root
# System dependencies for WeasyPrint
RUN apt-get update && apt-get install -y \
libpango-1.0-0 libpangoft2-1.0-0 \
libharfbuzz0b libffi-dev libjpeg-dev \
libopenjp2-7-dev libcairo2 libgdk-pixbuf2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install the plugin
RUN pip3 install pretix-payment-fees
USER pretixuser
RUN cd /pretix/src && make production
Run Migrations
After deployment, execute migrations:
docker exec pretix-dev python -m pretix migrate
Configuration
PSP Configuration (Organizer Level)
- Login as administrator
- Navigate to Organizer โ PSP Configuration
- Configure your API keys:
Mollie Setup
- API Key: Get from Mollie Dashboard
- Format:
live_...(production) ortest_...(sandbox) - Test Mode: Check if using test key
- Enable Mollie: Check to activate integration
SumUp Setup
- API Key: Create OAuth app on SumUp Developer Portal
- Request
paymentsscope from SumUp - Merchant Code: Your SumUp merchant identifier
- Test Mode: Check if using sandbox environment
- Enable SumUp: Check to activate integration
Advanced Options
- Cache Duration: Default 3600 seconds (1h). Increase for high transaction volumes.
Usage
PSP Synchronization
- Go to Organizer โ PSP Synchronization
- Select events to synchronize
- Choose dry run or full sync
- Click Synchronize Fees
Generating Reports
Accounting Report with Fees
- Navigate to Event โ Data exports
- Select Accounting Report (with banking fees)
- Configure date range and options
- Export as PDF
Payment List with Fees
- Navigate to Event โ Data exports
- Select Payments and refunds with banking fees
- Export in CSV or Excel format
Export Formats
CSV/Excel Columns
| Column | Description |
|---|---|
| Payment Date | Payment date and time |
| Order ID | Pretix order code |
| Payment Method | Provider (mollie, sumup, etc.) |
| Gross Amount | Total amount paid |
| PSP Fees | Provider transaction fees |
| Net Amount | Gross - Fees |
| Currency | EUR, USD, etc. |
| PSP Transaction ID | Provider transaction ID |
| Settlement ID | Settlement ID (Mollie only) |
| Status | confirmed, refunded, etc. |
Report Sections
- Main Table: Transaction list
- Global Totals: All payment aggregations
- PSP Totals: Aggregation by payment method
- Accounting Control: Verification that Gross - Fees = Net
Management Commands
# Sync fees for all events of an organizer
python manage.py sync_psp_fees --organizer=your-org
# Sync specific event
python manage.py sync_psp_fees --organizer=your-org --event=your-event
# Dry run mode
python manage.py sync_psp_fees --organizer=your-org --dry-run
API Integrations
Mollie APIs
- Balances API:
/v2/balances/{id}/transactions - Settlements API:
/v2/settlements/{id} - Payments API:
/v2/payments/{id} - Mollie Documentation
SumUp APIs
- Transactions API:
/v0.1/me/transactions - Transaction History:
/v0.1/me/transactions/history - SumUp Documentation
Known Limitations
Mollie
- Fees only available if settlement exists
- Fallback: 2.1% + 0.25 EUR estimation (standard EU card rate)
- Historical data limited (from July 2022)
SumUp
- API may require manual approval for
paymentsscope - Fees not always directly provided
- Fallback: 1.95% + 0.15 EUR estimation
General
- PSP transaction โ Pretix payment matching done by stored ID
- If ID unavailable, matching by amount/date (may be imprecise)
- Partial refunds may require manual verification
Diagnostics
Diagnostic page available at Organizer โ PSP Diagnostics:
- Configuration status
- Cache statistics (count, by provider, age)
- Recent errors tracking
Development
Project Structure
pretix_payment_fees/
โโโ __init__.py # Plugin metadata
โโโ signals.py # Signal receivers
โโโ models.py # PSPConfig, PSPTransactionCache
โโโ forms.py # PSP configuration forms
โโโ views.py # Configuration views
โโโ admin_views.py # Diagnostic views
โโโ urls.py # Plugin URLs
โโโ services/
โ โโโ psp_sync.py # Sync orchestration
โโโ psp/
โ โโโ mollie_client.py # Mollie API client
โ โโโ mollie_oauth_client.py # Mollie OAuth
โ โโโ sumup_client.py # SumUp API client
โโโ exporters/
โ โโโ accounting_report_psp.py # PDF accounting report
โ โโโ payment_list_psp.py # Payment list with fees
โโโ templates/
โโโ pretix_payment_fees/
โโโ settings.html # PSP config page
โโโ psp_sync.html # Sync page
โโโ diagnostic.html # Diagnostic page
Development & Testing
This plugin is designed to run within a Pretix environment. Testing should be done in a development Pretix instance:
-
Install in development mode:
docker exec pretix-dev pip install -e /path/to/pretix-payment-fees
-
Test the plugin:
- Create test events in your Pretix instance
- Configure PSP credentials (use test/sandbox keys)
- Process test payments through Mollie/SumUp
- Use the sync functionality to fetch fees
- Verify reports and exports
-
Code quality (optional):
# Format code black pretix_payment_fees/ --line-length=100 # Sort imports isort pretix_payment_fees/ --profile=black # Check translations python manage.py makemessages python manage.py compilemessages
Note: This plugin requires a full Pretix environment to function. Automated testing via CI/CD is not implemented as the plugin is tightly integrated with Pretix core.
Support
For issues and feature requests:
- Check logs:
docker logs pretix-dev - Review diagnostic page
- Verify API keys are valid
- Open a GitHub issue
License
Apache License 2.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
0.9.0 (2025-10-04) - Beta Release
- Initial public beta release
- Mollie integration with OAuth2 support (tested in production)
- SumUp integration (โ ๏ธ not yet tested in production, awaiting real merchant account)
- Multilingual support (EN, FR, DE, ES, NL, IT, PT, PL)
- CSV, Excel, PDF exports with fee breakdowns
- Accounting reports with PSP fees section
- Smart caching system
- Diagnostic and monitoring tools
Note: Version 1.0.0 will be released after successful SumUp production testing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pretix_payment_fees-1.0.1.tar.gz.
File metadata
- Download URL: pretix_payment_fees-1.0.1.tar.gz
- Upload date:
- Size: 162.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f9b94d4e6b39c190de78bc1955a2a860ad5d53eaa180e4fd28be1f2717e9ed
|
|
| MD5 |
b101edf5706144a283d5494b7bfd9424
|
|
| BLAKE2b-256 |
747d2b5edbb179cc94ff4d9067765fedf410727767011cfe60b9c60e07f2e834
|
Provenance
The following attestation bundles were made for pretix_payment_fees-1.0.1.tar.gz:
Publisher:
release.yml on valentin-gosselin/pretix-payment-fees
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pretix_payment_fees-1.0.1.tar.gz -
Subject digest:
52f9b94d4e6b39c190de78bc1955a2a860ad5d53eaa180e4fd28be1f2717e9ed - Sigstore transparency entry: 1357294511
- Sigstore integration time:
-
Permalink:
valentin-gosselin/pretix-payment-fees@209746e8987f401f450f64e43a4cb73f160745f3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/valentin-gosselin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@209746e8987f401f450f64e43a4cb73f160745f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pretix_payment_fees-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pretix_payment_fees-1.0.1-py3-none-any.whl
- Upload date:
- Size: 208.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dfc0da5a1d1d2cf0d0510333028e99019262af94f05b4ba4702a70cacb5ed82
|
|
| MD5 |
47be32a1cf5ec83fb74b02150c0ab746
|
|
| BLAKE2b-256 |
fe14eed41031474f12da030978daee796e3da393bd948eb8f01a290d06ee4b53
|
Provenance
The following attestation bundles were made for pretix_payment_fees-1.0.1-py3-none-any.whl:
Publisher:
release.yml on valentin-gosselin/pretix-payment-fees
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pretix_payment_fees-1.0.1-py3-none-any.whl -
Subject digest:
5dfc0da5a1d1d2cf0d0510333028e99019262af94f05b4ba4702a70cacb5ed82 - Sigstore transparency entry: 1357294595
- Sigstore integration time:
-
Permalink:
valentin-gosselin/pretix-payment-fees@209746e8987f401f450f64e43a4cb73f160745f3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/valentin-gosselin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@209746e8987f401f450f64e43a4cb73f160745f3 -
Trigger Event:
push
-
Statement type: