201Successful Response
Schema: SuccessEnvelope_InvoicePaymentResponse_
successbooleanmessagestringcodestringdataapp__api__v1__schemas__invoices__invoice__InvoicePaymentResponse
/api/v1/invoices/{invoice_id}/paymentsLink a bank transaction as payment against an invoice. Supports split payments (one transaction paying multiple invoices) and partial payments (multiple transactions paying one invoice).
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
invoice_idstring · uuidrequiredSchema: InvoicePaymentRequest
transaction_idstringrequiredUUID of the bank transaction representing the payment.
amountintegerrequiredPayment amount in cents: the cash allocated from the transaction (net), which must be > 0 and <= its remaining unallocated amount. With fee_cents, amount may instead be the gross — the transaction's remaining cash plus the fee (one cent either way) — and the invoice is credited exactly amount. What the invoice is credited may not exceed its balance due: overpayments are refused.
paid_onstring · date-timeOverride payment date (ISO 8601). Defaults to the transaction datetime if omitted.
fee_centsintegerCard-processor fee withheld before this money reached the bank, in cents. The invoice is credited amount + fee_cents (or amount when it is the gross) and the fee is expensed on the deposit's own journal entry (Dr Merchant Fees), so a net deposit closes a gross invoice. The deposit must already be booked: a fee on a transaction with no journal entry is refused (BUSINESS_115).
Schema: SuccessEnvelope_InvoicePaymentResponse_
successbooleanmessagestringcodestringdataapp__api__v1__schemas__invoices__invoice__InvoicePaymentResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.