How to Add a Price Field to a PayPal Button

Variable Price is an add-on for the Checkout for PayPal plugin that can be used to add a price field to your PayPal smart payment buttons. This lets buyers set the amount they will pay for your products. It can also be used to accept PayPal donation payments.

Name: Checkout for PayPal Variable Price
Type: WebApplication
Requires: WordPress
Rating: 5.0 based on 5 votes
Price: 39.99 USD

In order to add a price field you can use the following shortcode.

[checkout_for_paypal item_description="My item description" amount="3.99" variable_price="1"]

Adding the “variable_price” parameter implies that you wish to allow buyers to enter a custom amount for this item.

When the PayPal smart payment button is rendered on the front end, a price amount input field will appear with it.

variable price amount field using the checkout for paypal plugin

If you wish to allow buyers to enter a custom description for this item, you can add the “variable_price_desc” parameter for it.

[checkout_for_paypal item_description="My item description" amount="3.99" variable_price="1" variable_price_desc="1"]
variable price description field using the checkout for paypal plugin

The default labels for the description and price amount input fields can be customized in the add-on settings (Checkout for PayPal > Variable Price).

checkout for paypal variable price extension settings

You can also customize the label for each button in the shortcode.

[checkout_for_paypal item_description="My item description" variable_price_desc_label="Type of donation" amount="3.99" variable_price_label="Enter an amount:" variable_price="1" variable_price_desc="1"]

Price Options

In addition to the pay what you want feature, the add-on lets you create a predefined set of prices using the “variable_prices” parameter.

[checkout_for_paypal item_description="My item description" amount="3.99" variable_prices="1.59, 2.45, 3.99"]
[checkout_for_paypal item_description="My item description" variable_price_desc_label="Type of donation" amount="3.99" variable_prices="1.59, 2.45, 3.99" variable_price_label="Select an amount:" variable_price_desc="1"]

Buyers will be able to select an amount to pay for the item.

variable price options in the button using the checkout for paypal wordpress plugin

Get the Variable Price Add-on

Checkout for PayPal Variable Price
Checkout for PayPal Variable Price
Let buyers set the amount they will pay.

Note:
* Do not purchase before setting up the core plugin first. The add-on is not at fault if the core plugin does not work on your website.
* Do not purchase if you are not sure about a feature, contact us instead.
* Do not purchase to ask for more features or make the product work in a certain way.
* Do not try to scam us, we take it seriously. We are contributing to the WordPress community with free plugins and themes. If you cannot appreciate this our product is not the right choice for you.
* There is no refund/cancellation as it is a digital product.

Price: $39.99

8 thoughts on “How to Add a Price Field to a PayPal Button”

  1. Great addon! We are building a website for a charity organization and so far it has been a pretty seamless experience to get everything up and running.

    Reply
  2. How many variable prices can I create?

    Reply
    • @John, You can create as many as you want.

      Reply
  3. where’s the download link?

    Reply
    • @Aaron, There is a “Buy Now” button on this page.

      Reply
  4. Is it possible to change the appearance of the price field or its color? When I enter a price in the field, it appears gray on gray and is almost invisible on my site.

    Reply
    • @Florence, It is possible to apply custom styling. The price input field can be targeted with this CSS class: coforpaypal_variable_price_input

      The add-on does not apply any custom border color by default (It comes from your theme). If you need any help with CSS feel free to get in touch by using the contact form on the site.

      Reply
      • Thank you very much for your advice and efficient support, the add-on works very well and I’m really satisfied.
        Many thanks 🙂

        Reply

Leave a Comment