Invoice Templates#

Invoice Templates allow you to create reusable configurations for recurring invoices. Templates define default line items, tax rates, and payment terms.

The Invoice Template object#

AttributeTypeDescription
idstringUnique identifier with invtpl_ prefix
objectstringAlways "invoice_template"
namestringTemplate name
descriptionstringTemplate description
default_line_itemsarrayDefault line items
default_tax_ratesarrayDefault tax rate IDs
payment_terms_daysintegerDays until payment is due
memostringDefault memo text
metadatahashKey-value pairs
createdtimestampTime at which the object was created
{
  "id": "invtpl_standard",
  "object": "invoice_template",
  "name": "Standard Monthly Rent",
  "description": "Monthly rent invoice for residential units",
  "default_line_items": [
    {
      "description": "Monthly rent",
      "amount": 120000,
      "currency": "eur"
    }
  ],
  "default_tax_rates": [],
  "payment_terms_days": 14,
  "memo": "Thank you for your prompt payment.",
  "created": 1706140800
}

Create a Template#

POST /v1/invoice_templates

curl https://api.casapay.com/v1/invoice_templates \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Standard Monthly Rent",
    "default_line_items": [
      { "description": "Monthly rent", "amount": 120000, "currency": "eur" }
    ],
    "payment_terms_days": 14
  }'

Retrieve, Update, Delete, List Templates#

GET /v1/invoice_templates/:id

POST /v1/invoice_templates/:id

DELETE /v1/invoice_templates/:id

GET /v1/invoice_templates