Straddle icon

Straddle

Interact with Straddle API

Actions81

Overview

This node updates an existing Charge resource in the Straddle API by its unique identifier. It performs a PUT request to modify details of a specific charge, such as its description, amount, payment date, and optional metadata. This operation is useful for financial platforms or services that need to adjust charge records after creation, for example, correcting amounts, updating descriptions, or adding additional metadata.

Practical examples include:

  • Updating a charge's description or amount due to billing corrections.
  • Changing the payment date if it was initially set incorrectly.
  • Adding custom metadata for internal tracking or integration purposes.

Properties

Name Meaning
Id The unique identifier of the charge to update (required).
Straddle Account Id Optional header to specify an account ID for scoping the request, typically used by platforms.
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.
Description Description of the charge (required).
Amount Numeric amount of the charge (required).
Payment Date Date when the payment is made (required).
Metadata Optional user-defined key-value pairs in JSON format for custom data associated with the charge.

Output

The node outputs the JSON response from the Straddle API after updating the charge. This JSON typically contains the updated charge object reflecting the new values for description, amount, payment date, metadata, and possibly other fields managed by the API.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Straddle API.
  • The base URL for API requests depends on the configured environment (e.g., sandbox or production).
  • Proper network connectivity to the Straddle API endpoint.

Troubleshooting

  • Missing required fields: Ensure that Id, Description, Amount, and Payment Date are provided; otherwise, the API will reject the request.
  • Invalid date format: The Payment Date should be in a valid string format accepted by the API (likely ISO 8601). Incorrect formats may cause errors.
  • Authentication errors: Verify that the API key credential is correctly configured and has sufficient permissions.
  • Header issues: If using Straddle Account Id, Request Id, or Correlation Id, ensure they are correctly formatted strings.
  • Metadata parsing: The Metadata field expects valid JSON; malformed JSON will cause failures.

Common error messages might include:

  • "Charge not found" if the provided Id does not exist.
  • "Invalid request body" if required fields are missing or improperly formatted.
  • "Unauthorized" if authentication fails.

Links and References

Discussion