Actions33
- Mini Program Actions
- Official Account Actions
- WeChat Pay Actions
- WeChat Work Actions
Overview
The "Close Order" operation of the WeChat Pay resource in this node allows users to close an existing payment order by specifying the merchant's order number. This is useful when a payment order needs to be canceled or invalidated before it is completed, for example, if the customer cancels the purchase or if the order was created by mistake.
Practical scenarios include:
- Automatically closing unpaid orders after a certain timeout.
- Manually canceling orders that are no longer valid.
- Managing order lifecycle within an e-commerce or payment processing workflow.
Properties
| Name | Meaning |
|---|---|
| Out Trade No | Merchant order number (string) |
This property identifies the specific order to be closed by its unique merchant order number.
Output
The output JSON contains the response from the WeChat Pay API regarding the close order request. It typically includes status information about whether the order was successfully closed or if there were any errors.
No binary data is output by this operation.
Dependencies
- Requires an active subscription and a valid API key credential for the external N8N Tools API service.
- The node uses the N8N Tools API as a proxy/validation layer before calling the actual WeChat Pay API.
- Proper credentials for WeChat Pay must be configured in n8n to authenticate requests.
- Network access to the N8N Tools API endpoint and WeChat Pay services is required.
Troubleshooting
- Invalid subscription or API key error: If you receive an error indicating invalid subscription or API key, verify that your API key credential is correct and active.
- Unsupported operation error: Ensure that the operation selected is supported by the node; "closeOrder" is supported under the WeChat Pay resource.
- Missing or incorrect Out Trade No: The merchant order number must be provided and valid; otherwise, the API call will fail.
- Network or permission issues: Confirm that the node has network access and the necessary permissions to call external APIs.
Links and References
- WeChat Pay Official Documentation
- N8N Documentation on Custom Nodes
- N8N Tools API Service (for subscription and API key management)