Finance template

Invoice

Fintech-style invoice with status pill, partial-payment math, payment instructions, QR slot, signature block, and multi-page-safe line items.

Free on every planLanguage: en
slug: invoiceRendered with sample data
01

Quick start

Reference the template by its slug and pass your data. The same call works from any language; pick whichever fits your stack. Replace $KAMY_API_KEY with a key from the dashboard.

curl
curl https://kamy.dev/api/v1/render \
  -H "Authorization: Bearer $KAMY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateSlug": "invoice",
    "data": {
      "invoiceNumber": "INV-2026-0142",
      "issueDate": "2026-04-15",
      "dueDate": "2026-05-15",
      "currency": "USD",
      "locale": "en-US",
      "status": "sent",
      "purchaseOrder": "PO-90412",
      "from": {
        "name": "Acme Studio",
        "address": [
          "1234 Market Street",
          "San Francisco, CA 94103"
        ],
        "email": "[email protected]",
        "phone": "+1 (415) 555-0142",
        "taxId": "US-EIN 88-1234567"
      },
      "to": {
        "name": "Globex Corporation",
        "address": [
          "500 Pine Avenue",
          "Suite 200",
          "Seattle, WA 98101"
        ],
        "email": "[email protected]",
        "taxId": "US-EIN 91-7654321"
      },
      // …
    }
  }'
node.js
import { Kamy } from "@kamydev/sdk";

const kamy = new Kamy({ apiKey: process.env.KAMY_API_KEY! });

const { url } = await kamy.render({
  templateSlug: "invoice",
  data: {
    "invoiceNumber": "INV-2026-0142",
    "issueDate": "2026-04-15",
    "dueDate": "2026-05-15",
    "currency": "USD",
    "locale": "en-US",
    "status": "sent",
    "purchaseOrder": "PO-90412",
    "from": {
      "name": "Acme Studio",
      "address": [
        "1234 Market Street",
        "San Francisco, CA 94103"
      ],
      "email": "[email protected]",
      "phone": "+1 (415) 555-0142",
      "taxId": "US-EIN 88-1234567"
    },
    "to": {
      "name": "Globex Corporation",
      "address": [
        "500 Pine Avenue",
        "Suite 200",
        "Seattle, WA 98101"
      ],
      "email": "[email protected]",
      "taxId": "US-EIN 91-7654321"
    },
    // …
  },
});

console.log(url); // signed URL, valid for 1 hour
python
import os, requests

resp = requests.post(
    "https://kamy.dev/api/v1/render",
    headers={"Authorization": f"Bearer {os.environ['KAMY_API_KEY']}"},
    json={
        "templateSlug": "invoice",
        "data": {
          "invoiceNumber": "INV-2026-0142",
          "issueDate": "2026-04-15",
          "dueDate": "2026-05-15",
          "currency": "USD",
          "locale": "en-US",
          "status": "sent",
          "purchaseOrder": "PO-90412",
          "from": {
            "name": "Acme Studio",
            "address": [
              "1234 Market Street",
              "San Francisco, CA 94103"
            ],
            "email": "[email protected]",
            "phone": "+1 (415) 555-0142",
            "taxId": "US-EIN 88-1234567"
          },
          "to": {
            "name": "Globex Corporation",
            "address": [
              "500 Pine Avenue",
              "Suite 200",
              "Seattle, WA 98101"
            ],
            "email": "[email protected]",
            "taxId": "US-EIN 91-7654321"
          },
          // …
        },
    },
)
resp.raise_for_status()
print(resp.json()["url"])
02

Sample payload

The full sample data the live preview above renders from. Use it as a starting point for your own integration — every field is optional except those marked required in the schema below.

