Buttons
Buy Now
Add to Cart
Donations
Gift Certificates
Subscriptions and Recurring Billing

Advanced Techniques


"Buy Now" Button HTML Code

The example code below shows the minimum information you need to create a Buy Now button (in this case, to purchase a teddy bear):
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Teddy Bear">
<input type="hidden" name="amount" value="12.99">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>


This code generates the button image below.

Sample Buy Now Button


Dynamic Button Generation

If you dynamically generate portions of your site, save time by updating the variables with information from your database. To use the button above for a different item, edit the values for two variables:
  • item_name
  • amount
Customization Resources
Using option fields on your websiteLet customers choose merchandise attributes.
Pre-Populate Your Customer's Sign UpPass customer information you've collected to PayPal for a smoother user experience.
Convert Buy Now ButtonsTurn your PayPal Buttons into "Add to Cart" button for use with PayPal's Shopping Cart.
Developer CentralLearn how to integrate PayPal with your site.
PayPal Developer CommunityShare information, ask questions of fellow developers, and offer your own solutions.
Documentation
Note: Adobe Acrobat is required to read PayPal's manuals.
The Website Payments Standard Integration Guide provides in-depth information on using Buy Now buttons:
  • A visual walk-through of how buyers and sellers use Buy Now Buttons
  • Setting up shipping, taxes, and other special options
  • Receiving Email and Instant Payment Notifications
  • Sample code, including a list of available parameters
  • How to pre-populate your customer's sign-up forms
  • Receiving instant notification of payments you receive
  • Frequently asked questions