Integration Guide

Table Of Contents
Express Checkout Integration Guide May 2010 39
Implementing the Simplest Express Checkout Integration
Obtaining Express Checkout Transaction Details
4
NOTE: The following example uses the PayPal Sandbox server:
https://www.sandbox.paypal.com/webscr
?cmd=_express-checkout&token=tokenValue
&AMT=amount
&CURRENCYCODE=currencyID
&RETURNURL=return_url
&CANCELURL=cancel_url
Obtaining Express Checkout Transaction Details
To obtain details about an Express Checkout transaction, you can invoke the
GetExpressCheckoutDetails API operation.
This example assumes that PayPal redirects to your buyers browser with a valid token after
the buyer reviews the transaction on PayPal.
Although you are not required to invoke the GetExpressCheckoutDetails API operation,
most Express Checkout implementations take this action to obtain information about the
buyer. You invoke the GetExpressCheckoutDetails API operation from the page
specified by return URL, which you set in your call to the SetExpressCheckout API.
Typically, you invoke this operation as soon as the redirect occurs and use the information in
the response to populate your review page.
To obtain a buyers shipping address and Payer ID
1. Specify the token returned by PayPal when it redirects the buyers browser to your site.
PayPal returns the token to use in the token HTTP request parameter when redirecting to
the URL you specified in your call to the SetExpressCheckout API.
TOKEN=tokenValue
2. Execute the GetExpressCheckoutDetails API to obtain information about the buyer.
3. Access the fields in the GetExpressCheckoutDetails API response.
NOTE: Only populated fields are returned in the response.
Completing the Express Checkout Transaction
To complete an Express Checkout transaction, you must invoke the
DoExpressCheckoutPayment API operation.
This example assumes that PayPal redirects your buyers browser to your website with a valid
token after you call the SetExpressCheckout API. Optionally, you may call the