Skip to content

Fiat Payments

Accept card and PayPal payments alongside Lightning - configured at the server level by the Super User and consumed by any extension.

LNbits has a built-in fiat provider system. Admins enable Stripe and/or PayPal at the server level. Once configured, any extension can offer fiat payment options alongside Lightning without handling API keys or payment logic themselves.

How it works

Fiat payment flow - Super User configures providers, core service handles payments, extensions offer fiat to users

The key principle: admins configure, extensions consume. Extensions never store API keys or configure payment providers - they call the core fiat provider service.

Providers

ProviderPayment methodsSubscriptionsSetup guide
StripeCredit/debit cardsYesStripe setup →
PayPalPayPal balance, cards, bankYesPayPal setup →

You can enable one or both providers. Each operates independently.

What users see

When fiat providers are enabled, extensions that support fiat show multiple payment options:

MethodWhen availableHow it works
LightningAlwaysPay with any Lightning wallet via BOLT11 invoice
Card (Stripe)When Stripe enabledRedirected to Stripe Checkout
PayPalWhen PayPal enabledRedirected to PayPal payment page

Users choose their preferred method. The extension handles all flows transparently.

Provider limits

Both providers share the same limits framework. Control who can use fiat payments and how much they can pay:

SettingDescription
Allowed usersRestrict to specific user IDs (empty = everyone)
Minimum amountMinimum payment in sats
Maximum amountMaximum payment in sats
Max fee (sats)Maximum fee in sats
Percent feePercentage-based fee

Security

  • API keys are stored server-side and never exposed to extensions or users
  • Webhook signatures are verified to prevent spoofing
  • Only the Super User can configure fiat providers
  • Extensions access providers through a controlled core API, never directly

WARNING

Never expose provider secrets. They should only be configured by the Super User via the Admin UI or environment variables. Extensions must never store, log, or display API keys.

For extension developers

Extensions can add fiat payment support with minimal code:

python
# Check if a provider is available
is_fiat_provider_enabled("stripe")
is_fiat_provider_enabled("paypal")

# Get the provider and create a payment
provider = get_fiat_provider("stripe")
provider.create_invoice(...)
provider.get_invoice_status(...)
provider.create_subscription(...)

See the full Fiat Provider Integration developer guide for code patterns and examples.

News · Shop · SaaS · Telegram · Released under the MIT License.