How to Add a Quantity Field to a Stripe Payment Button

Variable Quantity is an add-on for the free Stripe Checkout plugin that can be used to add an adjustable quantity field to your Stripe payment buttons. This lets buyers specify the quantity of a product they want to purchase.

variable quantity using the Stripe payment gateway

How Variable Product Quantity with Stripe Works

When a Stripe payment button is rendered on the front end with variable quantity enabled, a quantity input field will appear that will let buyers set the number of items they want to purchase.

variable quantity field using the stripe checkout plugin

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

quantity field label customization in the wp stripe checkout variable quantity extension

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

[wp_stripe_checkout_session name="My Product" price="2.99" quantity="" variable_quantity_label="Select Quantity:"]

How to Enable Variable Quantity for Stripe

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 quantity.

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

Leaving the quantity parameter empty implies that you wish to let buyers set the quantity for this item.

How to Limit Quantity for a Stripe Payment Button

If you wish to apply a minimum quantity limit, you can do so by using the min_qty parameter in the shortcode.

[wp_stripe_checkout_session name="My Product" price="2.99" quantity="" min_qty="3"]

A maximum quantity limit can also be applied using the max_qty parameter in the shortcode.

[wp_stripe_checkout_session name="My Product" price="2.99" quantity="" max_qty="5"]

You can use the parameters together to create a range of valid values.

[wp_stripe_checkout_session name="My Product" price="2.99" quantity="" min_qty="3" max_qty="5"]

Quantity Options

In addition to the adjustable quantity feature, the add-on lets you create a predefined set of quantity options.

[wp_stripe_checkout_session name="My Product" price="2.99" variable_quantities="2, 4, 6"]

Buyers will be able to select an option and pay.

variable quantity options in the button using the wp stripe checkout wordpress plugin

Get the Variable Quantity Add-on

WP Stripe Checkout Variable Quantity
WP Stripe Checkout Variable Quantity
Allow buyers to set the quantity for your Stripe payment buttons.

License: Unlimited Websites

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

2 thoughts on “How to Add a Quantity Field to a Stripe Payment Button”

  1. Will my customers be able to check out with a single item?

    Reply
    • @Charles, Yes.

      Reply

Leave a Comment