Integration Guide

Table Of Contents
Website Payments Standard Integration Guide September 2008 171
Recurring Payments – Subscribe Buttons
Sample HTML Code for Subscribe Buttons
3
<!-- Set the revised subscription price and terms. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="69.95">
<input type="hidden" name=
"p3" value="6">
<input type="hidden" name="t3" value="M">
<!-- Let current subscribers modify only. -->
<input type="hidden"
name="modify" value="2">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
For more information, see “Working With Modify Subscription Buttons” on page 134
Sample HTML Code for an Unsubscribe Button
Instead of an HTML form like other payment buttons, Unsubscribe buttons are image links to
the subscription cancellation function on the PayPal website. The URL for the image link is
specified with the HREF attribute, and it includes these URL-encoded parameters
z cmd – identifies the action as a request to cancel the active subscription of the PayPal
account holder who clicked the button.
z alias – identifies the email address on file with the subscription service providers PayPal
account through which the subscriber originally signed up, or identifies the provider’s
PayPal account by secure merchant account ID.
In the example below, the email address alice@mystore.com is URL encoded by
substituting “@” with “%40” and “.” with “%2e”.
The sample code below illustrates a Cancel Subscription button that lets subscribers cancel
their current, active subscriptions.
<A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-
find&alias=alice%40mystore%2ecom">
<IMG BORDER="0"
SRC="https://www.paypal.com/en_US/i/btn/btn_unsubscribe_LG.gif">
</A>
The sample code above produces the following result:
Paste the code onto you webpage near text that explains how subscription cancellations work.
For more information, see “Working With Unsubscribe Buttons” on page 137