PayPal 10410 and 10412 are different errors

PayPal 10410 is an invalid Express Checkout token. 10412 is a duplicate invoice ID. Magento logs both as NVP gateway errors, and they need different next steps.

#10410 means the Express Checkout token is invalid. #10412 means PayPal already has a payment for that invoice ID. Retrying the same request will not cure either one. Read the short message in the log before you change API credentials.

Illustration of two PayPal NVP log lines: 10410 Invalid token and 10412 invoice already paid.
Illustration. 10410 and 10412 are different PayPal errors. This is not a capture from a checkout.

Magento records these as PayPal NVP gateway errors in var/log/exception.log, often with a correlation id. The correlation id is for PayPal support. It is not a token you can reuse.

10410 Invalid token

PayPal’s error table says 10410, short message “Invalid token”, applies to SetExpressCheckout, GetExpressCheckoutDetails, DoExpressCheckoutPayment, and the billing-agreement calls. The token is not a token this merchant can use. Typical causes:

  • The value sent to DoExpressCheckoutPayment is not the TOKEN from SetExpressCheckout.
  • The token was edited, truncated, or double-encoded on the return URL.
  • The token belongs to another API user.

#10411 is the neighbor: the Express session expired. PayPal tells you to start again and not to send the expired token back into SetExpressCheckout. Treat 10410 the same way. Send the shopper through checkout again so Magento requests a new token.

What does not fix it: copying an old token out of a log, or switching the button to “check / money order” and calling that a PayPal repair. A missing offline payment method is a separate admin setting under Stores → Configuration → Sales → Payment Methods.

10412 Duplicate invoice

PayPal’s help page for 10412 says the invoice ID was already paid on this account. Merchants send INVNUM (NVP) or InvoiceID (SOAP) so PayPal can block a second capture for the same number. Magento’s PayPal module sends the order increment id. You get 10412 when:

  • The shopper retried and Magento reused an increment id that PayPal already captured.
  • A failed order left a paid invoice id, and the next attempt used it again.
  • Staging and production share a PayPal account and both emit the same ids.

Generate a new order. Do not keep posting the failed order’s PayPal request. If duplicate blocking is on in the PayPal profile, that is working as designed. Turn it off only if you accept duplicate captures. Prefer unique ids.

How to tell them apart in a Magento log

PayPal NVP gateway errors: Invalid token (#10410: Invalid token). Correlation ID: ...

The number in parentheses is the code. 10410: new checkout. 10412: new invoice id. 10411: the session timed out, also a new checkout.

Then look at the order in Magento admin. An order in pending_payment with 10410 never captured. An order that PayPal already shows as completed, with 10412 on the retry, must not be captured a second time. Compare the PayPal transaction search for that correlation id before you click anything that takes money.

What to change in Magento

  • Credentials: Stores → Configuration → Sales → Payment Methods → PayPal. The wrong sandbox/live switch produces authorization errors, not specifically 10410, but it is the first check when every token fails.
  • Return URL: the site’s base URL must be the URL PayPal redirects to. A localhost return URL will not work for a live buyer, and a mismatched host drops the token query parameter.
  • Increment ids: if staging shares the live PayPal account, give staging its own prefix under Stores → Configuration → Sales → Sales → Checkout, or its own sandbox account.

There is no Magento patch in this article. The gateway already said which rule fired.

A new checkout that fails with the same number is still that number. 10410 after a fresh start means the new token was not the one Magento sent. 10412 after a fresh start means the new order still reused an invoice ID PayPal has already seen.

Check the result

A new sandbox buyer completes checkout once. The order becomes processing (or your configured state) and the log has no new 10410 or 10412 for that increment id. A second click on the same order does not create a second capture.

References

On this page

Related Tools

Related guides

Related solutions

Related articles

Need a tool for this ?

Open the free tools — no signup.

FAQs

Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.