Actions33
- Mini Program Actions
- Official Account Actions
- WeChat Pay Actions
- WeChat Work Actions
Overview
The node provides enhanced integration with WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and others. Specifically, for the WeChat Pay - Query Order operation, it allows users to query the status of a payment order using either the WeChat Pay transaction ID or the merchant's order number.
This operation is beneficial in scenarios where you need to verify the payment status of an order processed through WeChat Pay, such as confirming successful payments before fulfilling orders, reconciling transactions, or troubleshooting payment issues.
Example use case:
After a customer completes a payment via WeChat Pay on your e-commerce platform, you can use this node operation to query the order status by providing the transaction ID or your internal order number to confirm if the payment was successful.
Properties
| Name | Meaning |
|---|---|
| Transaction ID | The unique transaction ID assigned by WeChat Pay to the payment. |
| Out Trade No | The merchant's internal order number used to identify the payment order. |
Output
The output is a JSON object containing the details of the queried order. This typically includes information such as:
- Order status (e.g., success, pending, failed)
- Payment amount
- Transaction timestamps
- Payment method details
- Any error or failure codes if applicable
The exact structure depends on the response from the WeChat Pay API but generally provides comprehensive data about the order's current state.
The node does not output binary data for this operation.
Dependencies
- Requires an active subscription and valid API key for the external "N8N Tools API" service, which acts as a proxy or validation layer for WeChat API calls.
- Requires credentials for accessing WeChat services (such as API keys or OAuth tokens) configured in n8n.
- The node internally uses a helper class (
WeChatApi) to interact with WeChat Pay endpoints.
Troubleshooting
Invalid subscription or API key error:
If you receive errors indicating invalid subscription or API key, verify that your API key credential for the external service is correct and active.Unsupported operation error:
Ensure that the selected resource is "WeChat Pay" and the operation is "Query Order". Other operations require different parameters.Missing required parameters:
At least one ofTransaction IDorOut Trade Noshould be provided to query the order. Providing neither will likely cause an error.API request failures:
Network issues or incorrect credentials for WeChat Pay may cause request failures. Check connectivity and credential validity.