Bitcoin payment extension for OpenCart — accept Bitcoin and Lightning with Coinsnap or your own BTCPay Server.
Coinsnap for OpenCart is an open-source Bitcoin payment extension for OpenCart 4. It integrates Bitcoin payments into the existing OpenCart checkout and order workflow.
Customers can pay with Bitcoin via Lightning or on-chain. Merchants can use Coinsnap without operating their own Bitcoin or Lightning payment infrastructure, or connect their own BTCPay Server.
Coinsnap is Bitcoin payment software for merchants and a brand of Onlineshop24 d.o.o., Serbia.
- Accept Bitcoin and Lightning payments in OpenCart
- Support for Lightning and Bitcoin on-chain
- Support for Coinsnap and BTCPay Server
- No own Lightning node or Bitcoin payment server required when using Coinsnap
- Native integration into the OpenCart checkout and order flow
- Configurable mapping of gateway payment states to OpenCart order statuses
- Webhook-based payment status updates
- Optional automatic redirect after payment
- Custom redirect page after payment
- Optional Bitcoin discount at checkout
- Minimum payment checks
- Open source under the GPL-2.0 License
The current extension release is 1.2.0 and requires:
- OpenCart 4
- PHP 7.4 or newer
- A Coinsnap merchant account, or
- Your own BTCPay Server
For Bitcoin settlement with Coinsnap, you can use a compatible Bitcoin or Lightning wallet. One option is the Coinsnap Wallet, which combines a self-custodial Bitcoin wallet with merchant and point-of-sale functionality.
- Create a Coinsnap merchant account.
- Install the Coinsnap payment extension in OpenCart.
- Choose Coinsnap or BTCPay Server as the payment provider.
- Enter the required Store ID and API credentials.
- Configure the OpenCart order status mapping.
- Enable the Bitcoin payment method.
- Perform a test transaction before going live.
The extension supports two payment-provider modes:
- Coinsnap — for merchants who want to accept Bitcoin without running their own Bitcoin or Lightning payment infrastructure.
- BTCPay Server — for merchants who operate their own BTCPay Server and want to connect it to OpenCart.
BTCPay Server support was added in version 1.1.0.
- Open the Coinsnap OpenCart extension page.
- Download the latest extension version.
- In OpenCart administration, go to Extensions → Installer.
- Upload the downloaded ZIP file.
- Install the Coinsnap payment extension.
You can also download the source code from this repository and install it through the OpenCart extension installer.
After installation:
- Go to Extensions → Extensions.
- Select Payments as the extension type.
- Find Coinsnap and install/enable it.
- Open the extension settings.
- Select Coinsnap or BTCPay Server as your provider.
- Enter the relevant connection data:
- Coinsnap Store ID and API key, or
- BTCPay Server URL, Store ID and API key.
- Map OpenCart order statuses to payment gateway statuses.
- Configure redirect and optional Bitcoin discount settings.
- Save the configuration and test the payment flow.
Recommended order-status mapping:
- Pending → New
- Expired → Expired
- Complete → Settled
- Processing → Processing
Version 1.2.0 adds an optional Bitcoin discount that can be configured as a fixed amount or percentage.
To use it:
- Install the Coinsnap Bitcoin Discount extension included with the package.
- Open the relevant OpenCart total-extension settings.
- Enable the discount and configure the desired value.
- The discount is applied when Bitcoin or Lightning is selected as the payment method.
- Coinsnap OpenCart demo store
- Coinsnap for OpenCart article
- OpenCart Extension Marketplace listing
- Coinsnap Wallet
- Coinsnap API documentation
- Coinsnap merchant account
- Coinsnap website
- Telegram community and support
Brand note: Coinsnap is Bitcoin payment software for merchants and is not the provider of the similarly named coin identifier app "CoinSnap".
You need an OpenCart 4 store and either a Coinsnap merchant account or your own BTCPay Server. When using Coinsnap, you do not need to operate your own Lightning node or Bitcoin payment server.
Yes. Coinsnap supports Bitcoin payments via both the Lightning Network and Bitcoin on-chain.
Yes. BTCPay Server is supported as an alternative payment provider.
You can use a compatible Bitcoin or Lightning wallet for settlement. One option is the Coinsnap Wallet.
Other compatible wallets may include solutions such as Wallet of Satoshi, Blink and Zeus, depending on the settlement setup you choose.
Coinsnap follows a non-custodial approach and does not hold merchant Bitcoin. Payments are settled to the merchant's configured wallet or payment destination.
Yes. Version 1.2.0 includes an optional Coinsnap Bitcoin Discount extension that supports fixed or percentage discounts.
The extension uses webhooks to receive payment status changes and maps them to the configured OpenCart order statuses.
Yes. The extension supports both an automatic redirect option and a custom redirect page after payment.
Coinsnap is designed for merchants worldwide. Bitcoin and Lightning payments can be accepted from customers globally, subject to any legal or service restrictions that may apply in the merchant's jurisdiction.
Use the support area in your Coinsnap merchant account or join the official Coinsnap Telegram channel.
- Security: Webhooks are verified with the timestamped
X-Coinsnap-Signatureheader (Coinsnap) orBTCPay-Sig(BTCPay Server), with a timing-safe comparison. A missing webhook secret rejects every webhook. - Security: An order changes only for an invoice this extension created for it, and is marked paid only when the invoice is settled for the amount and currency the extension asked for. Before, any invoice in the same Coinsnap store with a matching order ID could change an order's status, including moving a paid order back.
- Security: Each invoice marks an order paid once, and paid, shipped or refunded orders are no longer changed by a webhook. BTCPay invoices marked settled by hand are not accepted.
- Security: Webhook bodies, customer names and API errors are no longer written to the OpenCart log. Rejected webhooks are logged with a fixed reason.
- Security: API keys are no longer shown in the admin, and a failed webhook registration no longer prints the stored webhook secret. Leave a key field empty to keep the stored key; a changed BTCPay Server URL needs the key entered again.
- Security: Starting a payment no longer places the order. OpenCart counts Pending as a processing status (stock is subtracted, coupons are redeemed, confirmation mails go out), so every unpaid checkout used to look like a placed order. The order is placed when the payment server reports the invoice as Processing or Settled; until then it is listed under Missing Orders.
- Security: Processing and Expired webhooks no longer change a status the merchant set by hand. An Expired invoice no longer places an unplaced order.
- Security: Orders from before 1.3.0, which have no invoice record, are accepted for one day after the upgrade only.
- Security: The webhook secret is stored with its provider and store; a secret registered for another store or provider is not used. Saving the settings once after the upgrade replaces the webhook and its secret.
- Security: A pasted BTCPay API key is saved only if BTCPay reports that all its permissions are store permissions for the configured store. Unrestricted keys and keys for all stores are refused.
- Security: Saving the Coinsnap discount total requires the modify permission (the check was ignored).
- Fix: Orders in a currency other than the store's default were invoiced with the default-currency amount.
- Fix: A payment server outage while saving the settings no longer replaces the webhook.
- Fix: The geo zone setting was ignored (catalog and admin form now use the same key).
- Added Coinsnap Bitcoin discount on checkout with fixed-amount or percentage options.
- Fixed storage of the selected payment gateway.
- Updated the Coinsnap PHP library.
- Added handling for currencies not supported by BTCPay Server during invoice creation.
- Added custom redirect after payment.
- Added automatic redirect after payment option.
- Updated Coinsnap PHP library.
- Added BTCPay Server as a Bitcoin payment gateway.
- Added minimum payment checks.
- Added connection-status notice.
- Added webhook persistence and signature validation.
- Initial release.
