Advanced Features Guide

Table Of Contents
Express Checkout Advanced Features Guide April 2012 87
Implementing the Instant Update API
Using the Callback
7
NOTE: PayPal recommends that the maximum total amount be slightly greater than the
sum of the line-item order details, tax, and the shipping option of greatest value.
Optionally, provide values for the following parameters:
–Set PAYMENTREQUEST_
n_INSURANCEOPTIONOFFERED to true to inform PayPal that
you are offering insurance options. Otherwise, set
PAYMENTREQUEST_
n_INSURANCEOPTIONSOFFERED to false.
Set line-item description details such as L_PAYMENTREQUEST_
n_ITEMWEIGHTUNIT0
and L_PAYMENTREQUEST_
n_ITEMWEIGHTVALUE0 shown in the example below.
–Set CALLBACKTIMEOUT to the amount of time in seconds to process the callback. By
default, CALLBACKTIMEOUT is 3. You can specify a value in the range of 1 to 6 inclusive.
The following is an example SetExpressCheckout request:
Request Parameters
[requiredSecurityParameters]
&METHOD=SetExpressCheckout
&RETURNURL=http://...
&CANCELURL=http://...
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&PAYMENTREQUEST_0_SHIPTONAME=J Smith
&PAYMENTREQUEST_0_SHIPTOSTREET=1 Main St
&PAYMENTREQUEST_0_SHIPTOCITY=San Jose
&PAYMENTREQUEST_0_SHIPTOSTATE=CA
&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US
&PAYMENTREQUEST_0_SHIPTOZIP=95131
&L_PAYMENTREQUEST_0_NAME0=10% Decaf Kona Blend Coffee
&L_PAYMENTREQUEST_0_NUMBER0=623083
&L_PAYMENTREQUEST_0_DESC0=Size: 8.8-oz
&L_PAYMENTREQUEST_0_AMT0=9.95
&L_PAYMENTREQUEST_0_QTY0=2
&L_PAYMENTREQUEST_0_NAME1=Coffee Filter bags
&L_PAYMENTREQUEST_0_NUMBER1=6230
&L_PAYMENTREQUEST_0_DESC1=Size: Two 24-piece boxes
&L_PAYMENTREQUEST_0_AMT1=39.70
&L_PAYMENTREQUEST_0_QTY1=2
&L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0=0.5
&L_PAYMENTREQUEST_0_ITEMWEIGHTUNIT0=lbs
&PAYMENTREQUEST_0_ITEMAMT=99.30
&PAYMENTREQUEST_0_TAXAMT=2.59
&PAYMENTREQUEST_0_MAXAMT=150.00
&PAYMENTREQUEST_0_SHIPPINGAMT=8.00
&PAYMENTREQUEST_0_SHIPDISCAMT=-3.00
&PAYMENTREQUEST_0_AMT=107.89
&PAYMENTREQUEST_0_CURRENCYCODE=USD
&ALLOWNOTE=1
&CALLBACK=https://...
&CALLBACKTIMEOUT=4
&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=true
&PAYMENTREQUEST_0_INSURANCEAMT=1.00