KhurramAR
4 years agoExperienced User
Can't create Payment to a Sale/Order via API - That Sale/Order doesn't appear in AccountRight UI
Hi
I just finished integrating with the Sale/Invoice and respective Sale/CustomerPayment endpoints via API. There was no issue and they appear in AccountRight Online UI as well (https://app.myob.com/#/au/{{company_file_id}}/invoice).
Likewise, creating a Sale/Order also went well via API, however, it does not appear in AccountRight Online UI.
And the Sale/CustomerPayment for that respective Sale/Order can't go well. The following error is returned from Sale/CustomerPayment endpoint.
{
"Errors": [{
"Message": "ReceivePaymentEvent_PaymentDetailsBlank",
"AdditionalDetails": "PaymentBankingDetails: (ReceivePaymentEvent)",
"ErrorCode": 4612,
"LearnMore": null,
"Severity": "Warning",
"Name": "ValidationWarning"
}, {
"Message": "BusinessLine_AccountRequired",
"AdditionalDetails": "AccountId: (ReceivePaymentToSaleOrderLine)",
"ErrorCode": 4239,
"LearnMore": null,
"Severity": "Error",
"Name": "ValidationError"
}],
"Information": "Warning, error messages have not been finalised in this release and may change"
}
The request is exactly the same as for Sale/Invoice. Only the difference of Invoices[].Type = "Order". I can assure all the UIDs in this request were correct, I just masked them here.
{
"DepositTo": "Account",
"Customer": {
"UID": "xxxxxxx-xxx-xxxx-xxxx-abcdef123"
},
"Account": {
"UID": "xxxxxxx-xxx-xxxx-xxxx-987654321"
},
"ReceiptNumber": "0209162",
"Date": "2021-10-01 11:32:00",
"AmountPaid": 30.0000,
"Memo": "2051",
"Invoices": [{
"UID": "xxxxxxx-xxx-xxxx-xxxx-123456789",
"AmountApplied": 30.0000,
"Type": "Order"
}]
}
Kind Regards,