djd
djd

Reputation: 5178

Paypal SetExpressCheckout error 10413 when items add to $0

I'm trying to make a sale on my website where customers can receive an item for free, they just need to pay shipping.

However, it doesn't seem like PayPal is coping with this: I'm receiving the error 10413: The totals of the cart item amounts do not match order amounts.

The request I'm sending to PayPal is:

L_PAYMENTREQUEST_0_AMT0: "0.00"
L_PAYMENTREQUEST_0_DESC0: "Pink+Bare+Cub+nappy+and+cream+wetbag"
L_PAYMENTREQUEST_0_NAME0: "Facebook+Nappy+Giveaway"
L_PAYMENTREQUEST_0_QTY0: "1"
METHOD: "SetExpressCheckout"
PAYMENTREQUEST_0_AMT: "7.50"
PAYMENTREQUEST_0_CURRENCYCODE: "AUD"
PAYMENTREQUEST_0_CUSTOM: "agtzfmJhYnktYmFyZXISCxILY2FydEludm9pY2UYq1EM"
PAYMENTREQUEST_0_ITEMAMT: "0.00"
PAYMENTREQUEST_0_PAYMENTACTION: "Sale"
PAYMENTREQUEST_0_SHIPPINGAMT: "7.50"
VERSION: "63.0"

(Some fields redacted to simplicity)

The response I'm receiving:

ACK: "Failure"
BUILD: "3242673"
CORRELATIONID: "c8b284c8a04fa"
L_ERRORCODE0: "10413"
L_LONGMESSAGE0: "The%20totals%20of%20the%20cart%20item%20amounts%20do%20not%20match%20order%20amounts%2e"
L_SEVERITYCODE0: "Error"
L_SHORTMESSAGE0: "Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e"
TIMESTAMP: "2012%2d07%2d09T02%3a03%3a48Z"
VERSION: "63%2e0

Any idea how to work around this?

Upvotes: 2

Views: 3232

Answers (2)

Vitalii Ivanov
Vitalii Ivanov

Reputation: 3251

You should include the following values when calculate the final amount total.

PAYMENTREQUEST_0_ITEMAMT - this is order total without sipping, tax etc.
PAYMENTREQUEST_0_TAXAMT
PAYMENTREQUEST_0_SHIPPINGAMT
PAYMENTREQUEST_0_INSURANCEAMT
PAYMENTREQUEST_0_HANDLINGAMT
PAYMENTREQUEST_0_AMT - this is order total + tax, shipping etc.

Upvotes: 0

Lenny Markus
Lenny Markus

Reputation: 3418

Unfortunately, you can't have zero-value items.

One solution is to make an item called Free Pink Bare Cub nappy and cream wetbag + Shipping and set its value to the shipping amount. And use the notes to make absolutely clear the the buyer is only paying for shipping.

Another option is to specify a value of 0.01 for the item, and then give the buyer a 0.01 discount on shipping to offset this, using the PAYMENTREQUEST_0_SHIPDISCAMT field

EDIT: Although I haven't personally tested one free item and one paid item, based on your comment, then the workaround is easy. Simply have your free item, and then create a second item called Shipping and Handling

Upvotes: 5

Related Questions