API Reference
Public exports from @firma/pay. For checkout integration, start with PayWithFirma.
Components
PayWithFirma— checkout widget (props)
Hooks
usePaymentWatcher— Chronik WebSocket payment watching for custom UIs
Types
PayWithFirmaPropsFirmaPayCurrency—"USD","CHF", or"EUR"PaymentPhase,UsePaymentWatcherParams,UsePaymentWatcherResult
Validation helpers
getOrderIdUtf8ByteLength(orderId)isValidOrderId(orderId)validateOrderId(orderId)FPAY_ORDER_ID_BYTES_MAX— max UTF-8 bytes fororderId(100)isEcashAddressReceiver(receiver)getInvalidEcashAddressError(receiver)
Advanced utilities
For custom checkout flows or server-side payment verification:
encodeFpayEmpp,encodeFpayEmppRaw,decodeFpayEmpp,decodeFpayEmppFromPush,decodeFpayEmppRawbuildFirmaPayQrPayloadisMatchingFirmaPayment
Stylesheet
Import @firma/pay/firma-pay.css once in your app. See Installation.