WeChat website screenshot

WeChat

WeChat (Weixin) is Tencent's flagship super-app, combining messaging, social, payments, mini-apps, official-account publishing, video, enterprise collaboration, and cloud hosting under a single identity. Its developer surface spans the WeChat Open Platform (third-party app login and authorization), Mini Programs (client and server APIs), Mini Games, Official Accounts and Service Accounts, WeChat Pay (APIv3 for mainland China and Global v3 for cross-border merchants), WeChat Work / WeCom (Enterprise WeChat), WeChat Channels (Video Accounts), WeChat Shop, and WeChat Cloud Hosting — addressing over a billion monthly active users primarily in China and across the WeChat international footprint.

13 APIs 17 Features
MessagingSocialPaymentsMini ProgramsMini GamesOfficial AccountsEnterprise CommunicationCloud HostingVideoIdentityChinaSuper AppTencent

APIs

WeChat Mini Programs Server API

Backend HTTPS/JSON APIs that Mini Program operators call from their own servers to authenticate user sessions (code2Session), mint access tokens, send customer service and templ...

WeChat Mini Programs Client API

Client-side JavaScript API exposed inside the WeChat runtime to Mini Programs and Mini Games. Covers network (wx.request, wx.downloadFile, wx.uploadFile), storage, UI / navigati...

WeChat Pay APIv3 (Direct-Connect Merchant)

WeChat Pay's third-generation REST API for mainland-China direct-connect merchants. Authenticates with merchant API certificates and platform-key signed requests over HTTPS/JSON...

WeChat Pay APIv3 (Service Provider / Partner)

WeChat Pay's APIv3 in "service provider" mode, used by payment platforms and ISVs to onboard and operate sub-merchants. Adds combined-order JSAPI/Native/App payments, sub-mercha...

WeChat Pay Global v3 API

Cross-border WeChat Pay surface for international institutions and merchants accepting payments from WeChat users outside mainland China. Provides a "universal version for globa...

WeChat Open Platform — Mobile App Login (OAuth 2.0)

OAuth 2.0 authorization flow exposed by the WeChat Open Platform for native iOS, Android, and HarmonyOS apps. Apps redirect into WeChat to obtain an authorization code, then exc...

WeChat Open Platform — Website Login (QR OAuth)

Web-based OAuth 2.0 login that renders a WeChat QR code on third-party websites. End users scan the code in WeChat to authenticate; the website receives a code on its callback U...

WeChat Open Platform — Third-Party Platform API

API surface that lets authorized ISVs operate Official Accounts and Mini Programs on behalf of merchant clients ("代商家调用接口"). Covers merchant authorization onboarding, developing...

WeChat Official Accounts API

HTTPS/JSON APIs for WeChat Official Accounts (Subscription Accounts and Service Accounts) — the publishing surface used by media, brands, and businesses to reach WeChat follower...

WeChat Work (WeCom) API

Server API for Enterprise WeChat / WeCom — Tencent's enterprise collaboration suite. All calls are HTTPS/JSON, UTF-8 encoded, and require an access token. Covers Contacts manage...

WeChat Cloud Hosting API

WeChat Cloud Hosting (微信云托管) is Tencent's cloud-native, ops-free container deployment service tightly integrated into the WeChat ecosystem. Documented as "a cloud-native, operat...

WeChat Channels (Video Accounts) Developer Surface

WeChat Channels (视频号) is WeChat's short-video and livestreaming product. The developer surface — exposed through the Mini Programs platform and Channels merchant tools — covers ...

WeChat Shop (微信小店) API

WeChat Shop (微信小店) is WeChat's unified merchant storefront tying together Mini Programs, Channels livestreaming, Official Accounts, and WeChat Search. APIs cover product (SPU/SK...

Collections

Features

WeChat Mini Programs framework (WXML / WXSS / JS) with native-app-grade APIs
WeChat Mini Programs Server API on api.weixin.qq.com — code2Session, access tokens, subscribe / template / customer-service messages, content moderation, analytics, QR codes
WeChat Pay APIv3 for direct-connect merchants — JSAPI / Native / App / H5 / Mini Program payments, refunds, transfers, profit sharing, Pay Score
WeChat Pay APIv3 Service Provider mode for sub-merchant onboarding, combined orders, and partner-side profit sharing
WeChat Pay Global v3 API for cross-border / international institutions and merchants
WeChat Open Platform OAuth 2.0 login for native mobile (iOS, Android, HarmonyOS) — access tokens expire in 7200s, refresh tokens last 180 days
WeChat Open Platform QR Login for third-party websites
WeChat Open Platform Third-Party Platform API for ISVs operating Official Accounts and Mini Programs on behalf of merchants
WeChat Official Accounts API — user info, template messages, materials, custom menus, QR with scene, JS-SDK
WeChat Work / WeCom API on qyapi.weixin.qq.com — contacts, messaging, external contacts, OA, conversation archive, enterprise payments
WeChat Cloud Hosting — containerized backend (Node.js / Go / Python / Java) with built-in WeChat API access, serverless MySQL, COS, CDN, gray deploys, logs
WeChat Channels developer surface — livestream rooms, livestream commerce, Mini Program integration
WeChat Shop API — SPU/SKU, orders, logistics, after-sales for the unified WeChat commerce graph
Official Java / Go / PHP SDKs for WeChat Pay APIv3 under github.com/wechatpay-apiv3
Postman script and CertificateDownloader CLI for WeChat Pay APIv3 onboarding
74 repos under github.com/wechat-miniprogram including miniprogram-demo (7.2k stars), weui-miniprogram (2.4k), api-typings (798), threejs-miniprogram (781), glass-easel component framework
WeUI design library (github.com/Tencent/weui, 27.4k stars) — official UI components for WeChat web pages

