UseePay Open API
UseePay PortalMechant Dashboard
Product Docs
Product Docs
  • V2.0
  • V1.0
UseePay PortalMechant Dashboard
Product Docs
Product Docs
  • V2.0
  • V1.0
  1. Supported Payment Methods
  • Integration
    • Welcome to the UseePay Demo Page
    • Payment Product Overview
      • Hosted Checkout Integration Guide
      • Embedded Checkout Integration Guide
      • Express Checkout Integration Guide
      • Server to Server Integration Guide
    • Supported Payment Methods
      • Affirm
      • AfterPay_ClearPay
      • Bancontact
      • Bank Transfer
      • Blik
      • Boost
      • Card
      • Cashapp
      • Dana
      • GCash
      • iDEAL
      • Kakao Pay
      • Klarna
      • Konbini
      • Korean Card
      • Maya
      • MB_WAY
      • Mobilepay
      • Naver pay
      • P24
      • Payco
      • Pay with Link
      • Pix
      • Pse
      • Rabbit LINE Pay
      • Samsung Pay
      • Servipag
      • SPEI
      • Tmoney
      • Toss Pay
      • Trustly
      • TrueMoney
      • Webpay
      • RSA-Encrypted Card Payments
      • Zip
      • Yape
      • WeChat Pay
      • ApplePay
        • Apple Pay
        • Apple Pay Web Integration (API Integration)
      • GooglePay
        • Google Pay
        • Google Pay Web Integration (API Integration)
      • common
        • _shared-client-os-type
      • alipay
        • Alipay CN
        • Alipay HK
        • Alipay+
    • Subscription
      • Get started with Subscription
    • Online payment
      • Get started with online payments
    • Checkout session
      • Checkout Session Guide
    • Payment Capabilities
      • Currency Amount Unit Specification
      • Adaptive Price
  • Developer
    • Introduction
    • Authentication
    • Integrate Local Payment Methods
    • Error code
      • last_payment_error documentation
      • Errors
    • Best Integration
      • Quickly create a paymentIntent for a subscription
      • Auto-Charge Subscription Guide
    • Payment Intents
      • Payment Intent Overview
      • Quickly create a paymentIntent
      • Create a PaymentIntent
      • Retrieve a PaymentIntent
      • Update a PaymentIntent
      • Confirm a PaymentIntent
      • Cancel a PaymentIntent
      • Capture a PaymentIntent
      • List all payment intents
    • Customers
      • Create a customer
      • Retrieves a customer
      • Update a customer
      • List all customers
    • Subscriptions
      • Create a subscription
      • Retrieves a subscription
      • Update a subscription
      • List all subscriptions
      • Cancel a subscription
    • Invoices
      • Create a invoice
      • Retrieves a invoice
      • List all invoices
      • Pay a invoice
    • ApplePay Payment Session
      • Retieve ApplePay Payment Session
    • Mandates
      • Create a mandate
      • Retrieves a mandate
      • List all mandates
    • Refunds
      • Create a refund
      • Retrieves a refund
      • List all refunds
    • Webhooks
      • Webhook Integration Guide(version 2026-04)
      • Integration details
        • Supported Webhook Events
        • Webhook Activation/Signature Verification Steps
        • Webhook events for example
        • Dispute Webhook Integration Document
        • Difference between version 2026-04 and 2024-10-10
      • archive
        • 2024-10-10
          • Webhook Integration Guide(version 2024-10-10)
      • Create a webhook
      • Retrieves a webhook
      • Update a webhook
      • List all webhooks
    • Embedded Checkout
      • UseePay Elements Appearance
      • Payment Element
      • Payment Element (Deferred Intent)
      • Express Checkout Element
      • Checkout Session Element
    • Payment Method Configuration
      • Retieve Payment Method Configuration
    • Checkout Session
      • Create Checkout Session
      • Retrieve Checkout Session
    • Trackers
      • upload trackers
      • Retrieve a tracker
    • Capture
      • Capture Overview
      • List captures by intent id
    • Payement Attempt
      • ECI Indicator (3-D Secure) Reference
      • Retrieve PaymentAttempt
    • Schemas
      • CheckoutSessionCreateRequest
      • PaymentMethod
      • CreatePaymentIntentRequest
      • LineItem
      • Customer
      • Address
      • ProductData
      • Shipping
      • SubscriptionData
      • Error
      • DiscountPeriodConfig
      • DeviceData
      • CheckoutSessionResponse
      • ErrorResponse
      • Order
      • Product
      • PaymentMethodOptions
      • RiskControlOptions
      • Mandate
      • PaymentIntent
      • Billing
      • Card
      • AliPay
      • Wallet
      • Klarna
      • WechatPay
      • Refund
      • Subscription
      • Recurring
      • PriceData
      • SubscriptionItem
      • Invoice
      • NextAction
      • Webhook
      • CollectableOptions
      • PaymentLink
      • last_payment_error
      • discount_period_config
      • Capture
      • three_ds
      • PaymentAttempt
      • konbini
      • client_pm_options
      • pse
      • trial_period_config
      • Seller
      • RabbitLinePay
  • Message
    • Messaging Element
  • About Testing
    • Test Cards
    • ApplePay&GooglePay
    • Test Cases
  • Reconciliation
    • SFTP Access for Reconciliation
  • FAQ
    • Unable to receive Webhook notifications
    • FAQ
    • Introduction
  1. Supported Payment Methods

