Actions13
Overview
This node integrates with the Polar.sh API to manage customers, products, and checkout sessions. Specifically, for the Customer - Create operation, it allows you to create a new customer record in the Polar system by providing essential details such as email and optional additional information like billing address, metadata, and tax ID.
Common scenarios where this node is beneficial include:
- Automating customer creation when a new user signs up on your platform.
- Syncing customer data from other systems into Polar for unified billing or subscription management.
- Enriching customer profiles with metadata for segmentation or analytics.
Example: When a new user registers on your website, use this node to automatically create their customer profile in Polar with their email and billing address, enabling seamless payment processing later.
Properties
| Name | Meaning |
|---|---|
| The customer's email address. This is required and uniquely identifies the customer. | |
| Additional Fields | Optional extra information about the customer, including: β’ Billing Address: Street address details (country code, state, city, line 1 & 2, postal code). Country code must be two letters (e.g., "US", "CA"). β’ External ID: Your internal customer ID for reconciliation. β’ Metadata: Key-value pairs (max 40 chars key, max 500 chars value) for storing custom data. β’ Name: Customer's full name. β’ Tax ID: Tax identification number. |
Output
The output JSON contains the newly created customer object as returned by the Polar API. This typically includes fields such as the customer ID, email, billing address, metadata, and any other properties set during creation.
If multiple items are processed, the output will be an array of such customer objects.
No binary data is produced by this node.
Dependencies
- Requires an active connection to the Polar.sh API via an API key credential configured in n8n.
- The node dynamically selects the API base URL depending on whether the environment is set to "sandbox" or production.
- No other external dependencies are needed.
Troubleshooting
- Missing Required Fields: If the "Email" property is not provided, the API will reject the request. Ensure all required fields are filled.
- Invalid Billing Address Country Code: The country code must be a valid two-letter ISO code; otherwise, the API may return an error.
- API Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
- Metadata Limits: Keys longer than 40 characters or values longer than 500 characters may cause errors.
- Network Issues: Connectivity problems can cause request failures; check network access to the Polar API endpoints.
Error messages from the API are passed through and included in the output if "Continue On Fail" is enabled, helping diagnose issues.
Links and References
- Polar.sh API Documentation (for detailed API usage and field definitions)
- ISO Country Codes (for valid country codes in billing address)