Straddle icon

Straddle

Interact with Straddle API

Actions81

Overview

This node interacts with the "Charge" resource of the Straddle API, specifically performing the operation to place a hold on an existing charge by its ID. It sends a PUT request to update the hold status of a charge, optionally including a reason for the hold.

Common scenarios where this node is useful include:

  • Temporarily holding funds on a customer's payment method before finalizing a transaction.
  • Managing charge states in payment workflows that require manual review or additional verification.
  • Integrating with platforms that need to control charge holds programmatically.

For example, an e-commerce platform might use this node to put a hold on a charge when an order is placed but not yet shipped, releasing the hold once the order is fulfilled.

Properties

Name Meaning
Id The unique identifier of the charge to put on hold (required).
Straddle Account Id Optional header to specify an account ID and set the scope of the request (for platform use).
Request Id Optional client-generated identifier to trace and debug this specific request.
Correlation Id Optional client-generated identifier to trace and debug a series of related requests.
Reason A string describing the reason for placing the hold on the charge.

Output

The node outputs the JSON response from the Straddle API after attempting to put a hold on the specified charge. This JSON typically contains details about the updated charge, including its new hold status and any relevant metadata returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Straddle API.
  • The base URL for API requests is dynamically constructed based on the configured environment credential parameter.
  • The node expects the Straddle API to be accessible and properly configured for the authenticated user.

Troubleshooting

  • Missing or invalid Charge Id: If the Id property is empty or incorrect, the API will likely return an error indicating the charge was not found. Ensure the correct charge ID is provided.
  • Authentication errors: If the API key credential is missing or invalid, authentication failures will occur. Verify that the API key is correctly configured in n8n credentials.
  • Invalid headers: Incorrect values in optional headers like Straddle Account Id, Request Id, or Correlation Id may cause unexpected behavior or tracing issues. These should be used carefully according to platform requirements.
  • API errors: The API may return errors if the charge cannot be put on hold due to its current state or business rules. Review the API response message for details.
  • Network issues: Connectivity problems to the Straddle API endpoint can cause request failures. Check network access and endpoint availability.

Links and References

Discussion