Payment Data Transfer
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.
Note: PayPal also has an alternative payment notification service named Instant Payment Notification (IPN). See IPN vs PDT for information on the advantages and disadvantages of each of these notification solutions.
The following steps illustrate the basic flow of a PDT transaction.
- A customer submits a payment.
- 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.
- 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.
- PayPal replies with a message indicating
SUCCESSmessage includes transaction details, one per line, in the <Key>=<Value> format. This key-value pair string is URL encoded.
- Your web page parses the message and then displays the information for the customer.
To enable Payment Data Transfer, do the following:
Check your account status. Login to your PayPal business account on paypal.com.
Click the settings icon at the top of your PayPal account page and then click Profile and settings.
Note: If you do not see the profile icon in the top right, go to Profile within the My Account tab. If you do not see this option either, upgrade your account to a PayPal business or premier account.
Click on My settings and confirm your Account type is either
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.
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.