Single-Item payments: Buy Now buttons

Buy Now buttons are used to accept single-item purchase payments. A Buy Now button can sell one or more units of a single item. It's a common practice to create multiple Buy Now buttons, placing them on a single page to sell multiple items on the page.

Buy now buttons are created using the Button Creation Tool on the PayPal website. The actual Buy Now button images can be selected from a large set of default button images provided by PayPal. PayPal also provides the ability for you to create and use your own custom button images.

The following topics provide information about creating Buy Now buttons:

Getting started with Buy Now buttons

The easiest way to add a Buy Now button to your website is by using the button creation tool on the PayPal website. As soon as you add the button, you can begin accepting payments on your website.

Follow one of these procedures to get started with Buy Now buttons:

Creating and Implementing a Basic Buy Now Button

The following instructions describe how to create a basic Buy Now button, and place it on a webpage.

  1. Log in to your PayPal business account.

  2. Click Tools at the top of the page to navigate to the My Saved Buttons page. Then, click the PayPal Buttons item on the Tools page.

    The My Saved Buttons page opens.

    Note: If you do not see Tools at the top of the page, click the Merchant Services tab, then click My saved buttons under Tools and settings on the right.

  3. In the Related Items box on the right, click the Create new button link.

    The Create PayPal payment button page opens.

  4. In the Choose a button type dropdown menu, select Buy Now.

  5. Enter the payment details of your item:

    • Item name
    • Price
  6. Scroll to the bottom of the page, and click Create Button.

    The Add your button code to your webpage page opens.

  7. Click the Select Code button on the Websites tab to select all of the generated HTML code, then right-click on the code and select Copy.

  8. In your web editing tool, open the page where you want to display the button.

    Important: Make certain that your tool is ready for you to paste HTML code, such as by switching to an HTML view from a design view of your webpage.

  9. Locate the position in the code where you want the button displayed and paste the code from the clipboard to that location.

Creating buy Now Buttons before you create your PayPal account

You can create basic Buy Now buttons, add them to your website, and begin accepting payments before you sign up for your PayPal account. Read the following topics to learn more about creating Buy Now buttons before you create your PayPal account.

Creating a basic Buy Now button without a PayPal account

Note: You cannot create payment buttons without a PayPal account if JavaScript is disabled in your browser.

  1. Verify that you are NOT logged into a PayPal account. Go to the PayPal website using this link: Create PayPal payment button.

    The Create PayPal payment button page opens.

  2. In the Choose a button type dropdown menu, select Buy Now.

  3. Enter the payment details of your item.

    • Item name
    • Price
    • Email address to receive payments
  4. Scroll to the bottom of the page, and click Create Button.

    The Add your button code to your webpage page opens.

  5. Click the Select Code button on the Websites tab to select all of the generated HTML code.

  6. To copy the button code, right-click on the code, and then select Copy.

  7. In your web editing tool, open the webpage where you want to display the button.

    Important: Make certain that your tool is ready for you to paste HTML code, such as by switching to an HTML view from a design view of your webpage.

  8. Locate the position in the page code where you want the button displayed and paste the code from the clipboard to that location.

Sign up for your PayPal account. You cannot collect payments that buyers make with your payment button until you sign up successfully for your PayPal Premier account or Business account.

Limitations of Buy Now Buttons created without a PayPal account

Consider the following limitations of payment buttons created and added to your website without signing-up for a PayPal account.

  • You cannot claim the payments that buyers authorize during checkout, when using buttons before a PayPal account is created. PayPal collects and holds the payments as unclaimed until you sign up for your PayPal account. See the next section for details on unclaimed payments.
  • Buyers must have a PayPal account to pay you. Their ability to pay by credit card is disabled until you sign up for a PayPal account.
  • PayPal limits the features that you can specify with the button creation tool, such as saving your buttons in your PayPal account.

Note: You cannot create payment buttons without a PayPal account if JavaScript is disabled in your browser.

Unclaimed payments from buttons created without a PayPal account

For buttons that you create without a PayPal account, PayPal holds any payments authorized by buyers until you sign up for an account. PayPal identifies these held payments as "unclaimed." PayPal holds your unclaimed payments under the email address that you specify when you create the buttons. Make sure to use the same email address when you sign up for your account. Otherwise, PayPal cannot transfer your unclaimed payments to your PayPal account balance.

In their PayPal accounts, buyers see the unclaimed payments that they made to you in their recent account activity and in their transaction history. Until you finish signing up for your PayPal account, buyers can cancel your unclaimed payments and recover their funds.

The checkout experience with Buy Now buttons

This section describes the PayPal checkout experience for customers who click Buy Now buttons on your website. The following diagram illustrates the steps.

The topics below provide a clear description of the the customer checkout experience using Buy Now buttons:

Begin: Buyers are ready to purchase an item on your website

The basic checkout experience with Buy Now begins when someone on your website is ready to purchase your item.

