← Back to App · User Help Center
API Reference
For developers integrating InvoiceDLT into their own systems. Not what you're looking for? View the User Help Center →
Authentication
InvoiceDLT supports two auth methods:
- Session cookie — used by the web app automatically after login. No setup required.
- API key bearer token — for server-to-server calls. Pass as
Authorization: Bearer idlt_live_...header.
Generate API keys from Settings → API Keys inside the app. Keep them secret — treat them like passwords.
Endpoint Reference
Base URL: https://api.invoicedlt.com
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register | Create a new account. |
| POST | /api/auth/login | Log in, returns session token. |
| POST | /api/auth/logout | Invalidate session. |
| GET | /api/invoices | List all invoices (paginated). |
| POST | /api/invoices | Create a new invoice. |
| GET | /api/invoices/:id | Get invoice details. |
| PATCH | /api/invoices/:id | Update invoice fields. |
| DELETE | /api/invoices/:id | Delete (void) invoice. |
| POST | /api/invoices/:id/send | Email invoice to client. |
| POST | /api/invoices/:id/remind | Send payment reminder. |
| POST | /api/invoices/:id/mark-paid | Mark invoice as paid manually. |
| GET | /api/invoices/:id/pdf | Printable invoice page (HTML, suitable for puppeteer PDF). |
| GET | /api/clients | List all clients. |
| POST | /api/clients | Create a client. |
| GET | /api/clients/:id | Get client details. |
| PATCH | /api/clients/:id | Update client. |
| DELETE | /api/clients/:id | Delete client. |
| POST | /api/keys | Generate a new API key. |
| GET | /api/keys | List API keys (values masked). |
| DELETE | /api/keys/:id | Revoke API key. |
| POST | /api/webhooks | Register a webhook endpoint. |
| GET | /api/webhooks | List webhooks. |
| DELETE | /api/webhooks/:id | Delete webhook. |
| POST | /api/billing/subscribe | Create Stripe checkout session for subscription. |
| GET | /api/billing/portal | Get Stripe billing portal URL. |
Webhooks
Register a URL to receive POST notifications when invoice events occur.
Available Events
invoice.createdinvoice.sentinvoice.viewedinvoice.paidinvoice.overdueinvoice.voided
Verifying Webhook Signatures
Every webhook request includes an X-InvoiceDLT-Signature header. Verify it with HMAC-SHA256:
// Node.js
const crypto = require('crypto');
const sig = req.headers['x-invoicedlt-signature'];
const expected = crypto
.createHmac('sha256', process.env.WEBHOOK_SECRET)
.update(rawBody)
.digest('hex');
if (sig !== expected) return res.status(401).send('Invalid signature');
XRPL Payment Verification
For XRPL-based invoice payments:
- Client scans QR code and sends XRP from their wallet.
- Submit the XRPL transaction hash to:
POST /api/invoices/:id/verify-paymentwith body{"txHash": "..."} - InvoiceDLT validates the transaction on-chain and marks the invoice paid if amount and destination match.
The public payment page (/pay/:id) handles this automatically — manual verification is only needed for custom integrations.
Rate Limits
| Plan | Requests / minute | Invoices / month | Clients |
|---|---|---|---|
| Solo (Free) | 30 | 10 | 3 |
| Pro | 120 | Unlimited | 50 |
| Business | 600 | Unlimited | Unlimited |
Rate limit responses return HTTP 429 with header Retry-After: N (seconds until reset).
Error Codes
| HTTP Status | Meaning |
|---|---|
| 400 | Bad Request — missing or invalid fields. Check the error field in the response. |
| 401 | Unauthorized — missing or invalid API key / session. |
| 403 | Forbidden — your plan doesn't include this feature. |
| 404 | Not Found — the invoice or client ID doesn't exist. |
| 409 | Conflict — e.g., invoice already paid, or email already registered. |
| 429 | Rate limit exceeded. Wait for the Retry-After period. |
| 500 | Server error. Retry after a moment; contact support if it persists. |
Code Examples
Create an Invoice (curl)
curl -X POST https://api.invoicedlt.com/api/invoices \
-H "Authorization: Bearer idlt_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"clientId": 42,
"dueDate": "2026-04-01",
"currency": "USD",
"items": [
{ "description": "Web design", "qty": 1, "unitPrice": 1500 }
],
"notes": "Please pay via the link below."
}'
List Invoices (JavaScript)
const res = await fetch('https://api.invoicedlt.com/api/invoices', {
headers: { Authorization: 'Bearer idlt_live_YOUR_KEY' }
});
const { invoices } = await res.json();
console.log(invoices);
Register a Webhook (Python)
import requests
requests.post(
'https://api.invoicedlt.com/api/webhooks',
headers={'Authorization': 'Bearer idlt_live_YOUR_KEY'},
json={'url': 'https://myapp.com/hooks/invoicedlt', 'events': ['invoice.paid']}
)