Embeddable Payment Buttons (shortcode)

This is an overview of the WeChat Pay and Alipay checkout flow for the Embeddable Payment Buttons using China Payments Plugin.

Embed the following shortcode anywhere on your site to display payment buttons with a popup payment form.

Default shortcode

[wpstripeglobal]

The payment buttons will look like this:

Embeddable Payment Buttons

The popup payment form fields and payment plans can be customized with the shortcode options below.

Example shortcodes to get started quickly

Basic monthly subscription plan that lets customers enter their own amount:

[wpstripeglobal product_name="Website Maintenance" description="Monthly Plan" subscription="monthly"]

Subscription plan with 3 annual plans in USD that collects all possible payment details:

[wpstripeglobal name="yes" collect_mobile_number="yes" require_billing="yes" require_zip="yes" product_name="Website Hosting" description="The best website hosting!" default_currency="USD" default_amount="99" subscription="annual" default_amount_2="299" default_amount_3="499"]

Optional Shortcode Attributes & Possible Values

PURPOSE

ATTRIBUTE

POSSIBLE VALUES

Example

Customer Details

Collect customer name

name

yes, no

name="yes"

Require billing address

require_billing

yes, no

require_billing="yes"

Require zip/postal code

require_zip

yes, no

require_zip="yes"

Collect mobile number

collect_mobile_number

yes, no

collect_mobile_number="yes"

PURPOSE

ATTRIBUTE

POSSIBLE VALUES

Example

Product Details

Form Title (See example screenshot below.)

form_title

string

form_title="Teaching Lessons"

Product Name

product_name

string

product_name="1 hour"

Product Description

description

string

description="1 hour language lesson"

Product Image

image_url

URL (image path)

image_url="http://yourdomain.com/img.jpg"

PURPOSE

ATTRIBUTE

POSSIBLE VALUES

Example

Pricing Details

Set 1st pricing option (If left unused the customer can enter their own payment amount. "99" = 99 of local currency equivalent, no decimals supported yet.)

default_amount

positive integer

default_amount="99"

Set 2nd pricing option

(See example screenshot below.)

default_amount_2

positive integer

default_amount_2="199"

Set 3rd pricing option

default_amount_3

positive integer

default_amount_3="499"

Default currency (If left unused, the customer will have a choice of all available currencies for Credit Card payments. WeChat and Alipay payments require the default Stripe account currency.)

default_currency

3-digit currency code

default_currency="USD"

Subscription frequency (If left unused, the default will be a one-time payment. Combinations can be set to limit desired options or "any" gives users the choice in a dropdown box.)

subscription

any, daily, weekly, monthly, annual

subscription="monthly"

Example screenshots

Form title: ​

Form Title example

Multiple pricing options:

Multiple pricing options example