In this example, Steve begins on Herschel's Hot Sauce website and decides to try a bottle. He clicks the Buy Now button for a single 12 oz. bottle to check out.

1: Buyers enter their billing information, or they log in to PayPal

PayPal displays a billing information/login page, which allows buyers to either enter their credit card information or log in to PayPal to pay.

For Buy Now buttons, the PayPal billing information/login page shows transaction details on the left, such as item name and transaction subtotal.

If buyers are satisfied with the details, they do one of the following to select a payment method:

  • Have a PayPal account?: Buyers click the link, enter their PayPal credentials, and click the Log in button.

  • Don't have a PayPal account?: Buyers enter their billing information. They also enter their contact information including email address and home phone number so that PayPal can send them their PayPal transaction receipts and can contact them if necessary to complete the transaction. Then, they click the Review Order and Continue button.

    If your website gathers information about your buyer, you can define HTML code to pre-populate (prefill) the corresponding billing information fields. When you pre-populate fields, buyers see a collapsed version of the billing information section. For example, if you prefilled the billing address, the address information displays on the page without the entry fields. Each pre-filled section of information is followed by a change link to allow the buyers modify the information, if necessary.

    For more information about pre-filling fields, see Filling out forms automatically with HTML variables.

In this case, Steve is satisfied with the total transaction amount of $5.95 USD. He doesn't have a PayPal account. Instead, he enters his billing and contact information, and then he clicks the Review Order and Continue button.

2: Buyers confirm their transaction details before paying

PayPal displays a transaction confirmation page to allow buyers to confirm the details before they complete their transactions and authorize their payments.

In this case, Steve reviews the transaction details and clicks the Pay Now button to complete the transaction and make his payment.

3: Buyers view and print their PayPal payment confirmations

PayPal displays a payment confirmation page after buyers pay to inform buyers that they have completed their transactions and authorized their payments successfully.

From the payment confirmation page, buyers can:

  • View the PayPal Receipt ID (transaction ID) to reconcile their payments.

  • Click the Print receipt link to print receipts for their records.

    In this case, Steve prints the PayPal payment receipt for his records.

End: Buyers receive payment authorization notices by email

PayPal sends buyers a payment authorization notice by email to confirm the transaction that they made with the merchant.

Enhancing the checkout experience wth Buy Now buttons

PayPal Payments Standard offers these features to enhance the basic checkout experience for your buyers:

Calculating tax and shipping amounts

The basic checkout experience handles tax and shipping, if you provide the information. You can enhance the checkout experience by specifying tax and shipping rates in your account profile. PayPal calculates the charges automatically for each transaction. In addition, you can specify tax and shipping charges individually for items in the payment buttons that you create.

For more information, see:

Co-Branding the checkout pages with your logo and colors

The basic checkout experience displays your email address or your business name in the upper left corner of the checkout pages. You can enhance the checkout experience by setting up custom payment pages in your account profile to specify logos and colors that match the style of your website. In addition to your account profile, you can specify logos and colors using advanced HTML variables that you add to the code of your button.

For more information, see:

Pre-populating the checkout pages with billing and shipping addresses

The basic checkout experience has forms for filling in billing and shipping information. You can enhance the checkout experience by pre-populating the forms with buyer information that you have on your website.

To learn more about pre-population, see Filling out forms automatically with HTML variables.

To learn more about the HTML variables to use, see HTML variables for filling out PayPal checkout pages automatically.

Returning buyers to your website after they check out

The basic checkout experience leaves buyers on the PayPal website after they check out. Use one of the following techniques to enhance the checkout experience so that buyers return to your website, instead.

  • Return URL: Allow buyers return to a page on your website if they click a return link or button on the PayPal payment confirmation page.

    To learn more, see item #5 under Step 3: Adding advanced features to your Buy Now button or HTML variables for displaying PayPal checkout pages.

  • Auto Return: Have PayPal return customers automatically to a page on your website.

    Important: PayPal recommends that you turn Payment Data Transfer on when you turn Auto Return on. With Auto Return on, PayPal redirects buyers to your website from an alternative PayPal payment confirmation page, which does not allow them to print PayPal receipts. Payment Data Transfer provides the transaction information that you need to allow buyers to print receipts from your website.

    To learn more, see Auto Return.

  • Payment Data Transfer: PayPal includes information about the completed transaction when you use a return URL or Auto Return to send customers back to your website. Use the information that Payment Data Transfer provides to display a "thank you, print your receipt" page on your website.

    To learn more, see the Payment Data Transfer.

Managing Buy Now transactions

Read the following topics to learn how PayPal helps you manage Buy Now transactions:

Using email notices to track Buy Now transactions

PayPal sends you email notices when:

  • Payments are made
  • Payments are pending
  • Payments are canceled

For buttons created using the Button Creation Tool, PayPal sends email notices to the primary email address of your account. If you want to send email notices to an alternate email address, follow the instructions provided in Step 9 of the following procedure: Step 1: Specifying Basic Features of Your Buy Now Button.

