Integration Guide
Table Of Contents
- Preface
- Introduction
- Payment Data Transfer
- Instant Payment Notification (IPN)
- Downloadable History Log
- IPN and PDT Variables
- Data Type, Maximum Field Lengths, and URL Encoding
- About These Tables of Variables
- test_ipn Variable in Sandbox
- IPN Variables in All Posts
- Buyer Information
- Basic Information
- Advanced and Custom Information
- Shopping Cart Information
- Currency and Currency Exchange
- Auctions
- Mass Payment
- Subscriptions Variables
- Dispute Notification Variables
- PDT-Specific Variables
- Downloadable History Log Columns and Values
- Country Codes
Order Management Integration Guide August 2005 3
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . .11
Email. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Differences between Instant Payment Notification (IPN) and Payment Data Transfer (PDT) 12
SSL Not Required for IPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
PayPal-Supported Currencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 2 Payment Data Transfer . . . . . . . . . . . . . . . . . . .15
How PDT Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Enabling Payment Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Getting and Using the Identity Token . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PDT and PayPal Account Optional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PDT Notification Synch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Constructing the POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
PayPal Response to POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
PDT and Auto Return: Messaging to Buyer . . . . . . . . . . . . . . . . . . . . . . . 21
Preventing Fraud. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Chapter 3 Instant Payment Notification (IPN) . . . . . . . . . . . . .23
How It Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
How IPN POSTs Are Sent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Setting Up IPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
IPN Notification and Notification Validation . . . . . . . . . . . . . . . . . . . . . . . . . 26
Shared Secret Per Transaction or by Profile Setting . . . . . . . . . . . . . . . . . . 26
Shared Secret Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
HTTPS Postback to PayPal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Using IPN with Multiple Currencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
payment_gross and payment_fee . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Examples of Multi-currency IPN Variables. . . . . . . . . . . . . . . . . . . . . . . . 29