Actions55
- Webhooks Actions
- Payments Actions
- Products Actions
- Plans Actions
- Partner Referrals Actions
- Reporting Actions
- Orders Actions
- Subscriptions Actions
- Invoicing Actions
- Disputes Actions
Subscriptions → Create Subscription
AI-generatedOverview
The node "N8N Tools - PayPal Enhanced" provides a comprehensive integration with PayPal's API, supporting over 70 operations across multiple resources such as Orders, Subscriptions, Invoicing, Disputes, Webhooks, Payments, Products, Plans, Partner Referrals, and Reporting. Specifically, for the Subscriptions resource, the Create Subscription operation allows users to create new recurring billing subscriptions in PayPal.
This node is beneficial for automating subscription management workflows, such as creating new subscriptions based on user sign-ups or integrating subscription creation into larger e-commerce or billing automation processes.
Practical example:
A business using n8n can automate the creation of PayPal subscriptions when a customer selects a subscription plan on their website. The node sends the subscription details to PayPal, creating the subscription without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Request Body | JSON object containing the subscription details to send to PayPal when creating the subscription. This must be valid JSON representing the subscription data according to PayPal's API. |
| Additional Options | Collection of optional parameters: • Environment: Choose between "Sandbox" (testing) or "Live" PayPal environment. • Page Size: Number of items per page for list operations (not directly relevant for create but available). • Start Time: ISO 8601 formatted start date for filtering (used in some list operations). • End Time: ISO 8601 formatted end date for filtering (used in some list operations). |
Output
The node outputs an array of JSON objects, each representing the result of the executed operation. For the Create Subscription operation, the output JSON includes:
resource: The resource name, here"subscriptions".operation: The operation performed, here"createSubscription".success: Boolean indicating if the operation was successful.- All fields returned by PayPal's subscription creation API response, which typically include subscription ID, status, links, and other metadata.
creditsUsed: Number of API credits consumed by this request (from the external validation API).creditsRemaining: Remaining API credits after this request.timestamp: ISO timestamp of when the operation was performed.
If the operation fails and "Continue On Fail" is enabled, the output will contain an error message and success set to false.
The node does not output binary data.
Dependencies
- Requires credentials for:
- An external API key credential for the "N8N Tools API" used for validating operations and tracking usage.
- A PayPal OAuth2 API credential providing an access token, client ID, and environment setting.
- The node makes HTTP requests to:
- The N8N Tools API for validation.
- PayPal's REST API endpoints, choosing sandbox or live URLs based on the environment.
- Proper configuration of these credentials in n8n is necessary for the node to function.
Troubleshooting
- Invalid JSON in Request Body: If the provided JSON for the subscription details is malformed, the node throws an error indicating invalid JSON. Ensure the JSON syntax is correct.
- Validation Failure: If the external validation API rejects the resource-operation combination or credentials, the node throws a validation failure error. Check that credentials are correct and the operation is supported.
- Unknown Operation or Resource: If an unsupported operation or resource is selected, the node throws an error specifying the unknown operation/resource. Verify the selected options.
- API Errors from PayPal: Errors returned by PayPal (e.g., authentication errors, invalid subscription data) will cause the node to fail unless "Continue On Fail" is enabled. Review the error message for details and verify the request body and credentials.
- Environment Mismatch: Using the wrong environment (sandbox vs live) may cause unexpected errors. Confirm the environment matches your PayPal account type.
Links and References
- PayPal Subscriptions API Documentation
- PayPal Developer Portal
- n8n Documentation on Credentials
- ISO 8601 Date Format Reference
If you need further details about other operations or resources, feel free to ask!