To specify an alternate email address for coded buttons, use the alternate email address as the value for the business HTML variable. For more information, see HTML Variables for PayPal Payments Standard.

Using recent activity to track Buy Now transactions

Shortly after buyers complete their transactions by clicking Buy Now buttons on your website, PayPal displays Buy Now transactions in your recent activity.

To view your recent history:

  1. Log in to your PayPal business account.

  2. Navigate to the Activity page by clicking Activity at the top of the page.

    Note: If you do not see Activity at the top of the page, click the My Account tab, then click Overview from the menu at the top. The My recent activity page opens.

  3. Scroll down to the Activity or Recent Activitytable near the bottom of the page and you can view the history of all your most recent transactions.

Using transaction history to track Buy Now transactions

PayPal allows you search for Buy Now transactions on the History page. The status of payments found there can be:

  • Completed: Transactions were successful, and funds were credited to your account.
  • Cleared: Payments cleared senders' accounts, and funds were credited to your account.
  • Uncleared: Payments have not cleared sender's accounts, and funds were not credited.

To work with transaction history:

  1. Log in to your PayPal business account.

  2. Navigate to the Activity page by clicking Activity at the top of the page.

    Note: If you do not see Activity at the top of the page, click the My Account tab, then click History from the menu at the top. The History page opens. Use it according to the instructions on the page to view your transaction history. The following three steps are not applicable in this scenario.

  3. Scroll down to the Activity section near the bottom of the page.

  4. Select a start and end date by clicking the Calendar icons that are inside the date selection boxes.

  5. Click the View button.

Using downloadable history logs to track Buy Now transactions

PayPal enables you to download your Buy Now transactions from the History page. You can specify a date range for the transactions and the file format of the download file.

To learn how to work with downloadable history logs, see Download Account History.

Using Instant Payment Notification (IPN) to track Buy Now transactions

PayPal allows your web server to receive messages about Buy Now transactions and payment activity on your account. If you activate Instant Payment Notification, PayPal sends messages when:

  • Payments are first made, with a status of completed or pending.
  • Payments clear, fail, or are denied, if the initial status was pending.

To learn more about Instant Payment Notification, see Instant Payment Notification: notify_url and the Instant Payment Notification Guide.

Advanced features of Buy Now buttons

Read the following topics to learn about these advanced features of Buy Now buttons:

Offering product options with Buy Now buttons

Prompt buyers for product options, such as size or color. You can prompt buyers for their option selections with dropdown menus or with text boxes.

  • PayPal provides up to 7 product options on a single button.
  • Up to 5 of those options allow selections in dropdown menus.
  • Up to 2 of those options allow selections in text boxes.

With Buy Now buttons, you can offer a product option that has separate prices for each selection by using 1 of the 5 allowable dropdown menus.

Specifying product options with Buy Now buttons

Do one of the following to create Buy Now buttons that offer product options:

Prompting for item quantities with Buy Now buttons

By default, PayPal allows buyers to purchase single quantities of your product items with Buy Now buttons. Optionally, you can have PayPal prompt buyers for item quantities.

Do one of the following to create Buy Now buttons that prompt for item quantities:

  • Select the Yes radio button for prompting buyers for item quantities when you create Buy Now buttons by using the creation tool on the PayPal website.

    See Step 3 Adding Advanced Features to Your Buy Now Button.

  • Specify that you want PayPal to prompt buyers for item quantities in the HTML button code that you write manually.

    See Sample HTML Code for a Buy Now Button that Prompts for Quantities.

Offering discounts with Buy Now buttons

PayPal allows you to offer a discount for an item. You can offer discounts either as an amount or a percentage.

  • Set a discount amount that applies to single or multiple quantities of the item. You can set a discount for the first item and a different discount for the additional quantity, and you can limit the total quantity to which the discount applies.
  • Set a discount percentage that applies to single or multiple quantities of the item. You can set a discount for the first item and a different discount for the additional quantity, and you can limit the total quantity to which the discount applies.

When you set a discount amount or percentage, you can limit the number of items to which the discount applies. Any applicable tax calculations occur after subtracting the discount.

The discount amount displays on all pages, email messages, and reports that show payment information.

Specifying item discounts

Do one of the following to create Buy Now buttons that specify discounts:

  • Specify the discount amounts or percentages when you create your Buy Now buttons by using the creation tool on the PayPal website.

  • Specify that you want PayPal to prompt buyers for item quantities in the HTML button code that you write manually.

    See Sample HTML code for a Buy Now button with discounts.

Creating advanced Buy Now buttons on the PayPal website

Read the following topics to learn more about creating Buy Now buttons on the PayPal website:

The Basic steps for using the button creation tool with Buy Now buttons

