Skip to navigation

Create Payment

View as Markdown

Creates a payment and allocates it to one or more bills. An allocation can carry wht_tax_id and wht_base to withhold tax when paying the vendor. amount on the payment and on each allocation is the gross amount settled against the bills. The cash leaving the payment account is the gross amount less the total withholding, and the withheld amount is credited to withholding tax payable. When a bill carries an early-payment discount and the payment is dated on or before the discount deadline, an allocation that falls short of the bill’s balance by no more than the discount settles the bill in full. The shortfall is reported as discount_amount on the allocation and credited to Other Income.

Requires the can_create_payment permission on the key owner’s role.

Keys: secret key only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Request

This endpoint expects an object.
amountstringRequired
account_idstringRequiredformat: "uuid"
allocationslist of objectsRequired
payment_datedatetimeRequired
staff_idstringOptionalformat: "uuid"
vendor_idstringOptionalformat: "uuid"
exchange_ratestringOptional
payment_methodstringOptional
destination_accountobjectOptional

Passed through opaquely by the API; structure is not validated at this layer.

Response

Created
dataobject
statusboolean
messagestring

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error