Actions13
Overview
This node integrates with the Polar.sh API to manage checkout sessions, products, and customers. Specifically, for the Checkout - Get operation, it retrieves details of a specific checkout session by its ID. This is useful in scenarios where you want to fetch the current status or details of a checkout session created earlier, such as verifying payment status, retrieving metadata, or displaying checkout information in your workflow.
Practical examples:
- After creating a checkout session, use this node to get updated information about that session.
- Fetch checkout details to trigger follow-up actions like sending confirmation emails or updating records.
- Monitor checkout sessions for analytics or reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Checkout ID | The unique identifier of the checkout session to retrieve. This is required for the Get operation on the Checkout resource. |
Output
The node outputs the JSON response from the Polar.sh API representing the checkout session details. This typically includes fields such as:
id: The checkout session ID.product_id: The associated product's ID.amount: The amount charged (usually in smallest currency unit, e.g., cents).metadata: Any custom metadata attached to the checkout.- Other checkout-specific details like status, creation date, and payment info.
If multiple items were returned (not typical for a single get), each would be output as separate JSON objects.
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 base URL, which switches between sandbox and production environments based on the configured environment credential value.
- No additional external dependencies beyond the Polar.sh API.
Troubleshooting
Common issues:
- Invalid or missing Checkout ID will cause the API call to fail.
- Network or authentication errors if the API key is incorrect or missing.
- Using a checkout ID that does not exist or has been deleted will return an error.
Error messages:
- Errors from the Polar.sh API are caught and returned as JSON with
erroranddetailsfields if "Continue On Fail" is enabled. - Typical error:
"Checkout session not found"indicates the provided ID is invalid. - Authentication errors suggest checking the API key credential configuration.
- Errors from the Polar.sh API are caught and returned as JSON with
Resolution tips:
- Verify the Checkout ID is correct and exists.
- Ensure the API key credential is properly set up and has necessary permissions.
- Enable "Continue On Fail" to handle errors gracefully in workflows.
Links and References
- Polar.sh API Documentation (for detailed API endpoints and data structures)
- n8n documentation on Creating Custom Nodes