Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

The "Update Payment Method" operation in the Lectful Central node allows users to modify details of an existing payment method by specifying its unique ID and providing updated information. This operation is part of a broader set of administrative API interactions with the Lectful Central platform, which manages various resources such as payments, subscriptions, invoices, and more.

This node is beneficial for administrators or automation workflows that need to programmatically update payment methods without manual intervention. For example, if a payment method's name, code, description, or status changes, this operation can be used to keep the system up-to-date automatically.

Practical examples include:

  • Updating the name or description of a credit card payment method.
  • Changing whether a payment method is active or online.
  • Modifying whether a payment method requires a reference number.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful Central API: "Use Stored Credentials" or "Manual Configuration".
Credentials Note Informational note shown when using Manual Configuration mode about credential overrides.
Base URL Override Optional base URL to override the stored credential setting (without /api/v1).
API Key Override Optional API key to override the stored credential setting.
Payment Method ID The unique identifier of the payment method to update (required).
Payment Method Name New name for the payment method (optional).
Payment Method Code New unique code for the payment method (optional).
Payment Method Description New description text for the payment method (optional).
Is Active Boolean flag indicating whether the payment method is active (optional).
Is Online Boolean flag indicating whether the payment method is available online (optional).
Requires Reference Boolean flag indicating whether the payment method requires a reference number (optional).

Note: The last five properties (name, code, description, is active, is online, requires reference) are inferred from the update operation's usage pattern, where only provided fields are sent in the update request.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output object contains the JSON response from the Lectful Central API after updating the payment method.

The structure of the json output field reflects the updated payment method resource returned by the API, typically including fields like:

  • id: The payment method ID.
  • name: The updated name.
  • code: The updated code.
  • description: The updated description.
  • is_active: Whether the payment method is active.
  • is_online: Whether the payment method is online.
  • requires_reference: Whether the payment method requires a reference.

If the API returns an error or the node encounters an issue, the output JSON will contain an error field with the error message.

The node does not output binary data.

Dependencies

  • Requires access to the Lectful Central API.
  • Requires either stored credentials configured in n8n (an API base URL and API key) or manual configuration of these parameters per execution.
  • No additional external dependencies beyond standard HTTP requests.
  • Proper API permissions are needed to update payment methods.

Troubleshooting

Common Issues

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are properly set, the node will throw an error.
  • Missing Payment Method ID: The operation requires a valid payment method ID; omitting it will cause failure.
  • Invalid field values: Providing invalid or malformed values for update fields may result in API errors.
  • Network or API errors: Connectivity issues or API downtime will cause request failures.

Error Messages and Resolutions

  • "Base URL Override is required when using Manual Configuration mode": Ensure you provide a base URL if using manual authentication.
  • "API Key Override is required when using Manual Configuration mode": Provide an API key when using manual mode.
  • "Valid credentials are required when using 'Use Stored Credentials' mode": Configure your API credentials correctly in n8n.
  • "Error processing item X: <message>": Check the specific error message for details; it could be due to invalid parameters or API rejection.
  • "Invalid or missing credentials": Verify your API key and base URL.
  • "Payment Method ID is required": Make sure to specify the payment method ID parameter.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion