API Doc
Languages
Languages
  • English
  • 简体中文
Languages
Languages
  • English
  • 简体中文
  1. 4. WebPay
  • Merchant Unified API Param
  • API Code Collection
  • Unified API Param
  • 1. Account
    • 1.1 Balance Inquiry
      POST
  • 2. Disburse
    • Payout Channel List
    • 2.1 Create Payout
      POST
    • 2.2 Check Payout Status
      POST
  • 3. QR Code
    • QR Code Channel Code List
    • 3.1 QR Code Create
      POST
    • 3.2 QR Code Detail
      POST
    • 3.3 QR Code Payment List
      POST
    • 3.4 QR Code Payment Notification
      POST
    • 3.5 QR Code Cancel
      POST
  • 4. WebPay
    • WebPay Channel Code List
    • Wechat Webpage Authorization Reference
    • Wechat Calls Payment Reference
    • 4.1 WebPay Create
      POST
    • 4.2 Retrieve WebPay Status
      POST
    • 4.3 WebPay Payment Notification
      POST
  • 5. Refund
    • Refund Support Channel List
    • Refund Status Enum
    • 5.1 Refund
      POST
    • 5.2 Get Refund Payments
      POST
    • 5.3 Refund Notification
      POST
  • 6. Void
    • Payment Void Channel List
    • 6.1 Payment Void
  • 7. Direct Debit
    • Direct Debit Channel List
    • 6.4 Authorization Notification
    • 6.3 Cancel Authorization
    • 6.1 Create Authorization Url
    • 6.2 Check Authorization Status
    • 6.5 Direct Debit Pay
    • 6.6 Direct Debit Pay Detail
    • 6.7 Direct Debit Notification
  1. 4. WebPay

Wechat Webpage Authorization Reference

Official Account Payment#

Configuring the Webpage Authorization Domain Name#

The WECHAT JSAPI Payment product capability needs to obtain the user's openid in the form of authorization auth2
on the webpage before initiating payment to verify whether the person placing the order and the final payer are the same person.
The domain name used for auth2 authorization needs to be configured on the merchant's wechat official account platform by selecting Settings > Account Info > Function Setting.
The following figure shows the configuration page:
jsapi_webpage_auth_domain_config.png
Attention:
Note that the authorization callback domain should be filled in with a domain name (which is a string) instead of a URL,
so do not add http:// or other protocol headers here.
For example, if a domain name requiring webpage authorization is www.qq.com, you can perform OAuth 2.0 authentication
on the sub-domain pages http://www.qq.com/music.html and http://www.qq.com/login.html after configuration,
but cannot do so on http://pay.qq.com, http://music.qq.com, and http://qq.com.

Getting Openid#

When the scope is snsapi_base, the authorization page does not pop up and you can only get the user's openid;
when the scope is snsapi_userinfo, the authorization page pops up and you can get the user's alias, gender, and location with openid.
Additionally, you can get user information even if they are not following the Official Account, as long as they have granted authorization.
Webpage Authorization Guide of Wechat Official Account

Mini Program Payment#

Binding Appid#

Please contact us to bind appid of mini program.

Getting Openid#

Webpage Authorization Guide of Wechat Mini Program
Previous
WebPay Channel Code List
Next
Wechat Calls Payment Reference
Built with