Noor's Plugin

WordPress Plugins, Themes, Hosting, Tutorials & more!

  • Home
  • Plugins
  • Themes
  • Contact
    • Privacy Policy
  • About

How to Add a Price Field to a Stripe Payment Button

Variable Price is an extension of 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.

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 extension 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 Extension

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

Disclosure: This page may contain affiliate links. If you follow one of those affiliate links and purchase something it will provide me with a little bit of a commission. This costs you nothing extra but helps maintain my site, free plugins, and themes. So I thank you for your support.

Related

Written by Noor Alam

Comments

  1. Robert says

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

    Reply
    • Noor Alam says

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

      Reply
  2. Dima says

    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
    • Noor Alam says

      @Dima, It comes from the Variable Price extension.

      Reply

Leave a Reply to Noor Alam Cancel reply

Your email address will not be published. Required fields are marked *

Search Noor’s Plugin

Recent Posts

  • How to Check if a Plugin is Safe to Install on Your WordPress Site
  • Does Stripe Accept PayPal?
  • How to Customize the Type of the Stripe Payment Page Button
  • How to Add a Quantity Field to a Stripe Payment Button
  • How to Add a Price Field to a PayPal Button
  • Hide Product Image for WooCommerce Plugin
  • How to Show a Download Button to Logged in Users Only
  • How to Add a Price Field to a Stripe Payment Button
  • How to Disable/Hide Featured Images in WordPress Astra Theme
  • What is the White Screen of Death in WordPress?

Copyright © 2022 · Noor's Plugin

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAcceptRead More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT