expenses

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

GET /v1/expenses #

The expenses the tenant recorded, newest first

A recurring expense is one entry, listed at its first day. Voided expenses are left out unless include_voided is true.

Parameters

NameInTypeDescription
categoryqueryExpenseCategory
app_idquerystring · uuid
currencyquerystring
fromquerystring · dateOnly entries whose (first) day is on or after this day
toquerystring · dateOnly entries whose (first) day is on or before this day
include_voidedqueryboolean
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKExpensePage
400Error envelopeError
Example response
{
  "expenses": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "app_id": "string",
      "vendor": "string",
      "category": "infrastructure",
      "amount_minor": "string",
      "currency": "string",
      "incurred_on": "string",
      "note": "string",
      "recurring": "none",
      "recurring_until": "string",
      "void_time": "2026-11-03T10:15:00Z",
      "void_reason": "string",
      "create_time": "2026-11-03T10:15:00Z",
      "update_time": "2026-11-03T10:15:00Z",
      "tax_minor": "string",
      "attachment_asset_id": "string"
    }
  ],
  "next_page_token": "string"
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/expenses \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/expenses #

Record an expense

Money the tenant spent, in one currency. A monthly or yearly expense is one entry that falls on the same day of every month or year from incurred_on (on the last day of a shorter month) until recurring_until; its occurrences are worked out when a summary is asked for.

Request body

FieldTypeDescription
vendor requiredstring
category requiredExpenseCategory
amount_minor requiredstring · int64int64 minor units, above zero (a number is accepted too)
currency requiredstring
incurred_on requiredstring · dateThe day, or the first day of a recurring expense (UTC)
notestring
app_idstring · uuidThe app of the account the cost belongs to; leave out for the whole tenant
recurringnone | monthly | yearly
recurring_untilstring · dateLast day an occurrence may fall on; leave out for no end. Only for a recurring expense.
tax_minorstring · int64The tax inside amount_minor, when the receipt shows it (informational; no summary reads it)
attachment_asset_idstring · uuidThe receipt or invoice kept with the expense: a READY general asset of the tenant
Example
{
  "vendor": "string",
  "category": "infrastructure",
  "amount_minor": "string",
  "currency": "string",
  "incurred_on": "string"
}

Responses

StatusMeaningBody
201CreatedExpense
400Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "app_id": "string",
  "vendor": "string",
  "category": "infrastructure",
  "amount_minor": "string",
  "currency": "string",
  "incurred_on": "string",
  "note": "string",
  "recurring": "none",
  "recurring_until": "string",
  "void_time": "2026-11-03T10:15:00Z",
  "void_reason": "string",
  "create_time": "2026-11-03T10:15:00Z",
  "update_time": "2026-11-03T10:15:00Z",
  "tax_minor": "string",
  "attachment_asset_id": "string"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/expenses \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vendor":"string","category":"infrastructure","amount_minor":"string","currency":"string","incurred_on":"string"}'

PUT /v1/expenses/{id} #

Replace an expense

The body replaces the whole record; a recurring expense changes in all its occurrences. A voided expense is not edited (billing.accounting.expense_voided).

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Request body

FieldTypeDescription
vendor requiredstring
category requiredExpenseCategory
amount_minor requiredstring · int64int64 minor units, above zero (a number is accepted too)
currency requiredstring
incurred_on requiredstring · dateThe day, or the first day of a recurring expense (UTC)
notestring
app_idstring · uuidThe app of the account the cost belongs to; leave out for the whole tenant
recurringnone | monthly | yearly
recurring_untilstring · dateLast day an occurrence may fall on; leave out for no end. Only for a recurring expense.
tax_minorstring · int64The tax inside amount_minor, when the receipt shows it (informational; no summary reads it)
attachment_asset_idstring · uuidThe receipt or invoice kept with the expense: a READY general asset of the tenant
Example
{
  "vendor": "string",
  "category": "infrastructure",
  "amount_minor": "string",
  "currency": "string",
  "incurred_on": "string"
}

Responses

StatusMeaningBody
200OKExpense
400Error envelopeError
404Error envelopeError
409Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "app_id": "string",
  "vendor": "string",
  "category": "infrastructure",
  "amount_minor": "string",
  "currency": "string",
  "incurred_on": "string",
  "note": "string",
  "recurring": "none",
  "recurring_until": "string",
  "void_time": "2026-11-03T10:15:00Z",
  "void_reason": "string",
  "create_time": "2026-11-03T10:15:00Z",
  "update_time": "2026-11-03T10:15:00Z",
  "tax_minor": "string",
  "attachment_asset_id": "string"
}
curl
curl -X PUT https://YOUR-API-ADDRESS/v1/expenses/<id> \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vendor":"string","category":"infrastructure","amount_minor":"string","currency":"string","incurred_on":"string"}'

DELETE /v1/expenses/{id} #

Void an expense

The expense is not deleted: it leaves every summary and keeps its reason. The reason (1 to 200 characters) comes in the body {"reason": "..."} or in ?reason=.

Parameters

NameInTypeDescription
id requiredpathstring · uuid
reasonquerystring

Request body

FieldTypeDescription
reason requiredstring
Example
{
  "reason": "string"
}

Responses

StatusMeaningBody
200OKExpense
400Error envelopeError
404Error envelopeError
409Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "app_id": "string",
  "vendor": "string",
  "category": "infrastructure",
  "amount_minor": "string",
  "currency": "string",
  "incurred_on": "string",
  "note": "string",
  "recurring": "none",
  "recurring_until": "string",
  "void_time": "2026-11-03T10:15:00Z",
  "void_reason": "string",
  "create_time": "2026-11-03T10:15:00Z",
  "update_time": "2026-11-03T10:15:00Z",
  "tax_minor": "string",
  "attachment_asset_id": "string"
}
curl
curl -X DELETE https://YOUR-API-ADDRESS/v1/expenses/<id> \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"string"}'

Models

Error

FieldTypeDescription
error requiredobject

Expense

FieldTypeDescription
id requiredstring · uuid
app_id requiredstring
vendor requiredstring
category requiredExpenseCategory
amount_minor requiredstring · int64
currency requiredstring
incurred_on requiredstring · date
note requiredstring
recurring requirednone | monthly | yearly
recurring_until requiredstring
void_time requiredstring · date-time
void_reason requiredstring
create_time requiredstring · date-time
update_time requiredstring · date-time
tax_minor requiredstring · int64
attachment_asset_id requiredstring

ExpenseCategory

infrastructure | payment_fees | marketing | payroll | tax | software | other

ExpenseInput

FieldTypeDescription
vendor requiredstring
category requiredExpenseCategory
amount_minor requiredstring · int64int64 minor units, above zero (a number is accepted too)
currency requiredstring
incurred_on requiredstring · dateThe day, or the first day of a recurring expense (UTC)
notestring
app_idstring · uuidThe app of the account the cost belongs to; leave out for the whole tenant
recurringnone | monthly | yearly
recurring_untilstring · dateLast day an occurrence may fall on; leave out for no end. Only for a recurring expense.
tax_minorstring · int64The tax inside amount_minor, when the receipt shows it (informational; no summary reads it)
attachment_asset_idstring · uuidThe receipt or invoice kept with the expense: a READY general asset of the tenant

ExpensePage

FieldTypeDescription
expenses requiredarray of Expense
next_page_token requiredstring

VoidExpenseRequest

FieldTypeDescription
reason requiredstring