Skip to main content
Question

Payment API fails when applying to some Sales Orders: “The order cannot be applied, the specified combination of the order type and order number cannot be found”

  • May 23, 2026
  • 3 replies
  • 33 views

I am creating a Payment/Prepayment through the Acumatica Contract-Based REST API and applying it to a Sales Order using the OrdersToApply detail.

The same API payload structure works for several Sales Orders, but it fails for some specific orders with the following error:

An error occurred during processing of the field Order Nbr.:
The order cannot be applied, the specified combination of the order type and order number cannot be found in the system.

Sample request structure:

{
"CashAccount": {
"value": "XXXXX"
},
"CurrencyID": {
"value": "USD"
},
"CustomerID": {
"value": "CXXXXXXXXXXX"
},
"Description": {
"value": "Shopify Payment XXXXX"
},
"Hold": {
"value": false
},
"OrdersToApply": [
{
"AppliedToOrder": {
"value": 69.08
},
"OrderNbr": {
"value": "ES88832"
},
"OrderType": {
"value": "ES"
}
}
],
"PaymentAmount": {
"value": 69.08
},
"PaymentMethod": {
"value": "SHOPPAY"
},
"PaymentRef": {
"value": "shopify_payments/XXXXX"
},
"ReferenceNbr": {
"value": "<NEW>"
},
"Type": {
"value": "Prepayment"
}
}

For the failing order, I checked the Sales Order screen and confirmed:

Order Type: ES
Order Nbr: ES88832
Status: Open
Customer: CXXXXXXXXXXX
Currency: USD
Order Total: 69.08

I also tried updating the CustomerID in the Payment payload to match the customer shown on the Sales Order, but the API still returns the same error.

What is confusing is that the same API request structure works for other Sales Orders, but fails only for some specific ones.

Could you please advise what conditions Acumatica checks when applying a Payment/Prepayment to a Sales Order through the OrdersToApply detail?

Specifically, what should I verify besides the following?

  • Sales Order exists with the same OrderType and OrderNbr

  • Payment CustomerID matches the Sales Order customer

  • Sales Order status is Open

  • Currency matches

Is there any additional setup or hidden condition that would make the order visible on the Sales Order screen but not selectable/applicable in the Payment OrdersToApply tab via API?

Any guidance would be appreciated.

3 replies

Forum|alt.badge.img+3

@PhatPham 

Have you verified whether the same Sales Order can be manually added to the Payment/Prepayment in the Acumatica UI?

If it fails there as well, then this may not be related to the REST API payload itself but rather to order/payment applicability conditions or setup.


  • Author
  • Freshman II
  • May 25, 2026

@PhatPham 

Have you verified whether the same Sales Order can be manually added to the Payment/Prepayment in the Acumatica UI?

If it fails there as well, then this may not be related to the REST API payload itself but rather to order/payment applicability conditions or setup.

Thank you for the suggestion.

We tested the same scenario manually in the Acumatica UI, and the Payment/Prepayment can be created and applied to the Sales Order successfully. The fields used in the UI appear to be almost the same as the API payload.

However, when we run the same case through the REST API, it still returns the error that the Order Type and Order Number combination cannot be found.

Based on this, it seems the Sales Order is eligible to be applied manually, but the issue occurs only when using the API. Could you please advise what else we should compare between the UI behavior and the REST API payload?


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • May 25, 2026

@PhatPham 

Could you try removing ref no from your payload:

"ReferenceNbr": {

"value": "<NEW>"

},

REST API: Sales Order cannot be created. Getting a Document number (NEW) error. | Community

 

BTW, here are some related threads:

Unable to Create Payment for Invoice | Community

Order Entry - Create Payment | Community