Skip to main content

The Pay payment provider for Pretix

Project description

The Pay payment provider plugin for Pretix.

This plugin provides full integration with the The Pay payment gateway for Pretix event ticketing system, implementing secure payment processing with The Pay REST API and HMAC-SHA256 signature verification.

Features

  • Full The Pay integration with REST API

  • Secure payment processing with HMAC-SHA256 signatures

  • Support for multiple currencies (ISO 4217)

  • Server-to-server notifications (IPN)

  • User redirect handling

  • Test mode support

  • Proper error handling and logging

  • Multi-language support (Czech, Slovak, English)

Installation

Install from PyPI:

pip install pretix-thepay

Or install from source:

pip install -e /path/to/pretix-thepay

Add the plugin to your Pretix configuration (pretix.cfg):

[pretix]
plugins = pretix_thepay

Restart your Pretix instance.

Configuration

  1. Go to your event’s payment settings in the Pretix control panel.

  2. Enable the The Pay payment provider.

  3. Configure the following settings:

    • Merchant ID: Your The Pay merchant ID

    • Project ID: Your The Pay project ID

    • API Password: Your The Pay API password

    • API URL: The Pay API URL - Production: https://api.thepay.cz/ - Test: Use the test API URL provided by The Pay

    • Gate URL: The Pay gate URL for redirects - Production: https://gate.thepay.cz/ - Test: Use the test gate URL provided by The Pay

    • Language: Default language for payment gateway (Czech, Slovak, or English)

    • Test Mode: Enable for testing

Requirements

  • Pretix >= 4.0.0

  • Python >= 3.8

  • requests >= 2.25.0

Security

This plugin implements The Pay’s security requirements:

  • All payment requests are signed using HMAC-SHA256 with your API password

  • All payment responses are verified using HMAC-SHA256 signatures

  • API credentials are stored securely in Pretix’s configuration

  • Message integrity is verified for all transactions

How It Works

  1. Payment Initiation: When a customer selects The Pay, a payment is created via The Pay REST API and the customer is redirected to The Pay gateway.

  2. Payment Processing: The customer completes payment on The Pay’s secure gateway.

  3. Return Handling: After payment, the customer is redirected back to your Pretix instance, where the payment status is verified using The Pay’s signature.

  4. Server Notification: The Pay also sends a server-to-server notification to confirm the payment status.

Supported Currencies

The Pay supports all ISO 4217 currency codes. Common currencies include:

  • CZK (Czech Koruna)

  • EUR (Euro)

  • USD (US Dollar)

  • GBP (British Pound)

  • PLN (Polish Zloty)

  • And many more…

Docker Installation

You can install the plugin in a Dockerized Pretix environment:

FROM pretix/standalone:stable
USER root
RUN pip3 install pretix-thepay
USER pretixuser
RUN cd /pretix/src && make production

Troubleshooting

Payment Not Processing

  • Verify your merchant ID and project ID are correct

  • Check that API password is correct

  • Ensure the API and gate URLs are correct for your environment (test/production)

  • Check Pretix logs for detailed error messages

Signature Verification Failures

  • Verify you’re using the correct API password

  • Ensure parameters are being sent in the correct format

  • Check that the signature generation matches The Pay’s requirements

API Connection Issues

  • Verify network connectivity to The Pay API

  • Check that API URL is accessible

  • Ensure firewall rules allow outbound connections to The Pay servers

License

Apache Software License 2.0

Support

For issues related to:

  • Plugin functionality: Check the Pretix documentation and plugin development guide

  • The Pay integration: Refer to The Pay’s integration documentation at https://docs.thepay.eu/

  • Payment processing: Contact The Pay support

References

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

pretix_thepay-1.0.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretix_thepay-1.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pretix_thepay-1.0.0.tar.gz.

File metadata

  • Download URL: pretix_thepay-1.0.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pretix_thepay-1.0.0.tar.gz
Algorithm Hash digest
SHA256 85e9ee0f9e073747dfa8da80fa872576e35660987a8d7c0d0bc224d5e775d5f0
MD5 490ccf00b78e36043d5a4eb369885ec8
BLAKE2b-256 392f1cc82210d7ce953656ff7aa7b5371adb80e143b6d47544f2c2aa10b6f004

See more details on using hashes here.

File details

Details for the file pretix_thepay-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pretix_thepay-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pretix_thepay-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0befcd1642b65a7c4bba13b95cca06a7f5a27ebee47380a476d490f941ae7c72
MD5 28a07a2ffc29c83669605fdb138d21ff
BLAKE2b-256 4a88d4a5d6a64b69056b404ce52b42a99ea9e3f6f6ad920a1cbeb9455b21f055

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page