Forum Discussion

KhurramAR's avatar
KhurramAR
Experienced User
4 years ago

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,

 

 

3 Replies

Replies have been turned off for this discussion
  • Han-Solo's avatar
    Han-Solo
    MYOB Moderator
    4 years ago

    HI KhurramAR

     

    Thanks for reaching out, I tested using your body request with my own UIDs and this was posted to the invoice successfully. 

     

    The error message: 

    ReceivePaymentEvent_PaymentDetailsBlank 

    Suggest to me that that the bank account you are using is not set up correctly with payment details

     

    BusinessLine_AccountRequired

     This error suggests that the UID you are using for the account is incorrect. I recommend pulling the endpoint /GeneralLedger/Account and confirming this is the correct account and setup correctly. 

  • KhurramAR's avatar
    KhurramAR
    Experienced User
    4 years ago

    Hi Han-Solo 

     

    Please excuse me for the late reply because I had to move on with other tasks and just came back to MYOB. But the same issue still persists. I tried changing the Bank account as advised but no gain.


    I'd again say that everything works fine at /Sale/Invoice and /Sale/CustomerPayment endpoints. When the same line item is used with the /Sale/Order it works fine but /Sale/CustomerPayment fails with the specified error. 

     

    1- The question is what's really the major difference between the two. When the same bank account works fine with /Sale/CustomerPayment for /Sale/Invoice, why it does not work with /Sale/CustomerPayment for /Sale/Order?

     

    2- As I said in my previous comment, the POSTing on /Sale/Order works fine, where should I find that entry on MYOB online app (https://app.myob.com/)?

     

    Thanks 

     

    Kind regards.