Invoice API

Create, sign and download invoices over HTTPS.

Send a client and line items from your server. The response includes the customer link and the PDF link. You copy that link into your own text, SMS or WhatsApp. InvoiceTXT does not send the message.

POST/v1/invoices

Quickstart

Create a key in the workspace under API. Send it only from your server, in the Authorization header. A successful call returns 201 and an invoice object. The url field is what the customer opens.

The key is a secret

A key in a browser app or a mobile bundle can be copied by anyone who can view the page. Read it from the environment on the server that creates the invoice.

cURL
curl https://invoicetxt.com/v1/invoices \
  -H 'Authorization: Bearer itxt_live_your_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "client": "Oak Street Homes",
    "due": "on receipt",
    "currency": "USD",
    "tax_rate": 0,
    "items": [
      {"description": "Deep clean", "quantity": 4, "rate": 35},
      {"description": "Oven clean", "quantity": 1, "rate": 45}
    ]
  }'

Endpoints

Three calls cover the invoice itself: create it, download the PDF, and record that the customer acknowledged it.

Languages

The same HTTPS endpoint from Node, Python, PHP, Rust, Go or Ruby. Keep the key in the environment and return only the customer link to your own app.

Authentication

Every /v1/ request needs a bearer key. The header is Authorization: Bearer itxt_live_…. You can hold five active keys. Revoke one from the workspace when a server is retired.

Webhooks

Create the receiver under API, then Webhooks. InvoiceTXT posts invoice.created, invoice.viewed, invoice.paid and invoice.signed. Check X-InvoiceTXT-Signature against the raw body before you trust it. Only public https URLs on port 443 are accepted.

Plans and limits

The API uses the same monthly invoice allowance as the workspace plan: 30 on Solo, 150 on Pro and 600 on Studio. An inactive plan returns 402. More than 120 requests in a minute from one IP returns 429.

Currency is a three-letter label, not a conversion. tax_rate is a percentage from 0 to 40. An acknowledgement stores a name and a time. It is not a qualified electronic signature, and it does not charge a card.