WeChat Pay

Type: Digital Wallet / QR Code and Redirect Payment Method
Payment Flow:
1.
Customer selects WeChat Pay at checkout.
2.
The merchant initiates the payment with the appropriate client environment:
Desktop web: Open the hosted QR-code payment page. The customer scans the QR code with WeChat and authorizes the payment.
Mobile web: Redirect the customer to the hosted payment page to continue the WeChat Pay H5 flow.
WeChat Mini Program: Supply the Mini Program AppID and customer OpenID, then follow the returned next action to continue authorization.
3.
The merchant obtains the final payment result through the standard payment notification or PaymentIntent retrieval flow.
Refunds: Confirm the supported refund types and refund window with UseePay for your enabled WeChat Pay channel.
Notes:
Use wechat_pay as the payment method type in all three environments.
Always provide payment_method_options.wechat_pay and explicitly set client.
For Mini Program payments, sub_appid and sub_openid are required.
Separate authorization and manual capture are not supported.
The hosted payment session expires after 2 hours by default. Session expiry does not automatically close the payment order.
Confirm supported countries, currencies, amount limits, and recurring-payment availability with UseePay before going live.
CapabilitySupport
Transaction flow covered by this guideOne-time Payment
Integration covered by this guideServer to Server
Client environmentsDesktop web, mobile web, WeChat Mini Program
Supported countries and currenciesConfirm for your enabled merchant channel

When to use WeChat Pay#

Use WeChat Pay when the customer intends to authorize payment with WeChat. Choose the client environment that matches where the customer is paying.
WeChat Pay is a good choice when:
Desktop customers want to scan a QR code with WeChat.
Mobile web customers want to continue to WeChat Pay through an H5 payment flow.
The merchant integrates a WeChat Mini Program and can provide the customer's OpenID for that Mini Program.

Client environments#

Use payment_method_options.wechat_pay.client to select the payment flow.
ClientCustomer environmentPayment flowRequired additional fieldsReturned next action
WEBDesktop browserNative QR-code paymentNonewechat_pay_display_qr_code
WAPMobile browserH5 paymentNoneredirect
MINI_APPWeChat Mini ProgramJSAPI paymentsub_appid, sub_openidredirect
Client values are case-insensitive. The examples use uppercase values consistently. Always send one of the values above; do not rely on an omitted or unrecognized client value.
The public payment method type remains wechat_pay. Do not use wechat_native, wechat_h5, or wechat_jsapi as payment_method_data.type.

Integration Guide#

Checkout example — desktop web#

image.png
Set payment_method_data.type to wechat_pay and payment_method_options.wechat_pay.client to WEB.
The following Java example shows the WeChat-specific part of a PaymentIntent creation request. Add the standard required order, amount, currency, and other fields for your integration.
Equivalent JSON fields:
{
  "payment_method_data": {
    "type": "wechat_pay"
  },
  "payment_method_options": {
    "wechat_pay": {
      "client": "WEB"
    }
  }
}
Create and confirm the PaymentIntent using the standard integration flow. Handle next_action when the payment requires customer action.

