Skip to main content

WeChat Pay

Through the WeChat Pay node, you can call WeChat Pay related API interfaces, helping you easily integrate WeChat Pay capabilities into your business processes.

Configuration Item Description

Account Credentials

When calling the WeChat Pay API, necessary account credentials are required. For account credentials of WeChat Pay, you can refer to the Account Credentials - WeChat Pay section.

Methods

The WeChat Pay node has integrated the following WeChat Pay APIs. Click the API name links to view the complete API documentation on WeChat Pay:

NameDescriptionRemarks
JSAPI Place OrderThis interface submits WeChat Pay JSAPI payment orders.The merchant system first calls this interface to generate a prepayment transaction order in the WeChat Pay backend. After returning the correct prepayment session ID, it generates transaction strings to initiate payments for different scenarios such as Native, JSAPI, and APP.
Query Order - Query by WeChat Pay Transaction IDThis interface is used to query order status.Merchants can proactively query order status via this interface to proceed with the next business logic. Note: Orders can be queried by either WeChat Pay transaction ID or merchant order ID, and both methods return identical results.
Query Order - Query by Merchant Order IDThis interface is used to query order status.Merchants can proactively query order status via this interface to proceed with the next business logic. Note: Orders can be queried by either WeChat Pay transaction ID or merchant order ID, and both methods return identical results.
Close OrderThis interface is used to close pending payment orders.The following scenarios require calling the close order interface: 1. When a merchant order payment fails and a new order ID needs to be generated to re-initiate payment, close the original order to avoid duplicate payments. 2. After the system places an order, if the user payment times out and the system exits without further processing, call the close order interface to prevent the user from continuing.
Apply for RefundMerchants can use this interface to refund the payment amount to the buyer.Within one year after a transaction occurs, when a refund is required due to reasons from either the buyer or seller, the merchant can use this interface to refund the payment. WeChat Pay will process the refund by returning the payment to the buyer's account via the original payment method after receiving and successfully verifying the refund request.
Query RefundAfter submitting a refund request, call this API to query the refund status.After submitting a refund request, call this API to query the refund status. Refunds may experience delays. It is recommended to initiate a refund status query 1 minute after submitting the refund request. Generally, refunds for balance payments will arrive within 5 minutes, while refunds for bank card payments will arrive within 1-3 business days.
Apply for Transaction BillMerchants can obtain the download URL of transaction bill files via this interface.WeChat Pay provides transaction bill files on a daily basis. Merchants can obtain the download URL of bill files through this interface. The files contain transaction-related information such as amounts, timestamps, and marketing details, assisting merchants in reconciling orders, refunds, bank deposits, etc.
Apply for Fund BillMerchants can obtain the download URL of fund bill files via this interface.WeChat Pay provides fund flow bill files for WeChat Pay accounts on a daily basis. Merchants can obtain the download URL of bill files through this interface. The files contain information related to fund operations of the account, such as business order numbers, income/expense amounts, and booking times, to assist merchants in reconciliation.

Method Input Parameters

Request parameters for WeChat Pay APIs. Detailed descriptions for each method's parameters can be obtained via the links in the [Methods] section.

caution

For the [JSAPI Place Order] and [Apply for Refund] interfaces, the appid and mchid parameters in the original WeChat Pay API are already included in the [account credentials] and do not need to be passed repeatedly. Additionally, the notify_url is specified through the [notification callback configuration] option, so it also does not require passing.

Notification Callback Configuration

When calling the [JSAPI Place Order] and [Apply for Refund] methods, it is necessary to specify the notification callback configuration. After a user completes a payment or a merchant completes a refund, WeChat will send the result notification via the specified receiving method.

The receiving methods include:

  • Workflow: Use a workflow to receive WeChat Pay notification callbacks. The specified workflow must include the When receiving a WeChat Pay event notification trigger.
  • HTTP: Use a regular HTTP interface to receive notification callbacks.