The button creation tool for Buy Now buttons is a single webpage with three sections:

  • Step 1: Select a button type and enter payment details: This section allows you to specify product options that buyers can choose, and to specify item-specific charges for shipping and tax.

  • Step 2: Track your profit and loss on the item and inventory (optional): This section allows you to control whether or not to save your button in your PayPal account. If you save your button, you can enter information that PayPal uses to track inventory and to track your profit and loss on the item.

  • Step 3: Customize advanced features (optional): This section allows you work with advanced features of Buy Now buttons, including letting buyers change item quantities. If you are familiar with HTML programming and the advanced HTML variables supported by PayPal Payments Standard buttons, you can enter them here.

One section at a time is open for you to work with. To work with another section, click its step bar to expand it.

The page allows you to switch between the sections whenever needed. When you are done configuring your button settings, click Create Button at the bottom of the page to generate the code for your button. A page opens which displays the the button code. Copy the button code and paste it onto your webpage, and your payment button is complete.

Saving Buy Now buttons in your PayPal account

By default, the Button Creation Tool saves payment buttons in your PayPal account. The tool saves your button and generates the code when you click Create Button. You must copy and paste the generated code onto your webpages, regardless of whether you save your button at PayPal. The generated code is shorter for saved buttons because PayPal keeps most of the information about your button in your account instead of encrypting it and placing it in the code that you add to your website.

Saving your payment buttons in your PayPal account has these benefits:

  • You can edit the details and options for your payment buttons in your PayPal account without changing the button code that you added to your website.

    Note: If you change product options, you need to replace the code on your web page with the newly generated code.

  • You can track inventory, and you can track profit and loss.

Use the Step 2 section of the button creation tool to control whether your button is saved in your PayPal account. You can have a maximum of 1,000 saved buttons in your PayPal account.

Tracking inventory and tracking profit and loss

PayPal can track inventory and profit and loss for items that you sell with Buy Now buttons if you save the Buy Now buttons in your PayPal account. You can track inventory for the item itself or by its product options.

If you track inventory, PayPal helps you avoid oversold situations. PayPal sends you an alert by email when your inventory on hand falls to or below the alert level you specify. You have the option to warn buyers and prevent them from buying more than your quantity on hand.

If you track profit and loss, PayPal helps you understand the profitability of your items. You enter the cost of your item, including the price that you pay to acquire the item, as well as other activity costs that you incur, such as warehousing, quality control, and administrative overhead. PayPal then provides profit and loss reports based on the volume of sales.

Use the Step 2 section of the button creation tool to specify the information that PayPal uses to track inventory and to track profit and loss.

Adding advanced features to Buy Now buttons with HTML variables

Some advanced features of payment buttons can be specified only with HTML variables. If you are familiar with HTML programming and the advanced HTML variables supported by PayPal Payments Standard payment buttons, you can enter them in the button creation tool before generating the button code.

Use the Step 3 section of the button creation tool to enter advanced HTML variables that you want to include in your payment button.

When you use the button creation tool on the PayPal website to create a Buy Now button, the tool generates HTML code for the button. Then, you copy and paste the HTML code onto the pages of your website.

In addition to HTML code, the button creation tool generates URL code for email payment links. Use email payment links to add Buy Now functionality to your email messages. If your web editing tool or your service provider does not allow you to paste HTML code onto your webpages, you might be able to paste the URL code for email payment links onto your webpages instead.

Step 1: Specifying basic features of your Buy Now button

