PayWithFirma

The main checkout component. Renders a “Pay with Firma” button, QR code screen, payment animations, and optional tagline.

Props

PropTypeRequiredDescription
receiverUsernamestringyesAny valid ecash: address or your Firma username (with or without @)
orderIdstringyesUnique order ID in the FPAY EMPP push (max 100 UTF-8 bytes)
amountstringyesDecimalized Firma amount (e.g. "10.50")
currency"USD" | "CHF" | "EUR"noCheckout currency (default: "USD"); sets BIP21 token_id
chronikUrlsstring[]noChronik endpoints with failover (default: https://chronik.firma.cash)
onPaymentFinalized(txid: string) => voidnoCalled when payment finalizes (pre-consensus)
showTaglinebooleannoShow promotional text below the card
classNamestringnoExtra CSS class on the root element

Payment flow

  1. Customer clicks Pay with Firma or scans the QR code.
  2. Firma Wallet opens with a BIP21 payload including FPAY order metadata.
  3. The widget watches Chronik for a matching payment (see Payment Detection).
  4. onPaymentFinalized(txid) fires when the transaction finalizes.