DSmart SOAP Node

Make SOAP web service requests with authentication for DSmart services

Overview

This node enables making authenticated SOAP web service requests specifically for DSmart services. It is designed to interact with various SOAP operations exposed by the DSmart payment and direct debit system, such as retrieving invoice information, direct debit details, bank agreements, payment cancellations, and more.

A common use case is automating financial workflows where you need to query or update payment-related data via SOAP APIs. For example, you might use this node to fetch direct debit transactions due on a specific date, retrieve invoice details for subscribers, or set payment information programmatically.

By allowing custom SOAP envelopes with dynamic variable substitution, it offers flexibility to tailor requests to different operations and parameters.

Properties

Name Meaning
SOAP Service URL The URL of the SOAP web service endpoint to which requests are sent. Default points to the DSmart online payment system WSDL.
Authentication Source How authentication credentials are provided: either using stored API credentials or manual input of username and password.
Authentication When manual input is selected, this collection allows entering the username and password for SOAP API authentication.
SOAP Envelope The full SOAP envelope XML string to send in the request body. Supports variable placeholders like {{username}}, {{password}}, and other parameters, as well as n8n expressions (e.g., {{ $json.field }}). This property changes depending on the selected operation and must be customized accordingly.

For the GetDirectDebitToInvoiceByDueDate operation, the relevant variables used inside the SOAP envelope include:

  • username: Authentication username.
  • password: Authentication password.
  • bankCode: Bank code (default "24").
  • dueDate: Due date to filter direct debit invoices (defaults to current date).
  • domainName: Domain name, defaulted to "emlakbank.com.tr".

Output

The node outputs an array of items, each containing a JSON object with the following structure:

{
  "response": { /* Parsed SOAP response content, typically the operation result */ },
  "rawResponse": "<string>",  // Raw XML response from the SOAP service
  "statusCode": 200,          // HTTP status code of the SOAP request
  "statusText": "OK"          // HTTP status text
}
  • The response field contains the parsed SOAP response body, focusing on the specific operation's result element.
  • rawResponse holds the original XML response as a string.
  • statusCode and statusText provide HTTP-level response details.

No binary data output is produced by this node.

Dependencies

  • Requires access to the DSmart SOAP web service endpoint.
  • Needs valid authentication credentials (username and password) either from stored credentials or manual input.
  • Uses the axios library for HTTP requests.
  • Uses the xml2js library to parse XML responses into JSON objects.

Troubleshooting

  • Authentication errors: If the SOAP service returns authentication failures, verify that the username and password are correct and properly injected into the SOAP envelope.
  • Timeouts: The node sets a 30-second timeout for requests. Long-running operations may cause timeouts; consider increasing timeout if needed.
  • Malformed SOAP envelope: Ensure the SOAP envelope XML is well-formed and includes all required fields for the chosen operation.
  • Parsing errors: If the SOAP response format changes or is unexpected, parsing may fail or return incomplete data. Check rawResponse for troubleshooting.
  • Network issues: Verify network connectivity to the SOAP service URL and that no firewall or proxy blocks the requests.

Links and References

Discussion