Repository navigation
v2.0.0: fiat payment support with core-based providers - #87
Draft
dadofsambonzuki wants to merge 31 commits into
Draft
dadofsambonzuki wants to merge 31 commits into
dadofsambonzuki wants to merge 31 commits into
Conversation
- Replaced standalone Fiat Configuration card and admin settings dialog with a single gear icon button that opens a combined modal - Extension Settings section (admin only) with network, mempool URL, webhook method via lnbits-dynamic-fields - Fiat Configuration section (all users) with per-provider toggles and password fields - Dialog auto-closes after saving fiat config
- Add api_endpoint, api_version, location_id to FiatConfig model - Add m017 migration for new fiat_configs columns - Show provider-specific fields in settings UI (Secret Key for Stripe, Client ID/Secret for PayPal, API Secret Key for Revolut, Access Token/Location ID for Square) instead of generic labels - Per-provider validation in canSaveFiatConfig (PayPal needs api_secret, Square needs location_id, others just api_key) - Use structured fields in helpers.py instead of parsing extra JSON
…_providers - Remove FiatConfig model, CRUD, API endpoints, UI, and migrations - Charge creation validates fiat_provider against settings.get_fiat_providers_for_user() - _create_*_checkout functions read credentials directly from core settings - Webhook verification uses core settings for secrets - Charge dialog fiat dropdown uses g.user.fiat_providers - Settings modal no longer has fiat configuration section
…remove hardcoded strings
…ix webhook double-encoding - Gracefully handle missing register_fiat_webhook_handler in core (required until PR #4051 is merged). - Send proper dict (charge.model_dump()) in webhook POST body instead of a pre-encoded JSON string (charge.json()) to avoid double-encoding.
… provider dropdown
Add settlement_method and settlement_proof columns to Charge (m017): - lightning: stores preimage as proof - onchain: stores txids as JSON proof - fiat: stores provider name and checkout/order id Record settlement in all payment detection paths (invoice listener, onchain websocket, balance polling, both fiat webhook handlers, and restart recovery). Expose both fields in the public charge payload and websocket updates, and show 'Paid via <method>' with the proof on the public paid screen. Also add m018 to backfill settlement info for historical paid charges from existing extra/fiat column data.
…ted hook) Commit c424acf accidentally removed the closing braces and the created() hook along with the fiat provider methods, leaving the file with a syntax error so the SatsPay page never rendered in the browser.
…outs Create fiat invoices via core create_payment_request(fiat_provider=...) tagged with the charge id, instead of calling Stripe/PayPal/Revolut/ Square APIs directly. Core owns the provider checkout session, verifies provider webhooks at its own callback endpoint, marks the internal payment paid and notifies invoice listeners. - on_invoice_paid settles charges with settlement_method/proof from payment.fiat_provider and extra.fiat_checking_id - check_charge_balance also polls the fiat payment status - drop /satspay/api/v1/fiat/webhook endpoint, handle_fiat_webhook_event and the PR #4051 dispatcher registration (not needed, per review) - store the core payment_hash in fiat_payment_requests for polling
…unavailable When no Bitcoin price provider responds (e.g. transient DNS/outbound network issues), get_fiat_rate_satoshis() silently returns 0.0, so the computed sats amount becomes 0 and create_charge() fails with the generic 'Amount must be greater than 0' exception. That surfaces to checkout flows (e.g. the events extension) as 'Could not create payment for any enabled method'. Raise a clear HTTP 503 with the failing currency instead, so callers and users can distinguish a transient rate outage from a bad request.
dadofsambonzuki
force-pushed
the
main
branch
from
September 22, 2026 14:15
87d03fb to
7d303de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major refactor to include fiat providers from LNbits core settings. Supports Stripe, PayPal, Square, and Revolut.
Changes
See individual commits for detailed changes.