Skip to main content
WEBHOOK

When it’s sent

  • An expense is recorded.
The request type is NEW_EXPENSE. See the introduction to subscribe to this event and verify the X-Hub-Signature-256 signature.
amount is sent as a decimal string (for example "1250.00"), unlike the other amounts, which are numbers.

Headers

X-Hub-Signature-256
string

HMAC SHA-256 of the raw request body, keyed with your Verify Token, as sha256=<hex>. Sent only when a Verify Token is set.

Example:

"sha256=3f1c5e…"

Body

application/json

Sent when an expense is recorded.

version
enum<string>
required

Payload version.

Available options:
v1.0
Example:

"v1.0"

type
enum<string>
required

Event type.

Available options:
NEW_EXPENSE
Example:

"NEW_EXPENSE"

id
string

Expense ID.

Example:

"ckx1e0000001"

name
string | null

Expense name.

Example:

"Dental supplies"

amount
string

Expense amount, as a decimal string.

Example:

"1250.00"

main_type
enum<string>

Main expense category.

Available options:
COST_OF_REVENUE,
OPERATING_EXPENSES,
TAX,
OTHER
Example:

"OPERATING_EXPENSES"

expense_type
string

Expense type. Uses your custom expense type name when one is set.

Example:

"Supplies"

sub_type
string | null

Expense sub-type.

Example:

null

details
string | null

Notes.

Example:

null

expense_line_ids
object[]

Expense items.

payments
object[]

Payments made for this expense.

branch_data
object

Branch.

Example:

Response

200

Return any 2xx status within 5 seconds to acknowledge the event. Failed deliveries are not retried.