Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

The "Update Payment" operation within the "Payment Management" resource of this node allows users to update an existing payment record in the Lectful Central system. This operation is useful for scenarios where payment details such as amount, currency, status, date, reference, or notes need correction or modification after the initial creation.

Typical use cases include:

  • Correcting a payment amount or currency due to errors.
  • Updating the payment status (e.g., from pending to completed).
  • Adding or modifying payment references or notes for better tracking.
  • Adjusting the payment date if it was recorded incorrectly.

For example, if a payment was initially marked as "pending" but has since been confirmed, this operation can update the status to "completed" and add any relevant transaction IDs or notes.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful Central API:
- Use Stored Credentials
- Manual Configuration
Base URL Override Optional base URL to override the credential setting (used only in Manual Configuration mode)
API Key Override Optional API key to override the credential setting (used only in Manual Configuration mode)
Payment ID The unique identifier of the payment to update (required)
Payment Method ID The ID of the payment method used for the payment (optional; required if updating)
Payment Amount The new amount for the payment (optional; required if updating)
Payment Currency The currency code for the payment (e.g., USD, EUR) (optional)
Payment Status The status of the payment. Possible values:
- pending
- completed
- failed
- cancelled
- refunded
Payment Date The date of the payment in YYYY-MM-DD format (optional)
Payment Reference Reference number for the payment (e.g., REF-001) (optional)
Payment Notes Additional notes about the payment (optional)

Output

The node outputs an array of JSON objects corresponding to each input item processed. For the "Update Payment" operation, the output JSON contains the updated payment object returned by the Lectful Central API. This typically includes all payment details such as ID, amount, currency, status, date, references, and notes reflecting the latest state after the update.

No binary data output is involved in this operation.

Example output snippet (simplified):

{
  "id": 123,
  "payment_method_id": 5,
  "amount": 2999,
  "currency": "USD",
  "status": "completed",
  "payment_date": "2024-06-01",
  "payment_reference": "REF-001",
  "notes": "Updated payment details"
}

Dependencies

  • Requires access to the Lectful Central API.
  • Authentication can be provided either via stored credentials configured in n8n or manually by specifying the base URL and API key.
  • The node expects the API to be reachable at the specified base URL with valid authentication tokens.
  • No additional external dependencies are required beyond HTTP connectivity.

Troubleshooting

  • Missing or Invalid Credentials: If using stored credentials, ensure they are correctly configured with a valid base URL and API key. If using manual mode, both Base URL Override and API Key Override must be provided.
  • Invalid Payment ID: The payment ID must correspond to an existing payment. Errors will occur if the ID is missing or does not exist.
  • Invalid Field Values: Ensure that fields like amount, currency, status, and dates are valid and conform to expected formats. For example, dates should be in YYYY-MM-DD format.
  • API Errors: The node logs detailed error messages from the API. Common issues include authorization failures, invalid parameters, or network connectivity problems.
  • JSON Parsing Issues: Although not typical for this operation, if any JSON input is malformed, the node will throw an error.

To resolve errors:

  • Verify all required parameters are set.
  • Check API credentials and permissions.
  • Confirm the payment exists and is accessible.
  • Review API response messages for specific error details.

Links and References

Discussion