json
{
  "invoiceNumber": "INV-2026-0142",
  "issueDate": "2026-04-15",
  "dueDate": "2026-05-15",
  "currency": "USD",
  "locale": "en-US",
  "status": "sent",
  "purchaseOrder": "PO-90412",
  "from": {
    "name": "Acme Studio",
    "address": [
      "1234 Market Street",
      "San Francisco, CA 94103"
    ],
    "email": "[email protected]",
    "phone": "+1 (415) 555-0142",
    "taxId": "US-EIN 88-1234567"
  },
  "to": {
    "name": "Globex Corporation",
    "address": [
      "500 Pine Avenue",
      "Suite 200",
      "Seattle, WA 98101"
    ],
    "email": "[email protected]",
    "taxId": "US-EIN 91-7654321"
  },
  "lineItems": [
    {
      "sku": "BRAND-01",
      "description": "Brand identity design",
      "subDescription": "Logo system, color palette, typography, and 30-page brand guidelines PDF",
      "quantity": 1,
      "unitPrice": 4500,
      "amount": 4500
    },
    {
      "sku": "WEB-06",
      "description": "Website redesign — 6 pages",
      "subDescription": "Responsive layouts, CMS integration, and accessibility audit",
      "quantity": 6,
      "unitPrice": 850,
      "amount": 5100
    },
    {
      "sku": "PHOTO-01",
      "description": "Product photography session",
      "subDescription": "Half-day shoot with 30 retouched hero images",
      "quantity": 1,
      "unitPrice": 1200,
      "amount": 1200
    }
  ],
  "subtotal": 10800,
  "taxRate": 8.5,
  "taxAmount": 918,
  "discountAmount": 0,
  "total": 11718,
  "amountPaid": 5000,
  "notes": "Thanks for the continued partnership. Project files have been delivered to the shared Drive folder; let us know if you need anything resent.",
  "paymentTerms": "Net 30. Late payments incur a 1.5% monthly service fee after the due date.",
  "payment": {
    "method": "Wire transfer or ACH",
    "bankName": "Silicon Valley Bank",
    "accountName": "Acme Studio LLC",
    "accountNumber": "8800-1234-5678",
    "iban": "US33 SVBK 0000 0088 0012 3456",
    "swift": "SVBKUS6S",
    "reference": "INV-2026-0142",
    "payUrl": "https://pay.acme.studio/inv/2026-0142"
  },
  "qrCodeDataUrl": "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70'><rect width='70' height='70' fill='%23fff'/><g fill='%230f172a'><rect x='4' y='4' width='14' height='14'/><rect x='52' y='4' width='14' height='14'/><rect x='4' y='52' width='14' height='14'/><rect x='8' y='8' width='6' height='6' fill='%23fff'/><rect x='56' y='8' width='6' height='6' fill='%23fff'/><rect x='8' y='56' width='6' height='6' fill='%23fff'/><rect x='10' y='10' width='2' height='2'/><rect x='58' y='10' width='2' height='2'/><rect x='10' y='58' width='2' height='2'/><rect x='24' y='6' width='2' height='2'/><rect x='30' y='6' width='2' height='2'/><rect x='38' y='6' width='2' height='2'/><rect x='44' y='6' width='2' height='2'/><rect x='22' y='12' width='2' height='2'/><rect x='34' y='12' width='2' height='2'/><rect x='42' y='12' width='2' height='2'/><rect x='6' y='22' width='2' height='2'/><rect x='14' y='22' width='2' height='2'/><rect x='22' y='22' width='2' height='2'/><rect x='28' y='22' width='2' height='2'/><rect x='34' y='22' width='2' height='2'/><rect x='42' y='22' width='2' height='2'/><rect x='50' y='22' width='2' height='2'/><rect x='58' y='22' width='2' height='2'/><rect x='10' y='28' width='2' height='2'/><rect x='18' y='28' width='2' height='2'/><rect x='26' y='28' width='2' height='2'/><rect x='32' y='28' width='2' height='2'/><rect x='40' y='28' width='2' height='2'/><rect x='46' y='28' width='2' height='2'/><rect x='54' y='28' width='2' height='2'/><rect x='62' y='28' width='2' height='2'/><rect x='6' y='34' width='2' height='2'/><rect x='14' y='34' width='2' height='2'/><rect x='22' y='34' width='2' height='2'/><rect x='30' y='34' width='2' height='2'/><rect x='38' y='34' width='2' height='2'/><rect x='46' y='34' width='2' height='2'/><rect x='54' y='34' width='2' height='2'/><rect x='10' y='40' width='2' height='2'/><rect x='18' y='40' width='2' height='2'/><rect x='26' y='40' width='2' height='2'/><rect x='32' y='40' width='2' height='2'/><rect x='40' y='40' width='2' height='2'/><rect x='48' y='40' width='2' height='2'/><rect x='56' y='40' width='2' height='2'/><rect x='62' y='40' width='2' height='2'/><rect x='22' y='48' width='2' height='2'/><rect x='30' y='48' width='2' height='2'/><rect x='38' y='48' width='2' height='2'/><rect x='46' y='48' width='2' height='2'/><rect x='54' y='48' width='2' height='2'/><rect x='62' y='48' width='2' height='2'/><rect x='24' y='56' width='2' height='2'/><rect x='32' y='56' width='2' height='2'/><rect x='40' y='56' width='2' height='2'/><rect x='48' y='56' width='2' height='2'/><rect x='56' y='56' width='2' height='2'/><rect x='62' y='56' width='2' height='2'/><rect x='22' y='62' width='2' height='2'/><rect x='30' y='62' width='2' height='2'/><rect x='38' y='62' width='2' height='2'/><rect x='46' y='62' width='2' height='2'/><rect x='54' y='62' width='2' height='2'/><rect x='62' y='62' width='2' height='2'/></g></svg>",
  "signature": {
    "name": "Sara Lin",
    "title": "Founder, Acme Studio",
    "date": "2026-04-15"
  }
}
03

