Help Article

Ask our Business Community

Get started and join the conversation to use PayPal for business in the Headstart Community.

Why did I get error 4002 when using PDT?

While you were using Payment Data Transfer, PayPal returned general error code 4002.

This error may have several different causes, such as:
  • An invalid tax token.
  • Cookies.
  • Cache.
  • Internet congestion.
  • The email address isn't confirmed on the PayPal account receiving the payment.

With regard to Payment Data Transfer (PDT), error 4002 simply means that the request couldn't be completed, usually because the information being sent back is:
  • Incorrect.
  • Posting to the Sandbox instead of the Live site.
  • Requesting the same transaction data more than five times.

If an invalid tax token produced error 4002, you can resolve it using Classic ASP:
txToken = "ThisIsABogusTaxToken, ThisIsA2ndBogusTaxTokenPassedInWhenACreditCardIsUsed"
iFindComma = InStr(txToken,","
if iFindComma > 0 then
txToken = left(txToken,iFindComma-1)
end if
query = "cmd=_notify-synch&tx=" & txToken & "&at=" & g_paypal_token
We’re sorry, the page you’re looking for is no longer available. Please try your search again in our Help Center if you have a question or want to contact us.