To begin using the button creation tool for Buy Now buttons:

  1. Log in to your PayPal business account.

  2. Navigate to the My Saved Buttons page by clicking Tools at the top of the page, then click the PayPal Buttons item on the Tools page.

    The My Saved Buttons page opens.

    Note: If you do not see the Tools menu item, click the Merchant Services tab at the top of the page, click the PayPal Buttons item from the list of tools displayed under the Accept payments anywhere heading.

  3. On the My Saved Buttons page, do one of the following:

    • Create a new button from scratch. From the Related Items list on the top right side of the page, select Create new button

    • Create a new button based on a similar button. Find the button you want to use as a starting point in the list of saved buttons. Then, click the Action dropdown menu on the right, and click the Create similar button link. By using this method, when the PalPal payment button pages opens, it will open with the values already populated from the existing button, allowing you to modify them as needed.

  4. On the PayPal create button page, in the Choose a button type dropdown menu, select Buy Now.

  5. Enter the payment details of your item.

    • Item name: Enter the name of the item or service that you want to sell.

    • Item ID (optional): Enter the inventory ID or tracking number of your item, if you assign such IDs to your products.

      If you want to set up your item so that PayPal tracks inventory levels, enter a value that is unique among all the items that you sell and want PayPal to track. For more information, see Step 2: Tracking Inventory With Your Buy Now Button.

    • Price: Enter the price of your item.

      If you want to add product options with different prices for each option that buyers can select, do not enter a price here. For more information, see Step 6 below.

    • Currency: Select the currency in which you priced the item; the dropdown menu automatically selects the currency of your primary balance.

      If you want to customize the country and language of the button, make sure that you select an appropriate currency here. For more information, see Step 7 below.

  6. Customize your button with product options (optional).

    Do any of the following:

    • Add dropdown menu with price/option: Select this checkbox to add a dropdown menu of product options, with a separate price for each option.

      Enter a name for the dropdown menu, such as "Color". For each menu option, enter a name, such as "Red", "Blue", or "Green", and the price you want buyers to pay. Select the currency for your prices from the dropdown menu. You can add a maximum of 10 priced options to the menu.

      Click the Done button to preview the dropdown menu in the Buyer's View pane.

      Click the Edit link to change the name and options of your dropdown menu. To remove an option, clear the menu option name and price, and then click the Done button.

      Click the Delete link to remove the dropdown menu from your button.

    • Add dropdown menu without prices: Select this checkbox to add a dropdown menu of product options, without separate prices.

      Enter a name for the dropdown menu, such as "Size". For each menu option, enter a name, such as "Small", "Medium", or "Large".

      Click the Done button to preview the dropdown menu in the Buyer's View pane.

      Click the Edit link to change the name and options of your dropdown menu. To remove an option, clear the menu option name and click the Done button.

      Click the Delete link to remove the dropdown menu from your button.

      Click the Add another dropdown menu link to open a set of fields for another dropdown menu of options without prices. You can add a maximum of 4 dropdown menus, with a maximum of 10 options per menu.

    • Add text field: Select this checkbox to add a text box in which buyers can enter option information.

      Enter a name for the text box, such as "Enter the text you want engraved".

      Click the Done button to preview the text field in the Buyer's View pane.

      Click the Edit link to change the name of the text field.

      Click the Delete link to remove the text box from your button.

      Click the Add another text box link to open a field for the name of another text box. You can add a maximum of 2 text boxes.

    For more information, see Offering product options with Buy Now buttons.

  7. Customize the appearance and the language of your button (optional).

    Click the Customize appearance link and select one of the following:

    • PayPal button: Select this radio button to use a button image that is hosted by PayPal. You can configure the size of the button, specify whether the button displays payment card logos, and specify the country and language for the button text.

      If you change the country, ensure the currency that you selected in Step 5 above is appropriate.

    • Use your own button: Select this radio button to specify the URL of your own button image that is not hosted by PayPal. Use your own button image if the buttons hosted by PayPal do not fit the look of your website.

      If your image is hosted on a server secured with SSL, change the text box to begin with https://.

  8. Add shipping charges and tax rates to your item (optional).

    You can add shipping charges and tax rates for your item here. They override the tax and shipping rates that PayPal calculates automatically based on rates that you specify in your account profile.

    • Shipping: Enter a specific amount to charge for shipping this item.

      The currency for the amount is the same as the currency for the item. Enter zero (0.00) for items that do not incur shipping charges. The amount you enter here overrides the automatic calculation of shipping charges on the item.

      Note: Before you can accept payments from Buy Now buttons with specific shipping costs entered here, you must enable the override of shipping methods in the Shipping Calculations section of your account profile. You can create your button successfully, but you cannot accept payments from your button until you enable shipping cost overrides. Ensure that you enable shipping cost overrides for all the shipping methods that you set up for your account. For more information, see Automatic calculation of shipping charges (U.S. Merchants Only) or Automatic calculation of shipping charges (non-U.S. Merchants Only).

    • Tax: Enter a percentage to calculate the tax on this item, regardless of quantity.

      The currency for the calculated tax will be the same as the currency for the item. Enter zero (0.000) for non-taxable items to override automatic sales tax calculation on the item.

  9. Choose to use either your merchant ID or your email address.

    Select one of the following radio buttons to associate transactions from your button with your PayPal account.

    • Secure merchant account ID: When this item is selected, PayPal associates the button to your PayPal account using your secure merchant ID. In this case, all payment notification emails are sent to your account's primary email address.

    • Use your primary email address: When this item is selected, you can choose from any of the confirmed email addresses in your PayPal account. For example, you might select the email address of the person in your organization who handles order fulfillment or accounting. In this case, all payments are still deposited to your PayPal account balance, regardless of which email address is selected. However, only the selected email address will receive the email payment notifications.

  10. Do one of the following:

Step 2: Tracking inventory with your Buy Now button

Use the Step 2 section of the button creation tool to control whether to save the important details of your button in your PayPal account and to provide inventory tracking information for your item.

