How to Add a Price Field to a Stripe Payment Button

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

accept variable price amount using the stripe payment gateway

Option 1

You can enable variable pricing in the product interface of the Stripe checkout plugin.

enable variable pricing in the wp stripe checkout plugin

Once you have created a new product or edited an existing one with this option enabled, add the shortcode for it to a post/page.

[wp_stripe_checkout id="1"]

Replace the value of id with your product ID.

When the button for this product is rendered on the front end, a price input field will appear that will let buyers set the amount they want to pay.

variable price amount field using the stripe checkout plugin

The default label for the price field (Amount) can be customized in the add-on settings (Stripe Checkout > Variable Price).

price amount field label customization in the wp stripe checkout variable price extension

Option 2

If you are using the “wp_stripe_checkout_session” shortcode in the Stripe Checkout plugin, you can change it to the following to enable variable pricing.

[wp_stripe_checkout_session name="My Product" price=""]

Leaving the price parameter empty implies that you wish to let buyers enter a custom amount for this item.

Get the Variable Price Add-on

WP Stripe Checkout Variable Price
WP Stripe Checkout Variable Price
Allow buyers to pay their desired amount for your Stripe payment buttons.

Note:
* Please do not purchase if you are not sure about a feature, contact us instead.
* Please do not purchase to ask for more features or make the product work in a certain way.
* Please 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: $29.99

Please contact us if you have any questions about the add-on.

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

  1. You’re a lifesaver!! Now I can accept custom payments on my website.

    Reply
    • @Robert, I’m glad you like the plugin 🙂

      Reply
  2. Hi,

    I need to accept custom payments on my website, but can`t find variable pricing option in the product interface.
    Shortcode [wp_stripe_checkout_session name="My Product" price=""] is not working. I receive an error message “You need to provide a valid price for your item”.
    Can you help me with this problem, please?
    Thank you in advance!

    Reply
    • @Dima, It comes from the Variable Price extension.

      Reply
  3. How do I get the variable price extension? I can’t find it as a plugin, or a download link anywhere?

    Reply
    • @Rebecca, There is a Buy Now button on this page.

      Reply
  4. I consider to use this, because I have variable pricing (we sell a service, not a product).

    Here is my Problem: I want that the User enter on my WordPress Page the Amount from his Invoice. That I want to add the fee internally (5%) and than I want that this parameter is handover to Stripe.

    Is this possible with this Plugin?

    Reply
    • @Frank, Is this invoice generated by Stripe?

      Reply

Leave a Comment