Advanced Features Guide

Table Of Contents
Implementing the Instant Update API
Setting Up the Callback
7
84 April 2012 Express Checkout Advanced Features Guide
Setting Up the Callback
To set up the callback, establish a connection with PayPal by providing the location where
PayPal calls your callback server, along with your shipping options.
To start, you must build and operate a secure, reliable, and fast callback server that computes
shipping options, corresponding insurance options, and tax, based on your business rules. To
verify that callback requests originate from PayPal.
The HTTP protocol to specify in your callback URL depends on the integration environment
you are using:
The callback URL must start with HTTPS for production integration.
The callback URL must start with HTTP or HTTPS for PayPal Sandbox integration.
In the call to SetExpressCheckout, you must complete the steps 1 through 3 below. Steps 4
and 5 are optional:
1. Provide line-item details for the merchandise the buyer selected.
2. Provide the URL to your callback server, which PayPal validates.
3. Provide values for the flat-rate shipping options. For each option, specify:
Option name (L_SHIPPINGOPTIONNAME
n)
Option amount (L_SHIPPINGOPTIONAMOUNT
n)
The shipping option to appear as the default (true)
(L_SHIPPINGOPTIONISDEFAULT
n).
NOTE: Set L_SHIPPINGOPTIONISDEFAULTn to true (default) for one and only one
shipping option. Set L_SHIPPINGOPTIONISDEFAULT
n to false for each of the
remaining options.
If required, an adjusted value for PAYMENTREQUEST_
n_TAXAMT
If required, an adjusted value PAYMENTREQUEST_
n_INSURANCEAMT
4. If necessary to adjust the callback timeout (default: 3 seconds), provide a value from 1 to 6
for the CALLBACKTIMEOUT parameter.
5. Optionally, provide values for any of the shipping option description details fields listed
below:
Option weight (L_PAYMENTREQUEST_
n_ITEMWEIGHTVALUEm,
L_PAYMENTREQUEST_
n_ITEMWEITHTUNITm)
Option height (L_PAYMENTREQUEST_
n_ITEMHEIGHTVALUEm,
L_PAYMENTREQUEST_
n_ITEMHEIGHTUNITm)
Option length (L_PAYMENTREQUEST_
n_ITEMLENGTHVALUEm,
L_PAYMENTREQUEST_
n_ITEMLENGTHUNITm)
Option width (L_PAYMENTREQUEST_
n_ITEMWIDTHVALUEm,
L_PAYMENTREQUEST_
n_ITEMWIDTHUNITm)