Skip to main content
Published: July 09 2009, 5:01:00 PMUpdated: November 28 2020, 5:25:19 PM

Some OrderAckRequests from my input file for OrderAck jobs are returning the following failure:

<OrderAckResponse>
<Ack>Failure</Ack>
<Errors>
<ErrorCode>Unknown</ErrorCode>
<ShortMessage>Invalid OrderID</ShortMessage>
<LongMessage>Invalid OrderID</LongMessage>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>

 

If you have verified that the OrderLineItemID is correct then the error is probably because you are using an outdated OrderID. It is recommended that orders be ackowledged only after the buyer has paid for the order. Once a buyer completes checkout the subsequent SoldReport will return the PaymentClearedTime and BuyerPaymentTransactionNumber fields.

When a SoldReport is generated after a transaction was created but before the buyer went through checkout you will observe that the OrderID and OrderLineItemID are identical and are formatted as ItemID-TransactionID. See sample below -

 Sold Report snippet before buyer completed checkout. Note the absence of PaymentClearedTime and BuyerPaymentTransactionNumber fields.

<OrderDetails>
<OrderID>150001314563-7290741005</OrderID>
<BuyerUserId>testbuyer</BuyerUserId>
<OrderTotalCost currencyID="USD">13.00</OrderTotalCost>
<!-- Other nodes -->
<OrderItemDetails>
<OrderLineItem>
<OrderLineItemId>150001314563-7290741005</OrderLineItemId>
<ItemID>150001314563</ItemID>
<SKU></SKU>
<QuantitySold>1</QuantitySold>
<SalePrice currencyID="USD">12.00</SalePrice>
<TaxAmount currencyID="USD">0.00</TaxAmount>
<ShippingCost currencyID="USD">1.00</ShippingCost>
<TotalCost currencyID="USD">13.00</TotalCost>
<InsuranceCost currencyID="USD">0.00</InsuranceCost>
<ListingSiteID>0</ListingSiteID>
</OrderLineItem>
</OrderItemDetails>
</OrderDetails>


<OrderDetails>
<OrderID>150001314564-7290739005</OrderID>
<BuyerUserId>testbuyer</BuyerUserId>
<!-- Other nodes -->
<OrderTotalCost currencyID="USD">25.40</OrderTotalCost>
<OrderItemDetails>
<OrderLineItem>
<OrderLineItemId>150001314564-7290739005</OrderLineItemId>
<ItemID>150001314564</ItemID>
<SKU></SKU>
<QuantitySold>2</QuantitySold>
<SalePrice currencyID="USD">12.00</SalePrice>
<TaxAmount currencyID="USD">0.00</TaxAmount>
<ShippingCost currencyID="USD">1.40</ShippingCost>
<TotalCost currencyID="USD">25.40</TotalCost>
<InsuranceCost currencyID="USD">0.00</InsuranceCost>
<ListingSiteID>0</ListingSiteID>
</OrderLineItem>
</OrderItemDetails>
</OrderDetails>

Now if the buyer makes a combined payment for multiple items purchased from the seller, this results in an order being created. The OrderID is surfaced by the GetOrders Trading API call besides other calls that return transaction related information. The updated OrderID will also be returned by the SoldReport if it is requested after checkout completion.

Sold Report snippet after buyer completed checkout (two transactions were combined into a single order). Note the PaymentClearedTime and BuyerPaymentTransactionNumber fields.

 <OrderDetails>
<OrderID>6014221012</OrderID>
<BuyerUserId>testbuyer</BuyerUserId>
<PaymentClearedTime>2009-07-09T17:50:12.000Z</PaymentClearedTime>
<!-- Other nodes -->
<OrderTotalCost currencyID="USD">38.40</OrderTotalCost>
<OrderItemDetails>
<OrderLineItem>
<OrderLineItemId>150001314563-7290741005</OrderLineItemId>
<ItemID>150001314563</ItemID>
<SKU></SKU>
<QuantitySold>1</QuantitySold>
<SalePrice currencyID="USD">12.00</SalePrice>
<TaxAmount currencyID="USD">0.00</TaxAmount>
<ShippingCost currencyID="USD">1.00</ShippingCost>
<TotalCost currencyID="USD">38.40</TotalCost>
<PaymentClearedTime>2009-07-09T17:50:12.000Z</PaymentClearedTime>
<InsuranceCost currencyID="USD">0.00</InsuranceCost>
<ListingSiteID>0</ListingSiteID>
<BuyerPaymentTransactionNumber>4WC14682H6273623F</BuyerPaymentTransactionNumber>
</OrderLineItem>
<OrderLineItem>
<OrderLineItemId>150001314564-7290739005</OrderLineItemId>
<ItemID>150001314564</ItemID>
<SKU></SKU>
<QuantitySold>2</QuantitySold>
<SalePrice currencyID="USD">12.00</SalePrice>
<TaxAmount currencyID="USD">0.00</TaxAmount>
<ShippingCost currencyID="USD">1.40</ShippingCost>
<TotalCost currencyID="USD">38.40</TotalCost>
<PaymentClearedTime>2009-07-09T17:50:12.000Z</PaymentClearedTime>
<InsuranceCost currencyID="USD">0.00</InsuranceCost>
<ListingSiteID>0</ListingSiteID>
<BuyerPaymentTransactionNumber>4WC14682H6273623F</BuyerPaymentTransactionNumber>
</OrderLineItem>
</OrderItemDetails>
</OrderDetails>

You will need to use the updated OrderID when sending the OrderAck requests. Attempting to do so with the dated OrderID will result in an "Invalid OrderID" error.

How well did this answer your question?
Answers others found helpful