API Doc
Version
Version
  • v1
  • v2
Languages
Languages
  • English
  • 简体中文
Version
Version
  • v1
  • v2
Languages
Languages
  • English
  • 简体中文
  1. 5.2 Payment - dynamic order
  • Unified API Request Param
  • Unified Async Notification Param
  • Open API Common Code List
  • 1. Account
    • Country Code
    • 1.1 Balance Inquiry
      POST
    • 1.2 Report Download
      POST
  • 2. Philippines
    • 2.1 Payout
      • Payout Channel List
      • 2.1.1 Create Payout
      • 2.1.2 Check Payment Status
      • 2.1.3 Payout Notification
    • 2.2 Payment - dynamic order
      • Philippines Payment Channel List
      • 2.2.1 Create Payment
      • 2.2.2 Check Payment Status
      • 2.2.3 Payment Notification
    • 2.3 Payment - static order
      • Philippines Payment Channel List
      • 2.3.1 Create Payment
      • 2.3.2 Payment Code Detail
      • 2.3.3 Query Static Payment List
      • 2.3.4 Payment Notification
      • 2.3.5 PaymentCode Cancel
  • 3. Indonesia
    • 3.1 Payout
      • Disburse Channel List
      • 3.1.1 Create Payout
      • 3.1.2 Check Payout Status
      • 3.1.3 Payout Notification
    • 3.2 Payment - dynamic order
      • Indonesia Payment Channel List
      • 3.2.1 Create Payment
      • 3.2.2 Check Payment Status
      • 3.2.3 Payment Notification
    • 3.3 Payment - static order
      • Channel List
      • 3.3.1 Create Payment
      • 3.3.2 Payment Code Detail
      • 3.3.3 Query Static Payment List
      • 3.3.4 Payment Notification
  • 4. Malaysia
    • 4.1 Payout
      • Payout Channel List
      • 4.1.1 Create Payout
      • 4.1.2 Check Payout Status
      • 4.1.3 Payout Notification
    • 4.2 Payment
      • Malaysia Payment Channel List
      • 4.2.1 Create Payment
      • 4.2.2 Check Payment Status
      • 4.2.3 Payment Notification
  • 5. Thailand
    • 5.1 Payout
      • Payout Channel List
      • 5.1.1 Create Payout
      • 5.1.2 Check Payout Status
      • 5.1.3 Payout Notification
    • 5.2 Payment - dynamic order
      • Thailand Payment Channel List
      • Wechat Webpage Authorization Reference
      • Wechat Calls Payment Reference
      • 5.2.1 Create Payment
        POST
      • 5.2.2 Check Payment Status
        POST
      • 5.2.3 Payment Notification
        POST
    • 5.3 Payment - static order
      • Channel List
      • 5.3.1 Create Payment
      • 5.3.2 Payment Code Detail
      • 5.3.3 Query Static Payment List
      • 5.3.4 Payment Notification
  • 6. Russia
    • 6.1 Payment
      • Russia Payment Channel List
      • 6.1.1 Create Payment
      • 6.1.2 Check Payment Status
      • 6.1.3 Payment Notification
  • 7. Refund
    • Refund Support Channel List
    • Refund Status Enum
    • 7.1 Refund
    • 7.2 Get Refund Payments
    • 7.3 Refund Notification
  1. 5.2 Payment - dynamic order

Wechat Calls Payment Reference

only for Mini Program Payment and App Payment

Wechat Mini Program Payment#

The merchant first calls the Create Payment to generate a prepayment order,
and obtain the metadata.wechatpay before transferring it to the app to initiate payment.
Then the merchant calls wx.requestPayment(OBJECT) in the Mini Program to start WeChat Pay. Wechat Official Doc
with Promise style call: Supported
Mini Program plugin: Not supported
Wechat Windows version: Supported
Wechat Mac version: Supported

Request Parameters#

parameter namerequiredtype of datadescription
timeStampYesstringtimestamp, get it from metadata.wechatpay.timeStamp returned by Create Payment
nonceStrYesstringrandom string, get it from metadata.wechatpay.nonceStr returned by Create Payment
packageYesstringextension order details, get it from metadata.wechatpay.pkg returned by Create Payment
signTypeYesstringSignature Method, get it from metadata.wechatpay.signType returned by Create Payment
paySignYesstringSignature, get it from metadata.wechatpay.paySign returned by Create Payment
successNofunctionCallback function for successful interface call
failNofunctionCallback function for interface call failure
completeNofunctionThe callback function for the end of the interface call (will be executed if the call succeeds or fails)

CallBack Result#

Callback TypeerrMsgdescription
successrequestPayment:okCalling payment successful
failrequestPayment:fail cancelUser cancels payment
failrequestPayment:fail (detail message)Failed to call payment. The detail message is the specific failure reason returned by the backend

Request example#

Previous
Wechat Webpage Authorization Reference
Next
5.2.1 Create Payment
Built with