For more information, see Tracking inventory and tracking profit and loss.

  1. Select the Save button at PayPal checkbox to save your button in your PayPal account and to enable you to track profit and loss and inventory for your item.

  2. Select the Track inventory checkbox to enable you to enter inventory tracking information for your item. Then, do one of the following:

    • By Item: Select this radio button if you want to track inventory regardless of product options selected by buyers.

      Enter the quantity that you currently have in stock and an alert level. PayPal sends you an alert by email when your inventory on hand falls to or below the alert level.

    • By Option: Select this radio button if you want to track inventory by the product options you specified during Step 6 of Step 1: Specifying basic features of your Buy Now button. If you set up product options with prices, the button creation tool automatically selects this radio button.

      For each option listed, enter a unique item ID, the quantity that you currently have in stock, and an alert level. PayPal sends you an alert by email when your inventory on hand for any option falls to or below its alert level.

    Under the Can customers buy an item when it is sold out? heading, do one of the following:

    • Yes: Select this radio button to allow buyers to checkout and authorize their payments, even when inventory tracking shows that your item would become oversold. Buyers are not informed of oversold or out-of-stock situations nor that their items will be on back order after they complete their transactions.

    • No: Select this radio button to prevent buyers from checking out and authorizing their payments when inventory tracking shows that your item would become oversold. In the text box, enter the URL of a page on your website where you want PayPal to send buyers of out of stock items. When PayPal detects an oversold situation, PayPal informs buyers that the item is out of stock.

      If there are some items in stock, but not enough to fulfill a buyer's request, PayPal displays the amount currently available and adjusts the number in Quantity.

      Buyers can accept the quantity entered by PayPal or adjust the quantity to a lower number.

      If there are no items in stock, PayPal informs buyers that the item is completely sold out.

      Buyers click the Continue Shopping button to return to the webpage at the URL that you specified.

      No is the default choice for this feature.

  3. Select the Track profit and loss checkbox to enable entering information that PayPal uses to track profit and loss for your item. You do not have to track inventory to track profit and loss. If you track inventory, you can track profit and loss only in the same way, either by item or by option.

    If you only track profit and loss and do not track inventory, do one of the following:

    • By Item: Select this radio button if you want to track profit and loss regardless of product options selected by buyers.
    • By Option: Select this radio button if want to track profit and loss by product options that you specified during Step 1: Specifying basic features of your Buy Now button. If you set up product options with prices, the button creation tool automatically selects this radio button and you cannot change it.

    Enter the cost to you of your item or for each product option. Include the price that you pay to acquire the item, as well as other activity costs that you incur, such as warehousing, quality control, and administrative overhead.

  4. Do one of the following:

Step 3: Adding Advanced Features to Your Buy Now Button

Use the Step 3 section of the button creation tool to specify advanced features of your button.

  1. Do you want to allow buyers to change order quantities (optional)?

    • Yes: Select this radio button to prompt buyers for item quantities. PayPal prompts buyers for quantities after they click your Buy Now button.

      Use this feature cautiously, because buyers could specify quantities greater than you could fulfill. If you save your button in your PayPal account and you set up inventory tracking for your item in Step 2: Tracking inventory with your Buy Now button, PayPal can help prevent buyers from purchasing more items than you can fulfill.

    • No: Select this radio button to allow buyers to purchase only one item at a time. "No" is the default choice for this advanced feature.

  2. Can your buyers add special instructions in a message to you (optional)?

    • Yes: Select this radio button to allow buyers to add special instructions to you during checkout. In the Name of message box text box, enter the text that you want displayed for the text box in which buyers enter their special instructions; the default value is Add special instructions to merchant.

      Yes is the default choice for this feature.

    • No: Select this radio button if you do not want a text box for special instructions.

  3. Do you need your buyers' shipping addresses (optional)?

    • Yes: Select this radio button to prompt buyers to select or enter shipping addresses during checkout.

      "Yes" is the default choice for this feature.

    • No: Select this radio button if you do not want to prompt buyers for shipping addresses. Select this option for items that do not require shipping, such as digital goods that buyers download, or if the item is a service that does not require on-site delivery.

  4. Take buyers to a specific webpage (URL) after checkout cancellation (optional)?

    Select the checkbox and enter a URL in the text box if you have a special page on your website where you want buyers to return to if they cancel their checkouts before completing their transactions.

  5. Take buyers to a specific webpage (URL) after successful checkout (optional)?

    Select the checkbox and enter a URL in the text box if you have a special page on your website where you want buyers to return to after they complete checkout successfully.

    Note: If you have a special webpage for buyers who return to your website after checking out successfully, consider implementing Payment Data Transfer so that you can display information about the completed transactions. To learn more, see Payment Data Transfer .

  6. Add advanced variables to the HTML code of your payment button (optional).

    If you are familiar with the HTML programming and the advanced HTML variables supported by PayPal Payment buttons, you can enter them here. Select the checkbox, and then enter the variables in the text box below it.

    Enter any advanced HTML variables in the following name/value-pair format:

    VariableName=AllowableValue
    

    For example, if you want to handle purchases as orders rather than as final sales, use the HTML variable paymentaction with the value order. If you choose to include this variable within HTML code that you write manually, you use the following standard HTML format:

    <input type="hidden" name="paymentaction" value="order">
    

    However, in the text box, instead of the HTML format, use the following shortened name/value-pair format:

    paymentaction=order
    

    Do not enclose values in quotes, even if values contain spaces. PayPal surrounds the value from the equal sign (=) to the end of the line with quotes in the generated HTML code.

    For more information, see HTML form basics for PayPal payments standard.

  7. Do one of the following:

