Add an expense
add_expenseRecord something one person paid for the group. Split equally by default; pass split_between for a subset, or shares for an uneven split. One expense covers one set of people — a receipt whose items aren't all shared by everyone is several expenses, so call this once per group of items that the same people share, rather than splitting the total equally. Works on simple, accountless splits. Secure splits (created by a signed-in user) are read-only here and must be opened in a browser.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date as YYYY-MM-DD. Defaults to today. | |
| split | Yes | The split key, or the whole https://split.xuper.fun/k/<key> link. | |
| amount | Yes | Amount in the split's currency, as a decimal (e.g. 249.50). | |
| shares | No | Uneven split. Either an exact `amount` per person (must add up to the total) or a relative `weight` per person (e.g. weight 2 for a couple). Don't combine with split_between. | |
| paid_by | Yes | Who paid — a participant's name (or id) in this split. A card receipt rarely names the payer, so ask unless you know: guess wrong and every balance points the wrong way. If the user counts themselves among the participants, assume it was them and say that you assumed it — what you must not do is pick a payer silently. | |
| description | No | What it was, e.g. "Groceries". | |
| split_between | No | Names of the people sharing this cost, split equally. Defaults to everyone. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| url | Yes | ||
| title | Yes | ||
| secure | Yes | ||
| entries | Yes | ||
| settled | Yes | ||
| currency | Yes | ||
| created_at | Yes | ||
| settlement | Yes | ||
| total_spent | Yes | ||
| participants | Yes |