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

  1. Create a PaymentIntent with rail: "btc_lightning"
  2. YnoPay generates a BOLT11 invoice via the merchant's Phoenixd node
  3. Customer scans the invoice QR or clicks the Lightning link
  4. Payment settles instantly (typically < 3 seconds)
  5. Webhook fires with payment_intent.succeeded

Example

const pi = await ynopay.paymentIntents.create({
  amount: 50000,          // sats
  currency: 'BTC',
  rail: 'btc_lightning',
});

On-chain payments

  1. Create a PaymentIntent with rail: "btc_onchain"
  2. YnoPay derives a unique address from the merchant's xpub
  3. Customer sends BTC to the address
  4. YnoPay watches for confirmations via Esplora (mempool.space)
  5. 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.