Actions13
Overview
This node integrates with the Polar.sh API to manage checkout sessions, specifically allowing you to update existing checkout sessions. It is useful in scenarios where you need to modify details of a checkout session after it has been created, such as changing the amount, updating customer information, applying discounts, or switching products and pricing tiers.
Practical examples include:
- Adjusting the price of a checkout session if a customer requests a custom amount.
- Updating the customer's email or name for communication purposes.
- Applying a new discount code to an ongoing checkout.
- Changing the product or its price tier before finalizing the purchase.
Properties
| Name | Meaning |
|---|---|
| Checkout ID | The unique identifier of the checkout session to update. |
| Update Fields | A collection of fields that can be updated in the checkout session: |
| - Amount | The new amount in dollars for custom prices (minimum 0.5, maximum 999999.99). |
| - Customer Email | Update the customer's email address (e.g., name@example.com). |
| - Customer Name | Update the customer's name. |
| - Discount ID | Apply a different discount by specifying its ID. |
| - Product Name or ID | Switch to a different product by selecting from a list or specifying an ID via expression. |
| - Product Price Name or ID | Select a specific price tier for the product, either from a list or by specifying an ID via expression. |
Output
The node outputs JSON data representing the updated checkout session returned by the Polar.sh API. This includes all relevant details of the checkout after the update, such as the updated amount, customer information, applied discounts, product details, and pricing tiers.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Polar.sh API.
- The node uses the Polar.sh API endpoints, switching between sandbox and production environments based on the configured environment credential.
- No additional external dependencies are required beyond the Polar.sh API access.
Troubleshooting
Common Issues:
- Providing an invalid or non-existent Checkout ID will result in errors when attempting to update.
- Attempting to set an amount outside the allowed range (less than $0.50 or more than $999,999.99) will cause validation errors.
- Specifying product or price IDs that do not exist or are incompatible may lead to API errors.
- Missing required authentication credentials will prevent API calls.
Error Messages:
- Errors returned from the Polar.sh API typically include a message and optional description. These should be reviewed to correct input parameters.
- Network or authentication failures will manifest as request errors; ensure API keys and environment settings are correctly configured.
Resolution Tips:
- Verify the Checkout ID exists and is correct.
- Ensure amounts are within valid ranges.
- Use the provided load options to select valid products and prices.
- Confirm API credentials and environment configuration in n8n settings.