Actions13
Overview
This node integrates with the Polar.sh API to manage customer data, among other resources like products and checkouts. Specifically, the "Customer" resource with the "Get" operation retrieves detailed information about a single customer by their unique ID. This is useful in scenarios where you need to fetch customer details for further processing, reporting, or integration with other systems.
For example, you might use this node to:
- Retrieve a customer's profile before updating their subscription status.
- Fetch customer details to personalize communications or marketing campaigns.
- Integrate customer data into a CRM or analytics platform.
Properties
| Name | Meaning |
|---|---|
| Customer ID | The unique identifier of the customer to retrieve. This is a required string input. |
Output
The node outputs JSON data representing the customer object as returned by the Polar.sh API. This typically includes fields such as the customer's email, billing address, metadata, and other relevant customer attributes.
If multiple customers were retrieved (not applicable for the "Get" operation), the output would be an array of such objects. For the "Get" operation, the output is a single JSON object wrapped inside an array with one item.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "customer_123",
"email": "user@example.com",
"billing_address": {
"address": "123 Main St",
"city": "Anytown",
"country": "US"
},
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Dependencies
- Requires an API key credential for authenticating with the Polar.sh API.
- The node uses the base URL depending on the environment selected in credentials (sandbox or production).
- No additional external dependencies are needed beyond the configured API authentication.
Troubleshooting
Common issues:
- Invalid or missing Customer ID will cause the API request to fail.
- Network or authentication errors if the API key is incorrect or missing.
- Rate limiting or API quota exceeded errors from Polar.sh.
Error messages:
- Errors thrown by the node include the message from the Polar.sh API response.
- If the node is set to continue on failure, error details are included in the output JSON under
erroranddetails.
Resolutions:
- Ensure the Customer ID is correct and exists in your Polar.sh account.
- Verify that the API key credential is properly configured and has necessary permissions.
- Check network connectivity and API endpoint availability.
- Handle rate limits by adding retry logic or reducing request frequency.
Links and References
- Polar.sh API Documentation (for detailed API endpoints and data structures)
- n8n documentation on creating custom nodes