Skip to main content
Solved

AP Bill Payment REST API

  • 9 September 2024
  • 5 replies
  • 152 views

Forum|alt.badge.img

I’m trying to create AP Bill Payment by REST API
I found that I can do it with “Check”, but it doesn’t work for me - may somebody have experiance with AP Payments and can say what I’m doing wrong.
One of my API requests:
 

PUT http://***/entity/Default/20.200.001/Check HTTP/1.1
Accept: application/json
User-Agent: OpenAPI-Generator/1.0.0/csharp
Content-Type: application/json

{"ApplicationDate":{"value":"2024-09-08T00:00:00"},"CashAccount":{"value":"10011"},"Description":{"value":"Test"},"Details":[{"AmountPaid":{"value":15.0},"DocType":{"value":"Bill"},"ReferenceNbr":{"value":"TEST002"}}],"PaymentAmount":{"value":15.0},"PaymentMethod":{"value":"CHECK"},"PaymentRef":{"value":"Test001"},"Type":{"value":"Payment"},"Vendor":{"value":"V100"}}

All my attemts finish with an error like: “exceptionMessage=The system failed to commit the Adjustments row.”

Best answer by Dmitrii Naumov

@AndrewMuzalov 

If you have ‘Pay by line’ turned on for the invoice, you need DocLineNbr to be filled in the payment detail.

Please see the example below.

{
    "Vendor": {
        "value": "AAVENDOR"
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "CashAccount": {
        "value": "10200"
    },
    "Description": {
        "value": "Test"
    },
    "Details": [
        {
            "AmountPaid": {
                "value": 5.0
            },
            "DocType": {
                "value": "Bill"
            },
            "ReferenceNbr": {
                "value": "005379"
            }, 

            "DocLineNbr": {
                "value": "1"
            }
        }
    ],
    "PaymentAmount": {
        "value": 5.0
    },
    "PaymentRef": {
        "value": "Test002"
    },
    "Type": {
        "value": "Payment"
    }
}

 

 

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

5 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+6
  • Acumatica Moderator
  • 595 replies
  • September 9, 2024

@AndrewMuzalov Do you already have the Bill #TEST002 in the system when you are trying to insert a payment for it? Is it also in “Released”/”Open” status at the moment of Payment creation?

 

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 22 replies
  • September 9, 2024
Dmitrii Naumov wrote:

@AndrewMuzalov Do you already have the Bill #TEST002 in the system when you are trying to insert a payment for it? Is it also in “Released”/”Open” status at the moment of Payment creation?

 

 

 

Yes. It is already added to Acumatica and with “Open” status. I can add payment to it manually from Acumatica UI.
Here the screenshot with my test bill:

Now it is more complicated, because invoicece with multiple lines. From Acumatica UI I can add payment to every line, and use particual amount

And an additioanl screenshot from fidler with data what I’m trying to send. Here I added row number like on UI



This screenshot with manual creation from ACE to second line 15$ for line with 90$

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 22 replies
  • September 10, 2024

Any ideas how I can import AP Payments to Acumatica. May I should use another web endpoit for it?


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+6
  • Acumatica Moderator
  • 595 replies
  • Answer
  • September 10, 2024

@AndrewMuzalov 

If you have ‘Pay by line’ turned on for the invoice, you need DocLineNbr to be filled in the payment detail.

Please see the example below.

{
    "Vendor": {
        "value": "AAVENDOR"
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "CashAccount": {
        "value": "10200"
    },
    "Description": {
        "value": "Test"
    },
    "Details": [
        {
            "AmountPaid": {
                "value": 5.0
            },
            "DocType": {
                "value": "Bill"
            },
            "ReferenceNbr": {
                "value": "005379"
            }, 

            "DocLineNbr": {
                "value": "1"
            }
        }
    ],
    "PaymentAmount": {
        "value": 5.0
    },
    "PaymentRef": {
        "value": "Test002"
    },
    "Type": {
        "value": "Payment"
    }
}

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 22 replies
  • September 11, 2024

Than

Dmitrii Naumov wrote:

@AndrewMuzalov

If you have ‘Pay by line’ turned on for the invoice, you need DocLineNbr to be filled in the payment detail.

Please see the example below.

{
    "Vendor": {
        "value": "AAVENDOR"
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "CashAccount": {
        "value": "10200"
    },
    "Description": {
        "value": "Test"
    },
    "Details": [
        {
            "AmountPaid": {
                "value": 5.0
            },
            "DocType": {
                "value": "Bill"
            },
            "ReferenceNbr": {
                "value": "005379"
            }, 

            "DocLineNbr": {
                "value": "1"
            }
        }
    ],
    "PaymentAmount": {
        "value": 5.0
    },
    "PaymentRef": {
        "value": "Test002"
    },
    "Type": {
        "value": "Payment"
    }
}

 

 

Thanks! It works - this field was missed in my API, I extended it - and it works!


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