Actions13
Overview
This node integrates with the Polar.sh API to manage customers, products, and checkout sessions. Specifically for the Customer - Delete operation, it allows users to delete a customer by their unique Customer ID. This is useful in scenarios where you need to remove customer records from your system, such as when a customer requests account deletion or when cleaning up test data.
Practical example:
- Automatically deleting a customer after a refund process is completed.
- Removing inactive or duplicate customer entries from your database.
Properties
| Name | Meaning |
|---|---|
| Customer ID | The unique identifier of the customer to delete |
Output
The output JSON contains a confirmation object indicating the success of the deletion and echoes back the deleted customer's ID. The structure is:
{
"success": true,
"deleted_customer_id": "string"
}
No binary data is output by this operation.
Dependencies
- Requires an API key credential for authenticating with the Polar.sh API.
- The node uses the Polar.sh base URL which switches between sandbox and production environments based on the credential environment setting.
- No additional external dependencies are required beyond the Polar.sh API access.
Troubleshooting
Common issues:
- Invalid or missing Customer ID will cause the API to return an error.
- Network or authentication failures if the API key is incorrect or missing.
- Attempting to delete a non-existent customer will likely result in an error response from the API.
Error messages:
- Errors returned from the Polar.sh API will be caught and can include messages like "Customer not found" or "Unauthorized".
- If
continueOnFailis enabled, errors will be returned in the output JSON under anerrorfield with optionaldetails.
Resolutions:
- Verify that the Customer ID is correct and exists in the Polar.sh system.
- Ensure the API key credential is valid and has appropriate permissions.
- Check network connectivity and endpoint URLs (sandbox vs production).
Links and References
- Polar.sh API Documentation (for detailed API endpoints and request/response formats)
- n8n documentation on creating custom nodes