Why did I get API error code 10413?
This error indicates that item-level details are being passed, but the item amounts and totals don’t match. This error usually occurs for DoExpressCheckoutPayment or DoDirectPayment, but it’s possible for any API call where you pass item-level details. For all item-level parameters, see the NVP and SOAP API Reference Guides.
Examples:
The following SOAP request passes $10.00 for ItemTotal (red), but the sum of the PaymentDetailsItem parameters (blue) is $20.00.
<!-- Request -->
<PaymentDetails>
<OrderTotal currencyID="USD">10</OrderTotal>
<ItemTotal currencyID="USD">10</ItemTotal>
<PaymentDetailsItem>
<Name>test_item_1</Name>
<Quantity>3</Quantity>
<Amount currencyID="USD">5.00</Amount>
</PaymentDetailsItem>
<PaymentDetailsItem>
<Name>test_item_2</Name>
<Quantity>1</Quantity>
<Amount currencyID="USD">5.00</Amount>
</PaymentDetailsItem>
</PaymentDetails>
The following SOAP request passes $15.00 for OrderTotal (red), but the sum of the ItemTotal, ShippingTotal, HandlingTotal, TaxTotal and InsuranceTotal parameters (blue) is $14.00.
<!-- Request -->
<PaymentDetails>
<OrderTotal currencyID="USD">15</OrderTotal>
<ItemTotal currencyID="USD">10</ItemTotal>
<ShippingTotal currencyID="USD">1</ShippingTotal>
<HandlingTotal currencyID="USD">1</HandlingTotal>
<TaxTotal currencyID=”USD”>1</TaxTotal>
<InsuranceTotal currencyID="USD">1</InsuranceTotal>
<PaymentDetailsItem>
<Name>test_item_1</Name>
<Quantity>2</Quantity>
<Amount currencyID="USD">5.00</Amount>
</PaymentDetailsItem>
</PaymentDetails>
Other responses
Error code 10413 can return an Ack of SuccessWithWarning. This means that the payment has been completed, but the item details will be dropped from any transaction details you see in your PayPal account.
See the Developer Portal for a complete list of NVP/SOAP API error codes.