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 through an HTTP GET request as the tx=transactionID name and value pair:

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. The following instructions 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 is SUCCESS or FAIL. A successful response looks like this, with the HTTP header 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 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 that you send to PayPal.

To configure your account for PDT:

  1. Log in to your PayPal account.
  2. In your Profile, choose My Selling Tools on the left.
  3. Click Update for Website Preferences.
  4. In Auto Return for Website Payments, click the On option.
  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. In Payment Data Transfer, click the On option.
  7. Click Save.
  8. Repeat steps 2 and 3.
  9. To view your PDT identity token, scroll down to the Payment Data Transfer section on the page.

Additional resources