Purchase Payments
Payments that are allocated to the purchase invoices we create in the accounting system (as outlined in section 2) will be exported from the accounting system, and mapped to the Yooz payment feedback JSON data format. The resulting file will be uploaded to Yooz via the POST /feedbacks
API call.
Requirements & Assumptions/Assertions
- Payments will be transferred to Yooz once they have been created in Xero and allocated to a purchase invoice.
- For instance, if a purchase invoice of £10 has a £10 credit note allocated to it, a £10 payment will be sent to Yooz.
- There is no requirement to generate separate JSON files for each organisation.
- The JSON file will be named in the following format:
{yyyyMMddHHmmssffff}.json
- Here, 'yyyyMMddHHmmssffff' represents the timestamp format. An example of a file name would be 202204191529002124.json.
- The JSON files can contain multiple payment feedbacks, which will be output to the 'documents' array.
- If an invoice is raised in Xero by Zynk and subsequently deleted, then raised again manually, Zynk will not be able to allocate the payment to the original Yooz invoice.
Zynk Process
- Export purchase payments from the accounting system where the allocation amount exceeds 0, along with the related purchase invoices.
- Convert the Xero purchase payments into the Yooz payment feedback JSON format.
- Upload the payment feedback JSON file to Yooz via the API.
Data Format
- The data will be in JSON format. A sample of the expected data format is shown below.
- The monetary amount format is 0.00
- The date format is yyyy-MM-dd, e.g. 2022-04-20
Example JSON Format
{
"documents": [
{
"yoozNumber": 15,
"action": {
"type": "PAYMENT",
"paymentDataItems": [
{
"code": "YZ_AMOUNT_PAID",
"value": 500.85
},
{
"code": "YZ_DATE_OF_PAYMENT",
"value": "2021-07-07"
}
]
}
}
]
}
Scheduling
The default schedule for this solution point is to run daily at midnight and 6am.
Field Mappings
Yooz Field | Xero Accounts Payable Payment Field | Notes |
---|---|---|
yoozNumber | N/A | The yoozNumber will be retrieved from Zynk’s internal database. It will be stored here when non-PO invoices are imported into Xero by Zynk. |
type | N/A | Will always be set to “PAYMENT” |
YZ_AMOUNT_PAID | Amount Paid | --- |
YZ_DATE_OF_PAYMENT | Date Paid | --- |