Integration Guide

Table Of Contents
PayPal Payments Standard Integration Guide June 2012 333
Third-Party Shopping Carts – The Cart Upload Command
Implementing the Instant Update API With the Cart Upload Command
7
fallback_shipping_option_x – one or more sets of shipping option variables.
You must include 1 instance of this variable, with its index (
x) set to 0. If you include just 1
instance, you must include fallback_shipping_option_is_default_
x with its
index (
x) set to 0 and its value set to 1.
The sample code below illustrates a basic setup for the Instant Update callback, which you
include in the HTML Form variables for the Cart Upload command.
...
<input type="hidden" name="callback_url" value="your_callback_server_URL">
<input type="hidden" name="callback_timeout" value="3">
<input type="hidden" name="callback_version" value="61"><!--Required! -->
<input type="hidden" name="fallback_shipping_option_name_0" value="Option
1">
<input type="hidden" name="fallback_shipping_option_amount_0" value="1">
<input type="hidden" name="fallback_shipping_option_is_default_0"
value="1">
<input type="hidden" name="fallback_shipping_option_name_1" value="Option
2">
<input type="hidden" name="fallback_shipping_option_amount_1" value="3">
<input type="hidden" name="fallback_shipping_option_is_default_1"
value="0">
<input type="hidden" name="fallback_insurance_option_offered" value="0">
...
Responding to the Callback for Instant Update
PayPal sends your callback server an Instant Update request whenever buyers enter billing
information or log in to PayPal to make payments. Your callback server calculates shipping
options and rates and sends them back to PayPal, in Name-Value pair (NVP) format.
PayPal sends Instant Update callback requests to the location that you specified with the
callback_url HTML variable. The fields in the callback request include:
Individual item details that you included in the Cart Upload command.
Shipping address of the buyer.
Using the information in the callback request, calculate the rates and options yourself or send
the information in an API call to your carrier to perform the calculations for you. Then send
the shipping options, insurance amounts, and taxes to PayPal in the callback response.
The Callback Request for Instant Update With the Cart Upload Comand
Callback requests specify the shipping addresses that buyers want to use when they are about
to complete a payment. Also, callback requests include individual item details for the
payments that buyers want to complete.