Event Specifications

WeChat Webhooks (Official Accounts, WeChat Pay APIv3, WeCom)

AsyncAPI description of the publicly documented WeChat (Weixin) webhook surfaces. WeChat does not expose a public WebSocket / streaming endpoint for third-party developers — its...

ASYNCAPI

Resources

🔗
Website
Website
🌐
Portal
Portal
🌐
DeveloperPortal
DeveloperPortal
🔗
Documentation
Documentation
🔗
APIReference
APIReference
🚀
GettingStarted
GettingStarted
💬
Support
Support
🔗
Hub
Hub
🌐
Console
Console
🌐
Portal
Portal
🔗
Login
Login
🌐
Portal
Portal
🌐
DeveloperPortal
DeveloperPortal
🌐
Portal
Portal
🌐
Portal
Portal
🌐
Portal
Portal
🌐
Portal
Portal
👥
GitHubOrganization
GitHubOrganization
👥
GitHubOrganization
GitHubOrganization
💻
CodeExamples
CodeExamples
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
💻
CodeExamples
CodeExamples
🔗
CLI
CLI
💬
IDESupport
IDESupport
📜
TermsOfService
TermsOfService
📜
PrivacyPolicy
PrivacyPolicy
💬
Support
Support
💬
Support
Support

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: WeChat Mini Program Server API (subset)
  version: 1.0.0
items:
- info:
    name: Access Token
    type: folder
  items:
  - info:
      name: auth.getAccessToken
      type: http
    http:
      method: GET
      url: https://api.weixin.qq.com/cgi-bin/token
      params:
      - name: grant_type
        value: ''
        type: query
        description: Must be set to `client_credential`.
      - name: appid
        value: ''
        type: query
        description: Mini Program AppID from the WeChat Official Accounts Platform.
      - name: secret
        value: ''
        type: query
        description: Mini Program AppSecret.
    docs: 'Obtain the global application `access_token` for a Mini Program.

      Returned tokens are valid for 7200 seconds and must be cached and

      re-used across the application; concurrent calls will overwrite each

      other.

      '
- info:
    name: Login
    type: folder
  items:
  - info:
      name: auth.code2Session
      type: http
    http:
      method: GET
      url: https://api.weixin.qq.com/sns/jscode2session
      params:
      - name: appid
        value: ''
        type: query
        description: Mini Program AppID.
      - name: secret
        value: ''
        type: query
        description: Mini Program AppSecret.
      - name: js_code
        value: ''
        type: query
        description: Temporary login credential `code` from `wx.login()`.
      - name: grant_type
        value: ''
        type: query
        description: Must be `authorization_code`.
    docs: 'Exchange a temporary login `code` returned by `wx.login()` in the Mini

      Program client for a stable `openid` and `session_key`. The

      `session_key` is used to decrypt encrypted user data delivered by other

      Mini Program APIs.

      '
- info:
    name: User Information
    type: folder
  items:
  - info:
      name: auth.getPaidUnionId
      type: http
    http:
      method: GET
      url: https://api.weixin.qq.com/wxa/getpaidunionid
      params:
      - name: access_token
        value: ''
        type: query
        description: Application access token from `auth.getAccessToken`.
      - name: openid
        value: ''
        type: query
        description: The user's openid in the Mini Program.
      - name: transaction_id
        value: ''
        type: query
        description: WeChat Pay transaction id (optional if `mch_id` + `out_trade_no` are supplied).
      - name: mch_id
        value: ''
        type: query
        description: WeChat Pay merchant id (used with `out_trade_no`).
      - name: out_trade_no
        value: ''
        type: query
        description: Merchant-side order number (used with `mch_id`).
    docs: 'Retrieve a user''s UnionID after they have completed a WeChat Pay

      transaction in the Mini Program. Requires either `openid` plus

      `transaction_id`, or `openid` plus `mch_id` and `out_trade_no`.

      '
bundled: true