PayWithFirma
The main checkout component. Renders a “Pay with Firma” button, QR code screen, payment animations, and optional tagline.
Props
| Prop | Type | Required | Description |
|---|---|---|---|
receiverUsername | string | yes | Any valid ecash: address or your Firma username (with or without @) |
orderId | string | yes | Unique order ID in the FPAY EMPP push (max 100 UTF-8 bytes) |
amount | string | yes | Decimalized Firma amount (e.g. "10.50") |
currency | "USD" | "CHF" | "EUR" | no | Checkout currency (default: "USD"); sets BIP21 token_id |
chronikUrls | string[] | no | Chronik endpoints with failover (default: https://chronik.firma.cash) |
onPaymentFinalized | (txid: string) => void | no | Called when payment finalizes (pre-consensus) |
showTagline | boolean | no | Show promotional text below the card |
className | string | no | Extra CSS class on the root element |
Payment flow
- Customer clicks Pay with Firma or scans the QR code.
- Firma Wallet opens with a BIP21 payload including FPAY order metadata.
- The widget watches Chronik for a matching payment (see Payment Detection).
onPaymentFinalized(txid)fires when the transaction finalizes.