Question

Error during the payment updаte via API

  • 30 August 2022
  • 3 replies
  • 211 views

Userlevel 1
Badge

Hello Team,

I found the following error with payments.

1. I have created a payment via API. The payment is being created successfully.
2. Then I use a payment to allocate with invoice or credit memo via API to pay it.
3. Send the payment with allocation to the invoice or credit memo to Acumatica via API.

Acumatica returns the following error message:

Payment update request returns the error message - "exceptionMessage": "An error occurred during processing of the field Reference Nbr.: Reference Nbr. 'AR.......' cannot be found in the system.\nPX.Data.PXOuterException: An error occurred during processing of the field Reference Nbr.: Reference Nbr. 'AR......' cannot be found in the system."

When I repeat the same Payment update request after a period of time (in 1,5,10,20 minutes), Acumatica creates a payment successfully.

Could you clarify what is the reason of this behavior?


3 replies

Userlevel 6
Badge +5

@Andrew1986 Can you clarify what solution you are using exactly? Did you create this API integration yourself, or is it an out-of-the-box integration?

The API is throwing an error that you are not populating the ReferenceNbr field correctly. Since you are updating the record, you need to provide a correct primary key field for the system to know what record to update. It looks like your Reference Number is literally: AR...…

So maybe this was some stub code where the correct concatenation isn’t in there yet to properly populate the field?

Userlevel 1
Badge

We use our integration.
I mean that our connector uses API calls to receive data.

As for the error message, here the real example of the error message:

"innerException":{"message":"An error has occurred.","exceptionMessage":"An error occurred during processing of the field Reference Nbr.: Reference Nbr. 'AR006170' cannot be found in the system.","exceptionType":"PX.Data.PXFieldProcessingException","stackTrace":"   at PX.Data.SessionRollback.ProcessUpdateException[ExceptionType](ExceptionType ex, PXCache cache, IDictionary keys, IDictionary values)\r\n 

It means that we created the allocation between payment and Invoice AR006170.
When we sent this request firstly, we received this error message presented above.
But during the second attempt in a few minutes, Acumatica returned the successful answer that payment with allocation to the invoice AR006170 was created.

 

Userlevel 7
Badge

Hi @Andrew1986 - did you find a solution for this one? Thank you!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved