Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
    Bank debits
    Bank redirects
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
      Alipay
      Amazon Pay
      Apple Pay
      Cash App Pay
      Google Pay
      GrabPay
      Link
      MB WAY
      MobilePay
      PayPal
      PayPay
      Revolut Pay
      Satispay
      Secure Remote Commerce
      Vipps
      WeChat Pay
        Accept a payment
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsAdd payment methodsWalletsWeChat Pay

Accept a WeChat Pay payment

Use the Payment Intents and Payment Methods APIs to accept WeChat Pay, a digital wallet popular with customers from China.

Copy page

Caution

Stripe automatically presents your customers payment method options by evaluating their currency, payment method restrictions, and other parameters. We recommend that you configure your payment methods from the Stripe Dashboard using the instructions in Accept a payment.

If you want to continue manually configuring the payment methods you present to your customers with Checkout, use this guide. Otherwise, update your integration to configure payment methods in the Dashboard.

WeChat Pay is a single-use payment method. Customers pay with WeChat Pay by scanning the QR code that they see during Checkout. Completing the payment redirects customers back to your website.

Determine compatibility

Supported business locations: AU, AT, BE, BG, CA, CY, CZ, DK, EE, FI, FR, DE, GR, HK, HU, IE, IT, JP, LV, LT, LU, MT, NL, NO, PL, PT, RO, SG, SK, SI, ES, SE, CH, GB, US

Supported currencies: aud, cad, cny, eur, gbp, hkd, jpy, sgd, usd, dkk, nok, sek, chf

Presentment currencies: aud, cad, cny, eur, gbp, hkd, jpy, sgd, usd, dkk, nok, sek, chf

Payment mode: Yes

Setup mode: Not yet

Subscription mode: Not yet

A Checkout Session must satisfy all of the following conditions to support WeChat Pay payments:

  • Prices for all line items must be in the same currency. If you have line items in different currencies, create separate Checkout Sessions for each currency.
  • You can only use one-time line items (WeChat Pay Checkout Sessions don’t support recurring subscription plans).

Accept a payment

Note

This guide builds on the foundational accept a payment Checkout integration.

This guides you through enabling WeChat Pay and shows the differences between accepting a card payment and using WeChat Pay.

Enable WeChat Pay as a payment method

When creating a new Checkout Session, you need to:

  1. Add wechat_pay to the list of payment_method_types
  2. Pass the client as 'web' in the payment_method_options.wechat_pay hash
  3. Make sure all your line_items use the same currency
Ruby
Stripe.api_key =
'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
Stripe::Checkout::Session.create({ mode: 'payment', payment_method_types: ['card'], payment_method_types: ['wechat_pay'], # or you can take multiple payment methods with # payment_method_types: ['card', 'wechat_pay', ...] # Specify the client (currently, Checkout only supports a client value of "web") payment_method_options: { wechat_pay: { client: 'web', }, }, line_items: [{ price_data: { currency: 'usd', product_data: { name: 'T-shirt', }, unit_amount: 2000, }, quantity: 1, }], success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', })

Fulfill your orders

After accepting a payment, learn how to fulfill orders.

Test your integration

When testing your Checkout integration, select WeChat Pay as the payment method and click the Pay button, which renders a QR code.

Scanning the QR code while testing routes you to a Stripe hosted page, which allows you to simulate authorizing the test payment.

See also

  • Checkout fulfillment
  • Customizing Checkout
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc