Split one transaction across multiple bills

POST /api/v1/bills/payments/batch

Apply a single bank transaction to multiple bills in one atomic request. Validates the total allocation against the transaction's remaining unallocated balance before creating any payments.

Operation ID: create_bill_payments_batch_api_v1_bills_payments_batch_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

transaction_id string required

UUID of the bank transaction representing the payment.

allocations array · BillBatchPaymentAllocation requiredBillBatchPaymentAllocation

One allocation per bill (1+). Each bill_id must be unique.

2 fields
bill_id string required

UUID of the bill receiving this slice of the transaction.

amount integer required

Amount in cents to allocate to this bill. Must be > 0.

paid_on string · date-time

Override payment date applied to every allocation. Defaults to the transaction datetime if omitted.

Responses

201 Successful Response

transaction_id string required

Bank transaction UUID.

total_allocated integer required

Total cents allocated across all bills in this batch.

payment_count integer required

Number of BillPayment records created.

payments array · object

Per-bill payment payloads (mirrors BillPaymentResponse).

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

404 Not Found - Resource does not exist

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object