Skip to main content
Solved

Error during the payment creation process via API

  • February 10, 2023
  • 1 reply
  • 103 views

Forum|alt.badge.img

Hi Team,

Could you help with the following question?

 

We have an Invoice and Credit Memo.
In Acumatica I can apply a Credit Memo to the Invoice.

But via API, when I do the same, I receive the error message - {"message":"An error occurred during processing of the field Reference Nbr.: Reference Nbr. 'AR006176' cannot be found in the system."}

I attached the example with the endpoint and request. Maybe I use the wrong request?
Meanwhile, when I use the same request to pay the invoice by payment, it works.

Best answer by jinin

Hi @Andrew1986 

I think the applied invoice already associated with another payment. That is the reason you are getting the error. Please check with another invoice nbr.

Sample JSON

{
    "ApplicationDate": {
        "value": "2023-01-02"
    },
    "Branch": {
        "value": "PRODWHOLE"
    },
    "CardAccountNbr": {},
    "CashAccount": {
        "value": "10200"
    },
    "CustomerID": {
        "value": "AACUSTOMER"
    },
    "Description": {
        "value": "w53"
    },
    "DocumentsToApply": [
        {
            "AmountPaid": {
                "value": 100.0000
            },
            "DocType": {
                "value": "Invoice"
            },
            "ReferenceNbr": {
                "value": "AR009766"
            },
        }
    ],
    "Hold": {
        "value": false
    },
    "PaymentAmount": {
        "value": 100.0000
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "PaymentRef": {
        "value": "453245"
    },
    "Type": {
        "value": "Payment"
    }
}

 

View original
Did this topic help you find an answer to your question?

1 reply

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 693 replies
  • Answer
  • February 10, 2023

Hi @Andrew1986 

I think the applied invoice already associated with another payment. That is the reason you are getting the error. Please check with another invoice nbr.

Sample JSON

{
    "ApplicationDate": {
        "value": "2023-01-02"
    },
    "Branch": {
        "value": "PRODWHOLE"
    },
    "CardAccountNbr": {},
    "CashAccount": {
        "value": "10200"
    },
    "CustomerID": {
        "value": "AACUSTOMER"
    },
    "Description": {
        "value": "w53"
    },
    "DocumentsToApply": [
        {
            "AmountPaid": {
                "value": 100.0000
            },
            "DocType": {
                "value": "Invoice"
            },
            "ReferenceNbr": {
                "value": "AR009766"
            },
        }
    ],
    "Hold": {
        "value": false
    },
    "PaymentAmount": {
        "value": 100.0000
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "PaymentRef": {
        "value": "453245"
    },
    "Type": {
        "value": "Payment"
    }
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings