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

1
[wpstripeglobal]
Copied!
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:
1
[wpstripeglobal product_name="Website Maintenance" description="Monthly Plan" subscription="monthly"]
Copied!
Subscription plan with 3 annual plans in USD that collects all possible payment details:
1
[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"]
Copied!

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. "9900" = 99.00 of local currency equivalent)
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"
Subscription frequency (If left unset, the default will be a one-time payment. Combinations of multiple options can be set or "any" gives users the choice in a dropdown list. Subscriptions are not supported for WeChat Pay. Alipay requires approval from Stripe for recurring payments.)
subscription
any, daily, weekly, monthly, annual
subscription="monthly,annual"
Sets default card currency
(If left unset, the customer will have a choice of all available currencies for card payments.)
default_card_currency
3-digit currency code
default_card_currency="JPY"
Sets default Alipay currency
(If left unset, the Stripe default currency will be used.)
alipay_currency
3-digit currency code, however errors will result if the currency is unsupported by Stripe for that payment method.
alipay_currency="CNY"
Sets default WeChat Pay currency
(If left unset, the Stripe default currency will be used.)
wechat_currency
3-digit currency code, however errors will result if the currency is unsupported by Stripe for that payment method.
wechat_currency="CNY
Default currency (If left unused, the customer will have a choice of all available currencies for card payments. Will be deprecated soon b/c we created default_card_currency shortcode.)
default_currency
3-digit currency code
default_currency="USD"

Example screenshots

Form title: ​
Form Title example
​Multiple pricing options:
Multiple pricing options example
Last modified 28d ago