Response example — client=WEB#

Use next_action.wechat_pay_display_qr_code.url to open the hosted QR-code payment page.
This URL is an HTML payment page, not a QR-code image or the raw WeChat QR-code payload. Do not use it as an image source or encode the page URL into your own payment QR code.
The following response is abbreviated. IDs and session values are illustrative; always use the URL returned by the API.
{
  "id": "1012609011050163683",
  "status": "requires_customer_action",
  "next_action": {
    "type": "wechat_pay_display_qr_code",
    "wechat_pay_display_qr_code": {
      "method": "GET",
      "url": "https://checkout.useepay.com/v4/pm-redirects/payment-details?session=pmr_0123456789abcdef0123456789abcdef"
    }
  }
}
The customer scans the QR code displayed on that page with WeChat and authorizes the payment.

Checkout example — mobile web#

Use WAP for mobile web payments. The following fragment replaces the WeChat options in the creation request:
{
  "payment_method_options": {
    "wechat_pay": {
      "client": "WAP"
    }
  }
}

Response example — client=WAP#

Use next_action.redirect.url to redirect the customer to the hosted payment page, which continues the WeChat Pay H5 flow.
{
  "id": "1012609011052163685",
  "status": "requires_customer_action",
  "next_action": {
    "type": "redirect",
    "redirect": {
      "method": "GET",
      "url": "https://checkout.useepay.com/v4/pm-redirects/payment-details?session=pmr_123456789abcdef0123456789abcdef0"
    }
  }
}
Follow the returned URL as provided. This response does not expose an app_url for the merchant to construct a separate app-launch flow.

Checkout example — WeChat Mini Program#

Use MINI_APP and provide both:
sub_appid: The AppID of the WeChat Mini Program used for the payment.
sub_openid: The customer's OpenID associated with that AppID.
The following fragment replaces the WeChat options in the creation request:
{
  "payment_method_options": {
    "wechat_pay": {
      "client": "MINI_APP",
      "sub_appid": "wx_example_appid",
      "sub_openid": "example_customer_openid"
    }
  }
}
Obtain these values through your WeChat integration before initiating the payment. Both fields must be nonblank.

Response example — client=MINI_APP#

The current API returns a hosted-page redirect next action for this flow.
{
  "id": "1012609011053163686",
  "status": "requires_customer_action",
  "next_action": {
    "type": "redirect",
    "redirect": {
      "method": "GET",
      "url": "https://checkout.useepay.com/v4/pm-redirects/payment-details?session=pmr_23456789abcdef0123456789abcdef01"
    }
  }
}
Continue through the returned hosted payment URL using the navigation supported by your integration. This response is not a direct set of parameters for wx.requestPayment; do not pass the redirect object to that API. Validate hosted-page navigation and authorization in your Mini Program environment before launch.

Payment options#

FieldRequiredDescription
payment_method_data.typeYesSet to wechat_pay.
payment_method_options.wechat_payYesWeChat Pay options object. The JSON key is wechat_pay, not wechatpay.
payment_method_options.wechat_pay.clientAlways provideWEB, WAP, or MINI_APP.
payment_method_options.wechat_pay.sub_appidFor MINI_APPWeChat Mini Program AppID.
payment_method_options.wechat_pay.sub_openidFor MINI_APPCustomer OpenID associated with the AppID.

Payment session expiry#

The hosted payment session has a default lifetime of 2 hours. This is the lifetime of the intermediate-page session, not a guaranteed payment authorization deadline or automatic order-cancellation time.
Omit the optional timeout override for the standard flow. If the page expires, retrieve the current payment status before deciding how to continue.

Completing the payment#

A requires_customer_action response means that the customer still needs to authorize the payment. Opening the hosted page or returning to the merchant application does not by itself establish payment success.
Use your standard payment notifications or authenticated PaymentIntent retrieval to determine the final result before fulfilling the order. When using checkout, payment_pages, or elements retrieval, supply the associated client_secret as required by that endpoint. Treat it as a credential and never log its value.
Other procedures follow the standard PaymentIntent integration.
Previous
Yape
Next
Apple Pay
Built with