Eventyay BitPay is a payment plugin for Eventyay. It allows event organisers to accept cryptocurrency payments through BitPay and BitPay compatible payment providers.
The plugin adds a BitPay payment provider to Eventyay. It supports connecting an event to BitPay, using BitPay test mode, connecting to third party providers with a BitPay compatible API, creating payment invoices, receiving payment status webhooks, handling payment returns, and processing refunds.
Eventyay BitPay is maintained as part of the Eventyay plugin ecosystem.
The plugin package is named eventyay-bitpay and the Python module is named eventyay_bitpay.
- Cryptocurrency payment support for Eventyay events
- BitPay account connection from the event payment settings
- BitPay test mode support
- Support for third party BitPay compatible API providers
- Custom public payment method name
- Invoice creation during checkout
- Payment return handling after the buyer completes payment
- Webhook handling for payment status updates
- Payment confirmation for paid, confirmed, and completed invoices
- Pending payment view for unpaid invoices
- Control view for payment details in the organiser interface
- Refund and partial refund support
- Payment data shredding for sensitive payment information
- Internationalisation support through Django translation files
- Python 3.9 or newer
- Eventyay 4.16.0 or newer
btcpay-python- A working Eventyay development or production setup
- A BitPay account or a BitPay compatible provider
Use this setup when developing the plugin together with a local Eventyay installation.
Set up Eventyay
First make sure you have a working Eventyay development setup.
See the Eventyay repository:
Clone this repository
Clone the plugin repository next to your Eventyay checkout or into the local plugin directory used by your Eventyay development setup.
git clone https://github.com/fossasia/eventyay-bitpay.git cd eventyay-bitpayActivate the Eventyay virtual environment
Activate the virtual environment used by your Eventyay installation.
Example:
cd ../eventyay/app . .venv/bin/activate
Install the plugin in editable mode
From the
eventyay-bitpaydirectory, install the plugin in editable mode.pip install -e .If your Eventyay development setup uses
uv, you can also use:uv pip install -e .Apply migrations
Run migrations from the Eventyay app directory.
python manage.py migrate
Compile translations
Compile translation files from the plugin directory.
make
Restart Eventyay
Restart the Eventyay development server and worker processes if they are running.
python manage.py runserver
If you use Docker for Eventyay development, restart the relevant containers after installing or changing the plugin.
- Open the Eventyay organiser interface.
- Open the event where cryptocurrency payments should be enabled.
- Go to the payment provider settings.
- Enable the BitPay payment provider.
- Connect the event to BitPay or to a BitPay compatible provider.
- Configure the public payment method name if needed.
- Save the payment settings.
- Test the checkout flow with a test order.
If no BitPay token is configured, the plugin shows connection options in the payment provider settings.
The organiser can:
- Connect with BitPay
- Connect with
test.bitpay.comfor test mode - Enter a custom BitPay compatible API URL and start pairing
After the BitPay token is authorised, return to Eventyay and refresh the payment provider settings page.
The plugin supports BitPay test mode through test.bitpay.com. In test mode, no real money is transferred.
Use test mode before enabling cryptocurrency payments for a live event.
The plugin can connect to third party providers that expose a BitPay compatible API.
To use such a provider, enter the provider API URL in the BitPay payment settings and start pairing.
During checkout, the plugin creates a BitPay invoice for the order payment amount and event currency. The buyer is redirected to the invoice URL returned by the payment provider.
The plugin stores the invoice data with the Eventyay order payment and records the external BitPay invoice reference.
The plugin exposes a webhook endpoint for payment provider notifications.
When a webhook is received, the plugin looks up the referenced BitPay object, validates that it belongs to the current event, logs the BitPay event, and processes the invoice status.
Invoice states handled by the plugin include:
newpaidconfirmedcompleteexpiredinvalid
Paid, confirmed, and complete invoices can confirm the Eventyay payment.
The plugin supports refunds and partial refunds through the BitPay compatible API.
If the provider reports an error during refund processing, the plugin raises an Eventyay payment exception so the organiser can see that the refund could not be completed automatically.
The plugin registers event specific URLs for BitPay payment handling.
Event URLs include:
/<organizer>/<event>/bitpay/webhook/
/<organizer>/<event>/bitpay/redirect/
/<organizer>/<event>/bitpay/return/<order>/<hash>/<payment>/
Control URLs include:
/control/event/<organizer>/<event>/bitpay/connect/
/control/event/<organizer>/<event>/bitpay/disconnect/
The plugin stores references to BitPay objects in ReferencedBitPayObject.
The model links the external BitPay reference to:
- The Eventyay order
- The Eventyay payment, if available
This allows webhook notifications to be mapped back to the corresponding Eventyay order and payment.
Run these commands from the plugin repository unless otherwise noted.
Install the plugin in editable mode:
pip install -e .Compile translations:
make
Regenerate translation files:
make localegen
Run tests, if tests are available in the checkout:
pytest
Important files and directories:
.
├── eventyay_bitpay/
│ ├── __init__.py Plugin version
│ ├── apps.py Eventyay plugin metadata
│ ├── models.py BitPay reference model
│ ├── payment.py Payment provider implementation
│ ├── signals.py Payment provider registration and display hooks
│ ├── urls.py Event and control URLs
│ ├── views.py Webhook, return, redirect, connect and disconnect views
│ ├── templates/ Django templates
│ ├── static/ Static assets
│ └── locale/ Translation files
├── pyproject.toml Python package metadata
├── setup.py Setuptools entry point
├── setup.cfg Tool configuration
├── MANIFEST.in Package data inclusion
├── Makefile Translation helper commands
├── LICENSE Apache License 2.0
└── README.rst Project documentation
The package metadata is defined in pyproject.toml.
The package includes:
- Python module
eventyay_bitpay - Static files
- Templates
- Locale files
- License file
The version is read from eventyay_bitpay.__version__.
The plugin stores payment provider responses as payment information in Eventyay.
The plugin includes a shred_payment_info implementation that masks sensitive data while keeping selected operational fields such as invoice ID, status, price, currency, invoice time, payment totals, transaction currency, and amount paid.
Before using the plugin for a live event:
- Test the provider connection with a test event.
- Verify that the payment method appears correctly in checkout.
- Confirm that the webhook endpoint is reachable from the payment provider.
- Place a test order and verify that payment confirmation updates the order.
- Test refund handling before relying on automatic refunds.
- Confirm that the event currency is supported by the selected BitPay compatible provider.
- Confirm that the public payment method name matches the cryptocurrency payment options actually accepted.
Eventyay BitPay is released under the terms of the Apache License 2.0.
See LICENSE for the full license text.
Copyright 2018 Raphael Michel.
Maintained by the Eventyay team and FOSSASIA.