Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

The "Create Subscription" operation in the Lectful Central node allows you to create a new subscription for a tenant using the Lectful Central API. This operation supports advanced business logic such as optionally creating an invoice upon subscription creation, setting auto-collection preferences, and specifying billing periods and trial dates.

This node is beneficial when automating subscription management workflows, such as onboarding new customers, managing recurring billing cycles, or integrating subscription creation into larger automation pipelines.

Practical examples:

  • Automatically create a subscription for a tenant after they complete a signup form.
  • Create subscriptions with custom billing periods or trial periods based on user input.
  • Enable or disable automatic payment collection for specific subscriptions.
  • Generate invoices immediately upon subscription creation or activate subscriptions without invoices.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful Central API:
- Use Stored Credentials (configured in n8n)
- Manual Configuration (provide Base URL and API key manually)
Credentials Note Notice shown when using Manual Configuration mode explaining that credentials can be left empty if overrides are provided.
Base URL Override Optional base URL to override the credential's base URL (without /api/v1). Required if using Manual Configuration mode.
API Key Override Optional API key to override the credential's API key. Required if using Manual Configuration mode.
Tenant ID Required. The ID of the tenant to subscribe.
Price ID Required. The ID of the price to subscribe to, which includes plan details, billing cycle, and amount.
Create Invoice Boolean flag indicating whether to create an invoice for this subscription.
- true: Creates an invoice; subscription status will be pending_payment.
- false: No invoice; subscription status will be active.
Auto Collection Auto-collection setting for the subscription:
- On
- Off
Billing Period Optional billing period length. If not specified, the price's default period is used.
Billing Period Unit Unit for the billing period:
- Day
- Week
- Month
- Year
If not specified, the price's default period unit is used.
Trial Starts At Optional ISO 8601 date string specifying when the trial period starts.
Trial Ends At Optional ISO 8601 date string specifying when the trial period ends.
Current Period Starts At Optional ISO 8601 date string specifying the start of the current billing period.
Current Period Ends At Optional ISO 8601 date string specifying the end of the current billing period.

Output

The node outputs an array of JSON objects representing the API response from the subscription creation request. Each output item contains:

  • json: The full JSON response from the Lectful Central API for the created subscription, including all subscription details returned by the API.

No binary data is produced by this operation.

Dependencies

  • Requires access to the Lectful Central API.
  • Requires either:
    • Stored API credentials configured in n8n (base URL and API key), or
    • Manual configuration of the base URL and API key via node parameters.
  • The node uses HTTP requests with Bearer token authentication to communicate with the API.

Troubleshooting

  • Missing or invalid credentials:
    Error thrown if neither stored credentials nor manual overrides are properly set. Ensure credentials are configured correctly or provide valid manual overrides.

  • Base URL or API key missing in manual mode:
    When using Manual Configuration mode, both Base URL Override and API Key Override must be provided. Otherwise, an error is raised.

  • Invalid date formats:
    Trial and billing period dates must be in ISO 8601 format. Invalid formats may cause API errors.

  • API errors:
    Any API error responses will be surfaced in the node output or as exceptions. Check the API response message for details.

  • Continue on Fail:
    If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON.

Links and References


If you need further details about other operations or resources, feel free to ask!

Discussion