JSON Schema

The render endpoint validates your payload against this JSON Schema before queuing the render. Validation errors come back with HTTP 400 and a VALIDATION_FAILED code listing every offending path.

json
{
  "type": "object",
  "required": [
    "invoiceNumber",
    "from",
    "to",
    "lineItems",
    "total",
    "currency"
  ],
  "properties": {
    "invoiceNumber": {
      "type": "string",
      "minLength": 1
    },
    "issueDate": {
      "type": "string"
    },
    "dueDate": {
      "type": "string"
    },
    "from": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "phone": {
          "type": "string"
        },
        "address": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "logoUrl": {
          "type": "string",
          "format": "uri"
        },
        "taxId": {
          "type": "string"
        }
      }
    },
    "to": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "phone": {
          "type": "string"
        },
        "address": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "logoUrl": {
          "type": "string",
          "format": "uri"
        },
        "taxId": {
          "type": "string"
        }
      }
    },
    "lineItems": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "description",
          "quantity",
          "unitPrice",
          "amount"
        ],
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1
          },
          "quantity": {
            "type": "number",
            "minimum": 0
          },
          "unitPrice": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "sku": {
            "type": "string"
          },
          "subDescription": {
            "type": "string"
          }
        }
      }
    },
    "subtotal": {
      "type": "number"
    },
    "taxRate": {
      "type": "number"
    },
    "taxAmount": {
      "type": "number"
    },
    "discountAmount": {
      "type": "number"
    },
    "discountRate": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "amountPaid": {
      "type": "number"
    },
    "currency": {
      "type": "string",
      "minLength": 1
    },
    "locale": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "paymentTerms": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "sent",
        "paid",
        "overdue",
        "void"
      ]
    },
    "purchaseOrder": {
      "type": "string"
    },
    "payment": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "instructions": {
          "type": "string"
        },
        "bankName": {
          "type": "string"
        },
        "accountName": {
          "type": "string"
        },
        "accountNumber": {
          "type": "string"
        },
        "iban": {
          "type": "string"
        },
        "swift": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "payUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "qrCodeDataUrl": {
      "type": "string"
    },
    "signature": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "title": {
          "type": "string"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri"
        },
        "date": {
          "type": "string"
        }
      }
    }
  }
}
Invoice template — Kamy PDF API — Kamy