Appearance
Expense Payment
Expense payments represent outgoing payments made to settle expenses with type invoice
. They track payment details including creditor information, bank accounts, execution dates, and payment references. The system supports Swiss banking standards including QR-bill payments, IBAN validation, and automatic reconciliation with bank transactions.
Allowed query parameters
Filters
Filter | Type | Description |
---|---|---|
status | String | Filter by payment status:pending , executed |
has_bank_transaction_match | Boolean | Filter by bank transaction match status |
Sorting
creditor_name
, execute_at
, executed_at
, amount
Includes
expense.company.media
, expense.media
, bankAccount
, bankTransactionMatch.bankTransaction.bankAccount
Create an expense payment
post
/expense/{expense_id}/payment
Attribute (* required) | Type | Description |
---|---|---|
bank_account_id | String? | Bank account ID for payment execution |
bank_payment_type | String? | Payment type: credit_transfer , credit_transfer_qrr , credit_transfer_scor |
amount * | Float | Payment amount (must be > 0) |
creditor_iban | String? | Creditor IBAN (validated for Swiss/Liechtenstein) |
creditor_bic | String? | Creditor BIC (required for non-CH/LI IBANs) |
creditor_reference | String? | Payment reference (QR or SCOR reference) |
creditor_name | String? | Creditor name |
creditor_street | String? | Creditor street address |
creditor_building_no | String? | Creditor building number |
creditor_zip | String? | Creditor ZIP code |
creditor_city | String? | Creditor city |
creditor_country | String? | Creditor country |
message | String? | Payment message/description |
execute_at | Date? | Scheduled execution date |
Example response
json
// HTTP 201 Created
{
"id": "v7rnRjBn9o",
"expense_id": "AG52olvLXP",
"bank_account": null,
"bank_payment_type": "credit_transfer",
"amount": 540.05,
"creditor_iban": "CH7230114000000018007",
"creditor_iban_formatted": "CH72 3011 4000 0000 1800 7",
"creditor_bic": null,
"creditor_name": "Cembra MoneyBank",
"creditor_street": "P.P.",
"creditor_building_no": null,
"creditor_zip": "8048",
"creditor_city": "Zürich",
"creditor_country": "CH",
"creditor_reference": "10 00000 00000 06096 37449 80405",
"creditor_reference_formatted": "10 00000 00000 06096 37449 80405",
"creditor_address": "P.P.\nCH-8048 Zürich",
"is_ready_for_execution": true,
"missing_information": [],
"message": null,
"execute_at": "2024-01-15T00:00:00.000000Z",
"executed_at": null,
"is_executed": false,
"is_pending": true
}
Update an expense payment
put
/expense/{expense_id}/payment/{id}
Attribute | Type | Description |
---|---|---|
bank_account_id | String? | Bank account ID for payment execution |
bank_payment_type | String? | Payment type: credit_transfer , credit_transfer_qrr , credit_transfer_scor |
amount | Float? | Payment amount (must be > 0) |
creditor_iban | String? | Creditor IBAN (validated for Swiss/Liechtenstein) |
creditor_bic | String? | Creditor BIC (required for non-CH/LI IBANs) |
creditor_reference | String? | Payment reference (QR or SCOR reference) |
creditor_name | String? | Creditor name |
creditor_street | String? | Creditor street address |
creditor_building_no | String? | Creditor building number |
creditor_zip | String? | Creditor ZIP code |
creditor_city | String? | Creditor city |
creditor_country | String? | Creditor country |
message | String? | Payment message/description |
execute_at | Date? | Scheduled execution date |
executed_at | Date? | Actual execution date (sets payment as executed) |
Example response
json
// HTTP 200 OK
{
// an expense payment object
}
Retrieve an expense payment
get
/expense/{expense_id}/payment/{id}
Example response
json
// HTTP 200 OK
{
"id": "v7rnRjBn9o",
"expense_id": "AG52olvLXP",
"expense": {
"id": "AG52olvLXP",
"number": "E-2021-0001",
"name": "Kreditkartenabrechnung",
"total": 540.05,
"total_paid": 540.05,
"total_open": 0
},
"bank_account": {
"id": "bk1nRjBn9o",
"name": "UBS Business Account",
"currency": "CHF",
"iban": "CH9300762011623852957"
},
"bank_transaction_match": null,
"bank_payment_type": "credit_transfer_qrr",
"amount": 540.05,
"creditor_iban": "CH7230114000000018007",
"creditor_iban_formatted": "CH72 3011 4000 0000 1800 7",
"creditor_bic": null,
"creditor_name": "Cembra MoneyBank",
"creditor_street": "P.P.",
"creditor_building_no": null,
"creditor_zip": "8048",
"creditor_city": "Zürich",
"creditor_country": "CH",
"creditor_reference": "10 00000 00000 06096 37449 80405",
"creditor_reference_formatted": "10 000 00000 00060 96374 49804 05",
"creditor_address": "P.P.\nCH-8048 Zürich",
"is_ready_for_execution": true,
"missing_information": [],
"message": "Payment for invoice E-2021-0001",
"execute_at": "2024-01-15T00:00:00.000000Z",
"executed_at": "2024-01-15T10:30:00.000000Z",
"is_executed": true,
"is_pending": false
}
Delete an expense payment
delete
/expense/{expense_id}/payment/{id}
Example response
json
// HTTP 204 No Content
List expense payments
get
/expense/{expense_id}/payment
The list endpoint accepts the same parameters as in Retrieve an expense payment and returns a paginated array of the same expense payment object in the data
property.
get
/expense-payment
You can also list all expense payments across all expenses using the global endpoint.
Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.
Payment Status and Validation
Payment Types
credit_transfer
: Standard bank transfer (IBAN)credit_transfer_qrr
: Swiss QR-bill payment with QR referencecredit_transfer_scor
: Payment with SCOR reference (ISO 11649)
Payment Validation
The system automatically validates payment information and provides feedback through the is_ready_for_execution
and missing_information
fields:
- IBAN validation: Swiss/Liechtenstein IBANs are validated, non-CH/LI IBANs require BIC
- QR reference validation: QR IBANs must have valid QR references
- SCOR reference validation: SCOR references are validated according to ISO 11649
- Required fields: Bank account, creditor information, and positive amount
Execution States
- Pending: Payment created but not yet executed (
executed_at
is null) - Executed: Payment has been processed (
executed_at
is set)
When a payment is executed, the parent expense's total_paid
amount is automatically updated, and the expense may be marked as fully paid if the total payments cover the expense amount.