Advanced Features Guide

Table Of Contents
Implementing the Instant Update API
Using the Callback
7
86 April 2012 Express Checkout Advanced Features Guide
The sample code below illustrates the callback response when you do not ship to the buyers
address.
METHOD=CallbackResponse
NO_SHIPPING_OPTION_DETAILS =1
When your callback server sends the previous response, the Review your information page has
these features:
A message at the top of the page indicates that your business does not ship to this location.
The shipping and handling section and the insurance section are dimmed.
The buyer can change the shipping address.
A new callback request is sent if the buyer changes the shipping address.
Using the Callback
To use the callback, you add parameter fields to SetExpressCheckout, provide PayPal a
URL for sending a callback request, and send PayPal the callback response in Name-Value
pair (NVP) format.
SetExpressCheckout
In the call to SetExpressCheckout, set the following parameters:
Set the CALLBACK field to the URL where PayPal can call your callback server. PayPal
makes the HTTPS callback request each time either of the following events occur:
The buyer changes their shipping address
The buyer enters a new shipping address
Provide values for the following required parameters:
Provide values for the line-item details parameters, such as
L_PAYMENTREQUEST_
n_NAMEm, L_PAYMENTREQUEST_n_NUMBERm,
L_PAYMENTREQUEST_
n_DESCm, L_PAYMENTREQUEST_n_AMTm, and
L_PAYMENTREQUEST_
n_QTYm.
Provide values for the flat-rate shipping options: n, L_SHIPPINGOPTIONISDEFAULTn,
L_SHIPPINGOPTIONNAMEn, and L_SHIPPINGOPTIONAMOUNTn.
–Set PAYMENTREQUEST_
n_SHIPPINGAMT to the amount set for the default flat-rate
shipping option.
If, for example, L_SHIPPINGOPTIONISDEFAULT0=true and
L_SHIPPINGOPTIONAMOUNT0=8.00, then
PAYMENTREQUEST_0_SHIPPINGAMT=8.00
–Set MAXAMT to the expected maximum total amount of the complete order.