Integration Guide

Table Of Contents
PayPal Payments Standard Integration Guide June 2012 55
Single-Item Payments – Buy Now Buttons
Sample HTML Code for Buy Now Buttons
1
Product options with prices specify the prices in two places:
The dropdown menu displays the prices for each option. Buyers see the prices they pay for
each option.
A list of hidden HTML variables repeats the prices for each option. PayPal uses these
prices to charge buyers for the options they choose.
Dropdown menus with option prices use the following variables:
currency_code – sets the currency for option prices
item_index – identifies which dropdown menu of product option has prices
option_select* and option_amount* – repeats the prices for each option
NOTE: You cannot specify item IDs for product options with prices to have PayPal track
inventory for your item. PayPal can track inventory by product option only for buttons
that you save in your PayPal account.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="herschelgomez@xyzzyu.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Hot Sauce">
<input type="hidden" name="currency_code" value="USD">
<!-- Provide a dropdown menu option field. -->
<input type="hidden" name="on0" value="Type">Type of sauce <br />
<select name="os0">
<option value="Select a type">-- Select a type --</option>
<option value="Red">Red sauce</option>
<option value="Green">Green sauce</option>
</select> <br />
<!-- Provide a dropdown menu option field with prices. -->
<input type="hidden" name="on1" value="Size">Size <br />
<select name="os1">
<option value="06oz">6 oz. bottle - $5.95 USD</option>
<option value="12oz">12 oz. bottle - $9.95 USD</option>
<option value="36oz">3 12 oz. bottles - $19.95 USD</option>
</select> <br />
<!-- Specify the price that PayPal uses for each option. -->
<input type="hidden" name="option_index" value="1">
<input type="hidden" name="option_select0" value="06oz">
<input type="hidden" name="option_amount0" value="5.95">
<input type="hidden" name="option_select1" value="12oz">