Payment Data Transfer

API

Last updated: Sept 19th, 12:35am

Payment Data Transfer (PDT) is a notification service that, once activated, can send transaction-related information immediately to merchants who are using PayPal payment buttons (PayPal Payments Standard). Merchants can display these transaction details on their website to confirm the buyer's payment was successful. Merchants can also use this information to automatically fulfill orders for digital goods. This feature applies to PayPal Payments Standard transactions, including Buy Now, Donation, Subscriptions, and Shopping Cart buttons. For more information about PayPal payment buttons, see PayPal Payments Standard.

Payment Data Transfer enables merchants who use PayPal payments buttons to:

Securely display transaction details — PayPal authenticates the PDT request using a unique secure PDT token previously assigned to the merchant. Payment Data Transfer sends transaction details to the merchant's website. The merchant implements a script that displays successful payment information to customers.

Automatically fulfill orders for digital goods — Upon successful payment, the merchant can display a link to allow customers to download digital goods.

Manage inventory and other tasks — Merchants can modify the script to update a database. For example, the script can update inventory or order status.

The following steps illustrate the basic flow of a PDT transaction.

  1. A customer submits a payment.
  2. PayPal sends the transaction ID of the payment through HTTP as a GET variable (tx). This information is sent to the Return URL you specified in your PayPal account profile.
  3. Your return URL web page contains an HTML POST form that retrieves the transaction ID and sends the transaction ID and your unique PDT token to PayPal.
  4. PayPal replies with a message indicating SUCCESS or FAIL. The SUCCESS message includes transaction details, one per line, in the < Key > = < Value > format. This key-value pair string is URL encoded.
  5. Your web page parses the message and then displays the information for the customer.

Get Started

To enable Payment Data Transfer, do the following:

  • Check your account status. Login to your PayPal business account on paypal.com.

    Click your profile name in the top right corner of your account and then click Account Settings.

    Click on My settings and confirm your Account type is either Premier or Business.

  • Modify your PayPal Profile. Navigate to My selling tools, and click Update next to Website preferences, which takes you to the Website payment preferences page. Enable Auto Return for Website Payments. Then, specify a Return URL and enable Payment Data Transfer. Payment Data Transfer requires the Return URL setting. PayPal displays an Identity Token. Copy and save it; add it to the script on your Return URL page.

  • Write a script that parses the URL-encoded key-value pair string sent to your Return URL page and displays transaction details on this page. See the PDT-specific variables for PayPal's PDT keys (variables). There are additional variables that are shared between the IPN and PDT notification services; a comprehensive list can be found in the IPN and PDT variables reference.

  • To fulfill orders or take other advanced actions that rely on a database, add to your script as needed.

  • Test your integration using the PayPal sandbox. First, log in to the Sandbox section of the PayPal developer site and setup sandbox accounts. Then log into the PayPal sandbox with a test merchant account and repeat the Website payment preferences setup steps mentioned above in your sandbox account profile. For more information on Sandbox testing, see the Sandbox guide.

  • You're ready to go live once you've verified that your implementation works correctly in the PayPal sandbox.

Availability

You can use Payment Data Transfer along with PayPal payment buttons (PayPal Payments Standard) in any country where PayPal is accepted. There are fees for currency conversion and to receive payments from another country. For more information, see PayPal Merchant Fees.

There are no additional PayPal fees charged for use of the Payment Data Transfer feature outside of the regular fees charged for PayPal payment button transactions.

Documentation

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more