Records a customer payment against an approved sales invoice: payment_account_transaction_id applies an incoming bank line (its whole amount), or payment_account_id, amount and payment_date record a manual payment. A payment short of what is open leaves the rest open, unless shortfall_reason closes it in the same journal entry, with no VAT: withholding_tax is tax the customer withheld at source and paid to its tax authority (a German § 50a withholding, for example), posted to shortfall_account_id, which must be a postable asset under Other current assets (a withholding tax receivable, refundable under a treaty) or an income tax expense account; fee, bad_debt and other (with a description) post to an expense. The journal is Dr bank (what arrived) + Dr the shortfall account (the rest) / Cr Accounts Receivable (what was open), and the invoice is paid in full. The amount closed is always derived by the server (open less what the payment settles), never sent. A shortfall needs write_off_receivables (without it a withholding is refused with write_off_not_permitted, the other reasons with 403); a withholding may not exceed half of the invoice's gross. Refusals name their code: write_off_not_permitted, withholding_tax_account_required, withholding_tax_account_unavailable, withholding_tax_currency_mismatch, withholding_tax_nothing_withheld, withholding_tax_exceeds_limit. The response's shortfall names what closed the rest. When the tax authority later refunds a withholding, categorize that bank receipt to the same receivable account. Preview first with invoice.allocatePaymentPreview and send its ETag as If-Match. Requires Idempotency-Key, If-Match, the invoices:action OAuth scope with update_invoices and update_bank_accounts.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
