Payment Page
Each invoice has a public payment page that customers can use to complete their payment. No authentication is required.
Payment page URL
https://fincobra.com/pay/:idWhere :id is the invoice UUID returned when you create an invoice.
Payment page API
The payment page frontend fetches invoice data from a public endpoint:
GET /api/checkout/pay/:idThis endpoint requires no authentication and returns:
{
"id": "a1b2c3d4-...",
"amountUsd": 49.99,
"amountBtc": 0.0005,
"btcRate": 99980,
"paymentState": "unpaid",
"receivedBtc": 0,
"remainingBtc": 0.0005,
"overpaidBtc": 0,
"btcAddress": "bc1q...",
"qrCode": "data:image/png;base64,...",
"status": "pending",
"productName": "Pro Plan - Monthly",
"redirectUrl": "https://yoursite.com/thank-you",
"txHash": null,
"txHashes": [],
"confirmations": 0,
"paidAt": null,
"confirmedAt": null,
"expiresAt": "2025-01-15T10:50:00.000Z",
"timeRemainingSeconds": 1140
}Features
The hosted payment page includes:
- QR code — BIP-21 payment URI (
bitcoin:<address>?amount=<btc>) scannable by any Bitcoin wallet - Live countdown — shows time remaining before the invoice expires
- Copy buttons — one-click copy for BTC address and amount
- Real-time status — polls for payment updates and shows progress (partial payments, confirmations)
- Auto-redirect — when the invoice reaches
confirmedstatus, the page automatically redirects to the configuredredirectUrl(if set)
Embedding
You can link customers directly to the payment page:
<a href="https://fincobra.com/pay/a1b2c3d4-...">
Pay with Bitcoin
</a>Or embed it in an iframe:
<iframe
src="https://fincobra.com/pay/a1b2c3d4-..."
width="100%"
height="600"
frameborder="0"
></iframe>Polling behavior
The payment page polls GET /api/checkout/pay/:id every few seconds while the invoice is pending or paid. Polling stops when the invoice reaches a terminal state (confirmed, expired, or underpaid).
Building a custom payment page
If you prefer a custom UI, use the public GET /api/checkout/pay/:id endpoint to fetch invoice data and build your own payment experience. The endpoint returns all the information needed: BTC address, amount, QR code, status, and countdown timer.