Copying and pasting the Buy Now code

After you click Create Button, the Add your button code to your webpage page opens. The page contains tabs with Buy Now code for specific situations:

  • Website: Copy and paste the HTML button code displayed on this tab onto the pages of your website.
  • Email: Copy and paste the URL email payment link code displayed on this tab into email templates and messages, or paste it onto webpages if your hosting provider does not allow you to include HTML code on your pages.

Whether you save your buttons in your PayPal account or choose not to at this time, you must copy and paste the code that PayPal generates onto your own webpages and into email templates and messages.

Copying and pasting the HTML code for the Buy Now button

The Website tab on the Add your button code to your webpage page contains the generated HTML code for your payment button.

If you chose not to save your button in your PayPal account, PayPal protects the generated HTML code with encryption automatically. Encrypted HTML code helps secure your buttons against malicious tampering and fraudulent payments.

You can expose the code of your payment button by clicking the Remove code protection link at the upper right of the text box. For example, you might remove protection so that you can edit the code later to change the item price. Click the Protect code link to restore the button protection that you removed. If you choose to paste the button code without code protection, you should use other methods that PayPal recommends for securing your payment button. For more information on securing the button code, see Securing your PayPal payments standard buttons.

  1. Click the Select Code button on the Websites tab to select all of the generated HTML code.

  2. Copy the button code to the clipboard by right-clicking on the code and select Copy.

  3. In your web editing tool, open the page where you want to display the button.

    Important: Make certain that your tool is ready for you to paste HTML code, such as by switching to an HTML view from a design view of your webpage.

  4. Locate the position in the page code where you want the button displayed and paste the code from the clipboard to that location.

The Email tab on the You are viewing your button code page contains the generated URL code for your email payment link.

Important: PayPal cannot protect the URL code for email payment links when the button is not saved on the PayPal website and thus is not hosted by PayPal. To generate secure email payment links, always use hosted buttons.

To copy and paste the URL code for the email payment link:

  1. Click the Select Code button on the Email tab to select all of the generated URL code.
  2. Copy the selected text to the clipboard by right-clicking on the code and selecting Copy.
  3. Open the email template or message that you want to send.
  4. Locate the position in the email template or message where you want the button displayed, and paste the code from the clipboard to that location.

Avoiding problems with pasted HTML code

After you paste the code onto your webpage or into your email, ensure that it matches exactly the code that you copied from PayPal. Pasted code might not match the generated code for the following reasons:

  • You did not copy all of the generated code.
  • Your editing tool may have special areas for pasting HTML code and other areas for pasting URLs and display text. Be sure you paste the generated code into a field that accepts HTML code or URLs.
  • Your editing tool might change some characters in the pasted code.

Sample HTML code for Buy Now buttons

The sample HTML code in this section demonstrates various features of PayPal hosted Buy Now buttons.

Important: This section includes unencrypted button code examples for illustrative purposes only. In a production environment, you must always use encrypted or hosted buttons in your webpages to prevent malicious users from tampering with the code.

Sample HTML code for a basic Buy Now button

The sample following HTML code illustrates a basic Buy Now button with these features:

  • An item named "Hot Sauce–12 oz. Bottle".
  • An item price of $5.95 USD.
  • PayPal calculates tax and shipping based on rates that you set up 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-12oz Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
  src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
  alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
  src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

Sample code for a Buy Now button with product options

The following sample code illustrates a basic Buy Now button with a dropdown menu of product options.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <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 />

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">

  <img alt="" border="0" width="1" height="1"
  src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

The sample code above produces the following result on your webpage:

Paste the code onto your webpage below an image or a text description of the item.

Sample code for a Buy Now button with product options with prices

The following sample code illustrates a basic Buy Now button with a dropdown menu of product options that have separate prices for each option.

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: PayPal can track inventory by product option only for buttons that you save in your PayPal account.

Paste the following code onto your webpage below an image or a text description of the item.

<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">
  <input type="hidden" name="option_amount1" value="9.95">
  <input type="hidden" name="option_select2" value="36oz">
  <input type="hidden" name="option_amount2" value="19.95">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">

</form>

The sample code above produces the following result on your webpage:

Sample code for a Buy Now button with product options as a text box

The following sample code illustrates a basic Buy Now button with a text box for entering product options.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Provide the buyer with a text box option field. -->
  <input type="hidden" name="on0" value="strong>Size">Enter your size 	(S, M, L, X, XX) <br />
  <input type="text" name="os0" maxlength="60"> <br />

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

The sample code above produces the following result on your webpage:

