Swan icon

Swan

Consume Swan.io API

Overview

This node integrates with the Swan.io API to perform various operations related to financial accounts and transactions. Specifically, for the Query - Transaction operation, it retrieves detailed information about a specific transaction by its ID. This is useful in scenarios where you need to fetch transaction details for auditing, reporting, or further processing within an automation workflow.

Practical examples include:

  • Automatically retrieving transaction details after a payment is made.
  • Fetching transaction data to reconcile accounts or trigger notifications.
  • Integrating transaction lookups into larger financial workflows.

Properties

Name Meaning
Authentication Choose between "User Access Token" or "Project Access Token" for API authentication.
Transaction ID The unique identifier of the transaction to query. This is required for the operation.

Output

The node outputs a JSON object representing the transaction details as returned by the Swan.io API. The structure typically includes fields such as transaction amount, currency, beneficiary details, status, timestamps, and other metadata relevant to the transaction.

No binary data output is produced by this operation.

Example output (simplified):

{
  "id": "transaction-id",
  "amount": {
    "value": "100.00",
    "currency": "EUR"
  },
  "beneficiary": {
    "name": "John Doe",
    "iban": "DE12345678901234567890"
  },
  "status": "completed",
  "date": "2024-01-01T12:00:00Z",
  ...
}

Dependencies

  • Requires an API authentication token with project-level access (a project access token).
  • The node depends on the Swan.io API and requires proper credentials configured in n8n.
  • No additional external services are needed beyond the Swan.io API.

Troubleshooting

  • Error: "This resource needs a project token to be requested"
    This error occurs if the selected authentication method is not a project access token when querying a transaction. To fix this, ensure you select "Project Access Token" under Authentication.

  • Invalid or missing Transaction ID
    Make sure the Transaction ID property is provided and correctly formatted.

  • API request failures
    Check that your project access token is valid and has sufficient permissions. Also verify network connectivity to the Swan.io API.

  • General errors
    If the node throws unexpected errors, enable "Continue On Fail" to handle errors gracefully and inspect error messages for more details.

Links and References

Discussion