Actions33
- Mini Program Actions
- Official Account Actions
- WeChat Pay Actions
- WeChat Work Actions
Overview
The WeChat Enhanced node provides comprehensive integration with various WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, the WeChat Pay Refund operation allows users to process refunds for payments made through WeChat Pay.
This operation is useful in scenarios where a merchant needs to refund a customer for a transaction processed via WeChat Pay. For example, if a customer returns a product or cancels a service, the merchant can initiate a refund directly from an n8n workflow using this node.
Practical examples:
- Automatically refunding orders when a return request is approved.
- Processing partial or full refunds based on business logic within an automated workflow.
- Integrating refund processing into customer support systems to streamline financial operations.
Properties
| Name | Meaning |
|---|---|
| Refund Data | JSON object containing the refund details required by WeChat Pay API. This includes all necessary fields such as transaction identifiers, refund amount, reason, etc., formatted according to WeChat Pay's refund API specification. |
Output
The node outputs a JSON object representing the response from the WeChat Pay refund API call. This typically includes information about the refund status, refund ID, and any relevant metadata returned by the WeChat Pay service.
If the refund is successful, the output JSON will contain confirmation details. In case of failure, error information will be included in the output.
The node does not output binary data for this operation.
Dependencies
- Requires an active subscription and valid API key credential for the external "N8N Tools API" service, which acts as a proxy/validation layer for WeChat API calls.
- Requires credentials for WeChat API access configured in n8n (such as API keys or OAuth tokens) to authenticate requests to WeChat Pay.
- The node internally uses a helper class (
WeChatApi) that wraps WeChat API 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 validation service is correct and active.
- Malformed refund data: Ensure the JSON provided in the "Refund Data" property strictly follows the WeChat Pay refund API format. Invalid or incomplete JSON will cause the API call to fail.
- Network or permission issues: Check network connectivity and that the WeChat credentials have sufficient permissions to perform refund operations.
- Error messages from WeChat Pay: These will be passed through in the output JSON. Common reasons include invalid transaction IDs, refund amounts exceeding original payment, or duplicate refund requests. Review the error message details to adjust input parameters accordingly.
Links and References
- WeChat Pay Refund API Documentation
- n8n Documentation - Creating Custom Nodes
- WeChat Official Developer Documentation
This summary focuses exclusively on the "WeChat Pay" resource and the "Refund" operation as requested.