Integration Guide

Table Of Contents
Handling Recurring Payments
Recurring Payments With Express Checkout
10
94 October 2009 Express Checkout Integration Guide
z Initiating the processing flow to create one or more billing agreements for recurring
payments with no associated one-time purchase or recurring payment
NOTE: You can also initiate the processing flow using SetCustomerBillingAgreement
for orders that contain only a single recurring payment.
Typically, you set the amount of the payment for an Express Checkout transaction when you
call the SetExpressCheckout request and confirm the amount in the
DoExpressCheckoutPayment request. If, however, you set the amount of the payment to 0
in the SetExpressCheckout request, you can create a billing agreement without initiating a
payment. Regardless of whether a payment is included, you must call
DoExpressCheckoutPayment to complete the transaction.
NOTE: To create a billing agreement without purchase, use Version 54.0 or higher, of the
PayPal API.
To set up one or more billing agreements for recurring payments, modify the
SetExpressCheckout request as follows:
1. Add an L_BILLINGTYPEn field for each billing agreement you want to create; n is a value
in the range of 0 to 9, inclusive. Set the value of each field to RecurringPayments.
L_BILLINGTYPE0=RecurringPayments
2. Add an L_BILLINGAGREEMENTDESCRIPTIONn field to correspond to each
L_BILLINGTYPEn field you pass; n is a value in the range of 0 to 9, inclusive. Set the
value of each field to the description of the goods or services associated with that billing
agreement, for example:
L_BILLINGAGREEMENTDESCRIPTION0=Time Magazine subscription
3. If there is no associated purchase, set AMT to 0.
AMT=0
NOTE: When you create the recurring payments profile, you must include the same
L_BILLINGTYPEn and L_BILLINGAGREEMENTDESCRIPTIONn values in the
CreateRecurringPaymentsProfile request.
The SetExpressCheckout response provides a token that uniquely identifies the transaction
for subsequent redirects and API calls.
Redirecting the Buyers Browser to PayPal
After you receive a successful response from SetExpressCheckout, add the TOKEN from
the SetExpressCheckout response as a name/value pair to the following URL, and redirect
your buyers browser to it:
https://www.paypal.com/cgi-bin/webscr?cmd=_express_checkout&
token=<value_from_SetExpressCheckoutResponse>