Paste the code onto your webpage below an image or a text description of the item.

Sample HTML code for a Buy Now button that prompts for quantities

The following sample HTML code illustrates a basic Buy Now button that prompts buyers to specify item quantities. Use this feature cautiously because buyers could specify quantities greater than you could fulfill.

Paste the following code onto your webpage below an image or a text description of the item.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Prompt buyers to enter the quantities they want. -->
  <input type="hidden" name="undefined_quantity" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

The sample code above produces the following result during checkout.

Use this feature cautiously, because buyers could specify quantities greater than you could fulfill.

If you save your button in your PayPal account and you set up inventory tracking for your item in Step 2: Tracking inventory with your Buy Now button, PayPal can help prevent buyers from purchasing more items than you can fulfill.

For more information, see Prompting for item quantities with Buy Now buttons.

Sample HTML code for a Buy Now button with discounts

Sample code for a Buy Now Button with a flat discount amount

The following sample HTML code illustrates a basic Buy Now button that provides a $2.00 discount on the entire order. The HTML code prompts buyers to also specify item quantities. Use this feature cautiously because buyers could specify quantities greater than you could fulfill.

Paste the following code onto your webpage below an image or a text description of the item.

<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 purchase. -->
  <input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Specify the discount amounts that apply to the order. -->
  <input type="hidden" name="discount_amount" value="2.00">

  <!-- Prompt buyers to enter the quantities they want. -->
  <input type="hidden" name="undefined_quantity" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

Sample code for a Buy Now button with a multiple discount amounts

The following sample HTML code illustrates a basic Buy Now button that provides a $0.15 discount on the 1st item ordered and a $0.20 discount on the next 4 items. The HTML code also prompts buyers to specify item quantities. Use this feature cautiously because buyers could specify quantities greater than you could fulfill.

Paste the following code onto your webpage below an image or a text description of the item.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Specify the discount amounts that apply to the item. -->
  <input type="hidden" name="discount_amount" value="0.15">
  <input type="hidden" name="discount_amount2" value="0.20">
  <input type="hidden" name="discount_num" value="4">

  <!-- Prompt buyers to enter the quantities they want. -->
  <input type="hidden" name="undefined_quantity" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

Sample code for a Buy Now button with discount percentages

The following sample HTML code illustrates a basic Buy Now button that provides a 5% discount on the 1st item ordered and a 10% discount on the next 4 items. The HTML code also prompts buyers to specify item quantities. Use this feature cautiously, because buyers could specify quantities greater than you could fulfill.

Paste the following code onto your webpage below an image or a text description of the item.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Specify the discount percentages that apply to the item. -->
  <input type="hidden" name="discount_rate" value="5">
  <input type="hidden" name="discount_rate2" value="10">
  <input type="hidden" name="discount_num" value="4">

  <!-- Prompt buyers to enter the quantities they want. -->
  <input type="hidden" name="undefined_quantity" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

Sample code for a Buy Now button with a Buy one, get one free discount

The following sample HTML code uses the discount percentage variables to offer a "Buy one, get one free" discount. To receive the discount, the buyer must purchase 2 of the item; the 2nd one is free (100% discount). The HTML code also prompts buyers to specify item quantities. Use this feature cautiously because buyers could specify quantities greater than you could fulfill

If the buyer purchases only 1 unit of the item, it is the full price. If the buyer purchases more than 2 units, the 2nd unit is free and any additional units are full price.

Paste the following code onto your webpage below an image or a text description of the item.

<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-12 oz. Bottle">
  <input type="hidden" name="amount" value="5.95">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Specify the discount percentages that apply to the item. -->
  <input type="hidden" name="discount_rate" value="0">
  <input type="hidden" name="discount_rate2" value="100">
  <input type="hidden" name="discount_num" value="1">

  <!-- Prompt buyers to enter the quantities they want. -->
  <input type="hidden" name="undefined_quantity" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >

</form>

You can use the button creation tool to create Buy Now email payment links. In such links, you can use the same variables and values that you include in HTML Buy Now buttons. However, you cannot include variables for product options in email payment links.

Important: The example email payment link shown below is included for illustrative purposes only. In a production environment, you should always use hosted email payment links to prevent malicious users from tampering with the code. Non-hosted email payment links are not secure.

Paste the following code onto your webpage below an image or a text description of the item.

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=herschelgomez@xyzzyu.com&item_name=Hot Sauce-12+oz.+Bottle&item_number=12345&amount=5%2e95&currency_code=USD

Enabling JavaScript in your browser

PayPal recommends that you keep JavaScript enabled at all times. Many features of the PayPal website require that JavaScript be enabled in your browser. Each of the major browsers used today have a setting for enabling JavaScript, and each one is slightly different. For whatever browser you are using, locate the help section, and then just search for "Enabling JavaScript". Or you can go to your preferred search engine, and simply search for "Enabling Javascript in your browser name".

scroll to top