Payment Data Transfer

Payment Data Transfer (PDT) is a secure method to retrieve the details about a PayPal transaction so that you can display them to your customer. It is used in combination with PayPal Payments Standard, so that after a customer returns to your website after paying on the PayPal site, they can instantly view a confirmation message with the details of the transaction. PDT is not meant to be used with credit card or Express Checkout transactions. This page describes how PDT works and how to configure your account to use PDT.

How PDT Works

When a customer pays you, PayPal sends the transaction ID of the payment to you by appending the transaction ID to a URL you specify in your account Profile. This information is sent via a HTTP GET as this name/value pair: tx=transactionID

After you get the transaction ID, you post a FORM to PayPal that includes the transaction ID and your identity token, a string value that identifies your account to PayPal. There are instructions below that describe how to get your identity token. The form looks like this:

<form method=post action="">
  <input type="hidden" name="cmd" value="_notify-synch">
  <input type="hidden" name="tx" value="TransactionID">
  <input type="hidden" name="at" value="YourIdentityToken">
  <input type="submit" value="PDT">

In PayPal's reply to your post, the first line will be SUCCESS or FAIL. An example successful response looks like this (HTTP Header has been omitted):


If the response contains the word FAIL, make sure that the transaction ID token and identity token on your post are correct. PayPal was not able to validate the transaction.

For a list of all possible variables and values that PayPal can return to you, see the IPN/PDT Variable Reference.

This diagram shows the basic flow of a PDT transaction.

Activating PDT

To use PDT, you must activate PDT and Auto Return in your PayPal account profile. You must also acquire a PDT identity token, which is used in all PDT communication you send to PayPal.

Follow these steps to configure your account for PDT:

  1. Log in to your PayPal account.
  2. Click the Profile subtab.
  3. Click Website Payment Preferences in the Seller Preferences column.
  4. Under Auto Return for Website Payments, click the On radio button.
  5. For the Return URL, enter the URL on your site that will receive the transaction ID posted by PayPal after a customer payment.
  6. Under Payment Data Transfer, click the On radio button.
  7. Click Save.
  8. Click Website Payment Preferences in the Seller Preferences column.
  9. Scroll down to the Payment Data Transfer section of the page to view your PDT identity token.

Additional Resources

scroll to top