Pay an invoice with a Fonepay Direct-QR
Mint a Fonepay Direct-QR for a specific invoice so the customer can pay it by scanning a QR in your own UI / at a counter, instead of the hosted bill page. A successful scan marks the invoice paid and activates the subscription (incomplete→active) - the same outcome as paying via the bill page.
No request body - the amount and customer come from the invoice. The returned session also works with Stream Direct-QR events (GET /v1/qr/{id}/events, SSE) and Refresh a Fonepay Direct-QR (POST /v1/qr/{id}/refresh).
Requires the billing:write scope (available on Growth and higher) and Fonepay configured for the project in this mode.
Authorizations
Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: sk_test_ for testing, sk_live_ for production.
Path Parameters
Invoice ID (prefix: inv_).
Response
A Fonepay Direct-QR was minted for the invoice. (Response carries an extra invoice_id.)
A Direct-QR session for Fonepay. Embed qr_image in your UI and subscribe to events_url for live status.
Session ID. Also the listener token for the SSE events stream.
"cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
true when created with a live key, false for sandbox.
Amount in paisa.
10000
"NPR"
fonepay Always initiated on creation.
initiated Raw Fonepay QR payload string. Encode this if rendering your own QR.
Base64-encoded PNG data URL of the QR (320px).
"data:image/png;base64,iVBORw0KGgo..."
Server-Sent Events URL streaming qr.scanned / qr.paid / qr.expired events. No API key required - the session ID is the listener token.
"https://api.paybridgenp.com/v1/qr/cs_01j9x2k3m4n5p6q7r8s9t0u1v2/events"
When the Fonepay QR expires.