Bitcoin / Lightning Integration
YnoPay supports non-custodial Bitcoin payments via Lightning Network and on-chain. Funds go directly to the merchant's own wallet.
Lightning payments
- Create a PaymentIntent with
rail: "btc_lightning" - YnoPay generates a BOLT11 invoice via the merchant's Phoenixd node
- Customer scans the invoice QR or clicks the Lightning link
- Payment settles instantly (typically < 3 seconds)
- Webhook fires with
payment_intent.succeeded
Example
const pi = await ynopay.paymentIntents.create({
amount: 50000, // sats
currency: 'BTC',
rail: 'btc_lightning',
});On-chain payments
- Create a PaymentIntent with
rail: "btc_onchain" - YnoPay derives a unique address from the merchant's xpub
- Customer sends BTC to the address
- YnoPay watches for confirmations via Esplora (mempool.space)
- After 1 confirmation, the payment is marked as succeeded
Settlement
Merchants can choose to keep BTC or auto-convert to FCFA at receipt time via integrated partners (Yellow Card, Bitnob).
Non-custodial guarantee
YnoPay never holds the merchant's private keys or seed phrase. The Phoenixd wallet runs on the merchant's infrastructure (or a dedicated YnoPay node with merchant-owned keys). All payments settle directly into the merchant's wallet.