Print

Using the Payment Button Shortcode

To add a Stripe payment button without coding, you can use a shortcode:

The shortcode [mswr_stripe_button] generates an html button on your page for initiating a Stripe payment.

To find out more about using WordPress shortcodes, see this guide.

When implementing the shortcode, you can customise its behavior using various parameters. For a comprehensive list of available parameters and their default values, please refer to the Parameters Reference.

Any of these parameters can be specified in the shortcode and may also be modifed programatically by using the filter hook {mswr_pre_stripe_checkout}.

The default value is used for any parameter that is not specified. The only parameter that must be specified is ‘Amount’.

In addition to the general parameters, you may specify parameters specific to the shortcode button as follows:

Parameter Type Required Default Value Description
label string No Pay Now The button label.

Usage Examples

[mswr_stripe_button amount="2058"]

Initiate a Stripe Checkout with:

  • Amount: US$20.58
  • Button Label: Pay with Stripe
  • Email: pre-filled with the logged in user’s email if a user is logged in.

[mswr_stripe_button amount="2058" email="none"]

Initiate a Stripe Checkout with:

  • Amount: US$20.58
  • Button Label: Pay with Stripe 

No email provided so Stripe will require the user to enter one.

[mswr_stripe_button amount="11000" product="Membership Renewal" currency="nzd" user_meta="renewal"]

Initiate a Stripe Checkout with:

  • Amount: NZ$110.00
  • Product: Membership Renewal (appears in the Checkout Form)
  • user_meta: renewal (appears in the Tranasction log and is available in transaction log and in the filter hook {mswr_transaction_complete}
  • Email: pre-filled with the logged in user’s email if a user is logged in
Page Navigation