openreceive / symfony-bundle
Accept Bitcoin Lightning payments in Symfony with your own wallet and existing database. Optional USDT, USDC, SOL and ETH swaps settle as BTC over Lightning.
Package info
github.com/OpenReceive/openreceive-symfony
Type:symfony-bundle
pkg:composer/openreceive/symfony-bundle
Requires
- php: ^8.2
- doctrine/dbal: ^3.6 || ^4.0
- doctrine/doctrine-bundle: ^2.11 || ^3.0
- doctrine/orm: ^2.16 || ^3.0
- nyholm/psr7: ^1.8
- openreceive/openreceive: ~0.6.6
- psr/cache: ^2.0 || ^3.0
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/console: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/filesystem: ^6.4 || ^7.0 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
- symfony/http-foundation: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
- symfony/psr-http-message-bridge: ^6.4 || ^7.0 || ^8.0
- symfony/routing: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5 || ^12.0
- symfony/browser-kit: ^6.4 || ^7.0 || ^8.0
- symfony/http-client: ^6.4 || ^7.0 || ^8.0
- symfony/yaml: ^6.4 || ^7.0 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Add Bitcoin Lightning checkout to your Symfony app and receive payments directly into a wallet you control. OpenReceive handles payment attempts and settlement reconciliation in your existing database, while your app keeps its orders, users, prices, and fulfillment.
This bundle connects the openreceive/openreceive PHP engine to Symfony's
routing, service container, Doctrine DBAL connection, Doctrine Migrations and
console. Its install command creates the configuration and three application
hooks.
Docs and setup: openreceive.org/integrations/symfony
OpenReceive supports optional swaps from USDT, USDC, SOL, and ETH through a configured swap provider. The provider converts the payment to BTC over Lightning, which settles into the merchant's connected wallet. Available assets and networks depend on the provider; swaps are optional.
Install
Requires PHP 8.2 or later with ext-gmp, sodium, mbstring, and a PDO
driver, plus Symfony 6.4, 7 or 8 with DoctrineBundle.
composer require openreceive/symfony-bundle -W bin/console openreceive:install bin/console doctrine:migrations:migrate
Register OpenReceive\Symfony\OpenReceiveBundle::class => ['all' => true] in
config/bundles.php if Flex did not. openreceive:install writes four files:
config/packages/openreceive.yaml: the settings (bin/console config:dump-reference openreceivelists every option).config/routes/openreceive.yaml: the routes, under/openreceive.src/OpenReceive/Host.php:authorize,amountForandonPaid, with the two generated placeholders wired in.migrations/Version*.php: both engine tables, with the engine's own DDL.
Put a receive-only NWC code in NWC_URI in .env.local
(get one), and
fill in the three hooks against your own order entity.
bin/console openreceive:doctor reports each step as set or unset and never
prints a secret.
Commands
| Command | What it does |
|---|---|
openreceive:install |
Scaffold the config, routes, Host and migration |
openreceive:doctor |
Credentials (set/unset only), host hooks, route mount, wallet preflight |
openreceive:reconcile |
One reconciliation pass over pending payment attempts |
openreceive:notifications |
Optional worker: NWC-02 notifications plus a periodic pass |
openreceive:skills |
Install the bundled agent skills into this project |
The full walkthrough is the
Symfony quickstart, and
examples/symfony-starter
is a one-product shop built on it.
License
MIT