← 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

MethodEndpointDescription
POST/api/auth/registerCreate a new account.
POST/api/auth/loginLog in, returns session token.
POST/api/auth/logoutInvalidate session.
GET/api/invoicesList all invoices (paginated).
POST/api/invoicesCreate a new invoice.
GET/api/invoices/:idGet invoice details.
PATCH/api/invoices/:idUpdate invoice fields.
DELETE/api/invoices/:idDelete (void) invoice.
POST/api/invoices/:id/sendEmail invoice to client.
POST/api/invoices/:id/remindSend payment reminder.
POST/api/invoices/:id/mark-paidMark invoice as paid manually.
GET/api/invoices/:id/pdfPrintable invoice page (HTML, suitable for puppeteer PDF).
GET/api/clientsList all clients.
POST/api/clientsCreate a client.
GET/api/clients/:idGet client details.
PATCH/api/clients/:idUpdate client.
DELETE/api/clients/:idDelete client.
POST/api/keysGenerate a new API key.
GET/api/keysList API keys (values masked).
DELETE/api/keys/:idRevoke API key.
POST/api/webhooksRegister a webhook endpoint.
GET/api/webhooksList webhooks.
DELETE/api/webhooks/:idDelete webhook.
POST/api/billing/subscribeCreate Stripe checkout session for subscription.
GET/api/billing/portalGet Stripe billing portal URL.

Webhooks

Register a URL to receive POST notifications when invoice events occur.

Available Events

  • invoice.created
  • invoice.sent
  • invoice.viewed
  • invoice.paid
  • invoice.overdue
  • invoice.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:

  1. Client scans QR code and sends XRP from their wallet.
  2. Submit the XRPL transaction hash to: POST /api/invoices/:id/verify-payment with body {"txHash": "..."}
  3. 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

PlanRequests / minuteInvoices / monthClients
Solo (Free)30103
Pro120Unlimited50
Business600UnlimitedUnlimited

Rate limit responses return HTTP 429 with header Retry-After: N (seconds until reset).

Error Codes

HTTP StatusMeaning
400Bad Request — missing or invalid fields. Check the error field in the response.
401Unauthorized — missing or invalid API key / session.
403Forbidden — your plan doesn't include this feature.
404Not Found — the invoice or client ID doesn't exist.
409Conflict — e.g., invoice already paid, or email already registered.
429Rate limit exceeded. Wait for the Retry-After period.
500Server 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']}
)