A new endpoint has been established that allows both Payroll transactions and Cashbook Payments to be accessed through the API. A couple of fields need to be filled in within Infusion, to allow the API posted transactions to go through successfully first.
Setting up Infusion for POSTing payments through the API
Open the Settings module, locate the Financials section and open Payroll Integration. Choose Edit and fill in both the Default Payee Name and Default Bank Account fields.
If the transaction being posted through the API is to be posted automatically, enable Autopost Cashbook Payment. Leaving this option disabled, requires users to manually post the transaction in Infusion
To POST Payroll transactions
The Payroll endpoint is:
/ext/v1/financials/cashbookPayments?payroll=true
When making the POST call these fields are mandatory:
paymentDate
lines (at least one line)
lines.glAccount – either its uuid (lines.glAccount.uuid) or glId (lines.glAccount.glId)
lines.amount
Other fields are optional, and are calculated or loaded from the Payroll Integration Settings.
If the setup hasn’t been completed, then when a transaction is posted through the API, the user will receive a notification at the top of the screen, by way of the bell Icon.
One or more Payroll Integration setting details are missing. Please update these details, and review the Cashbook Payments listed to ensure details are correct
If there are multiple payments that have been sent through, before the settings have been entered in, each payment will be listed in the notification.
To POST Cashbook Payment transactions
A cashbook payment endpoint has been made available, using either of the endpoint addresses:
/ext/v1/financials/cashbookPayments
Or
/ext/v1/financials/cashbookPayments?payroll=false
Posting cashbook payment transactions into Infusion, will use the bank account and payee details in the Settings, under the Financials section in Payroll integration if there is no bank account and payee details in the API request.
If the transaction being posted through the API is to be posted automatically, enable Autopost Cashbook Payment. Leaving this option disabled, requires users to manually post the transaction in Infusion
When making the POST call these fields are mandatory:
paymentDate
lines (at least one line)
lines.glAccount – either its uuid (lines.glAccount.uuid) or glId (lines.glAccount.glId).
lines.amount
Other fields are optional, and are calculated or loaded from the Payroll Integration Settings. If it isn’t specified, the bank account used will be the bank account specified in the Payroll Integration.
If the Payee isn’t included as part of the request, Infusion will assign a default payee of “Payroll”