Create
Send the amount in sats and a fresh address from your Bitcoin wallet.
Bitcoin payments API
Create invoices in sats. Send customers a payment link. Track confirmations from your app.
$ POST /api/invoices
Send the amount in sats and a fresh address from your Bitcoin wallet.
Use the returned Bitcoin URI as a payment link or turn it into a QR code in your checkout.
Fetch the invoice to see its current payment status and transaction ID.
// Use a fresh receiving address from your wallet. const invoice = await fetch("https://pay.relight.bond/api/invoices", { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" }, body: JSON.stringify({ amount_sats: 24500, address: freshAddress }) }).then(response => response.json()); window.location.href = invoice.payment_uri;
Create a Bitcoin invoice, send your customer a payment URI, and check its on-chain status. Relight tracks the payment; your wallet receives it directly.
https://pay.relight.bond/apiCreate an API key from the Relight dashboard. Pass it as a bearer token. Keys can only create and read invoices; they cannot access account, key-management, or other users' data.
API keys are shown only once. An optional allowed-origin restriction is enforced for browser requests. Restrict browser keys to your exact origin, and revoke keys you no longer use.
/api/invoicesCreates an invoice for an exact satoshi output. Use a fresh, unused address for each invoice. Reusing an address on Relight is rejected to avoid ambiguous payment attribution.
| Field | Type | Required | Description |
|---|---|---|---|
amount_sats | integer | Yes | Exact output amount in satoshis. Must be positive. |
address | string | Yes | Fresh Bitcoin mainnet receiving address generated by your wallet. |
confirmations_required | integer | No | Required confirmations (0–6). Default: 1. |
expires_in_minutes | integer | No | Invoice expiry (5–1440 minutes). Default: 30. |
Show payment_uri as a QR code or link in your checkout. The amount is exact; underpayments and overpayments do not mark the invoice paid.
/api/invoices/{invoice_id}Fetches your invoice and checks recent transactions for an exact matching output. This performs an on-demand check against mempool.space; poll no more often than once every 10 seconds per invoice.
The response uses the same invoice fields as creation, plus txid and last_checked_at (null until a matching payment is detected).
unpaidNo exact matching output has been seen.
detectedA matching output is seen but required confirmations have not landed.
paidThe exact amount has reached the configured confirmation count.
expiredThe invoice passed its expiry time before it was marked paid.
With confirmations_required: 0, an unconfirmed matching output is accepted as paid. Consider your risk tolerance before using zero confirmations for valuable orders.
Errors return JSON with a human-readable error field.
| HTTP | Meaning |
|---|---|
| 400 | Invalid JSON or invoice parameters. |
| 401 | Missing or invalid API key. |
| 403 | API key origin restriction does not match. |
| 404 | Invoice does not exist or is not owned by this account. |
| 409 | The receiving address has already been used for an invoice. |
| 502 | mempool.space is unavailable; retry the status check later. |
| 503 | A dependency health check failed. |
Browser API keys can be extracted from client code; origin restrictions help constrain browser use but are not a substitute for server-side secrecy. These keys are intentionally limited to invoice creation and reading. Only send addresses you control. Never send a seed phrase or private key to Relight.
Invoice status depends on mempool.space availability and public chain data. This version does not send webhooks. Email verification and password recovery are not configured, so operators should not treat the account dashboard as production-ready identity management yet.
Service health: View service status ↗
Live checks for the Relight Pay API and its dependencies. Payment status is verified against public Bitcoin network data from mempool.space.
Checks are run from the Worker when this page loads and every 60 seconds. A degraded mempool.space connection can delay invoice updates; it does not affect Bitcoin or move funds. This status page currently shows live dependency checks, not historical uptime or incident notifications.
Questions? Read the API documentation or return to Relight Pay.