Dead-simple invoicing API

Tax calculations, numbering, immutable records, and professional PDFs without building invoicing infrastructure.

No credit card required. Test every operation in a free sandbox.

From JSON to a numbered document.

Send the commercial facts. FiscalRail resolves the invoice machinery around them.

POST /api/v1/invoices 201
REQUEST
$ curl "https://api.fiscalrail.com/api/v1/invoices" \
  -H "Authorization: Bearer ak_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customer": "cus_...",
    "lines": [{
      "description": "Consulting",
      "quantity": "8",
      "unit_price": "75.00",
      "taxes": [{"tax": "vat", "rule": "general"}]
    }]
  }'
RESPONSE
{
  "id": "inv_...",
  "object": "invoice",
  "live": false,
  "account": "acct_...",
  "kind": "invoice",
  "code": "TEST-INV-00001",
  "series": "inv_ser_...",
  "issue_date": "2026-08-11",
  "supply_period": null,
  "preceding_invoice": null,
  "currency": "EUR",
  "supplier": {
    "source": {"type": "account", "id": "acct_..."},
    "name": "Acme Studio SL",
    "tax_id": {"country": "ES", "type": "es_nif", "value": "B02850360"},
    "email": "billing@acme.example",
    "phone": null,
    "address": {
      "line_1": "Example street 1",
      "line_2": null,
      "city": "Madrid",
      "postal_code": "28001",
      "state": null,
      "country": "ES"
    }
  },
  "customer": {
    "source": {"type": "customer", "id": "cus_..."},
    "name": "Example Client SL",
    "tax_id": {"country": "ES", "type": "es_nif", "value": "B87654323"},
    "email": "billing@client.example",
    "phone": null,
    "address": {
      "line_1": "Example avenue 2",
      "line_2": null,
      "city": "Vigo",
      "postal_code": "36201",
      "state": "Pontevedra",
      "country": "ES"
    }
  },
  "lines": [{
    "index": 1,
    "description": "Consulting",
    "quantity": "8.0",
    "unit_price": "75.00",
    "subtotal": "600.00",
    "taxes": [{
      "tax": "vat",
      "rule": "general",
      "effect": "added",
      "treatment": "taxable",
      "description": "IVA 21%",
      "rate": "21%",
      "taxable_base": "600.00"
    }]
  }],
  "tax_totals": [{
    "tax": "vat",
    "rule": "general",
    "effect": "added",
    "treatment": "taxable",
    "description": "IVA 21%",
    "rate": "21%",
    "taxable_base": "600.00",
    "amount": "126.00"
  }],
  "totals": {
    "subtotal": "600.00",
    "tax": "126.00",
    "total_with_tax": "726.00",
    "withheld_tax": "0.00",
    "payable": "726.00"
  },
  "created_at": "2026-08-11T09:30:00Z",
  "tax_regime": {
    "key": "es",
    "es": {
      "qr": {
        "content": "https://fiscalrail.test/tax-regimes/es/mock-verifications/...",
        "image_url": "https://fiscalrail.test/tax-regimes/es/invoice-qrs/..."
      },
      "verifactu": {
        "registrations": [{
          "id": "es_inv_reg_...",
          "object": "verifactu_registration",
          "live": false,
          "invoice": "inv_...",
          "kind": "alta",
          "status": "pending",
          "submitted_at": null,
          "csv": null,
          "error": null
        }]
      }
    }
  },
  "amendments": []
}
ACME/
STUDIO

Invoice

TEST-INV-00001

Issued07/08/2026
Due21/08/2026
FromAcme Studio SLB02850360 · Madrid
Bill toExample Client SLB87654323 · Vigo
DescriptionQty.PriceAmount
Consulting8€75.00€600.00
Subtotal
€600.00
VAT 21%
€126.00
Total
€726.00
VERI*FACTUTax verification QR
TEST DOCUMENT · FiscalRail / invoice infrastructure

A small API with serious responsibilities.

01

One-call issuance

Validate, number, calculate, and persist an invoice atomically.

02

Precise tax calculations

Resolve VAT and withholding rules without trusting client-side arithmetic.

03

Professional PDFs

Render synchronous PDFs with your logo, language, and footer.

04

Immutable records

Keep automatic numbering and durable invoice facts you can retrieve later.

05

Built-in corrections

Issue linked credit notes and replacements without rewriting invoice history.

06

Signed webhooks

Receive verifiable invoice, tax-ID, PDF, and compliance events.

07

Spain compliance

Register invoices with VERI*FACTU, render verification QR codes, and handle corrections.

No plans. No seats. No commitment.

Add balance when you are ready to issue live invoices. Sandbox usage is free.

€0.20

to issue, register, and render a typical Spanish invoice

Invoice issuance€0.10
Accepted AEAT fiscal operation€0.05
PDF generation€0.05
Customer tax-ID verificationFree
Sandbox operationsFree

Rejected AEAT submissions and retries are free.

Your product does something interesting. Let FiscalRail invoice for it.

Create API key

Tell us what you are building. We will help you make the first request.