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.

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

[checkout_for_paypal item_description="My item description" amount=""]

Leaving the amount parameter empty 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 leave the item_description parameter empty.

[checkout_for_paypal item_description="" amount=""]
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

Get the Variable Price Add-on

Checkout for PayPal Variable Price
Checkout for PayPal Variable Price
Let buyers set the amount they will pay.
Price: $39.99
Price: $29.99

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

  1. Does the Pay Later option supports Pay in 4?

    Reply
    • @Robert, Yes.

      Reply
  2. this is completely the function i need – but, at the site it says: “You need to provide a valid price amount”

    Reply
    • @Alix, Have you installed the add-on?

      Reply
      • There is only the link to the website where I can find the options for the short code but no instruction how to install. How can I install the add on?

        Reply
        • @Alix, You need to have these 2 plugins installed – 1. The core Checkout for PayPal plugin (free) 2. The variable Price add-on (premium). There is a buy button for the Variable Price add-on on this page.

          Reply

Leave a Comment