openapi: 3.1.0
info:
  title: Straddle API
  version: v1
  description: >-

    [![Run in
    Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/30656205-137b704d-b21a-408c-a55e-453c2e46d778?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D30656205-137b704d-b21a-408c-a55e-453c2e46d778%26entityType%3Dcollection%26workspaceId%3D7ec8be21-f569-4114-aa8d-4ff6dbde1b0e#?env%5BSandbox%5D=W3sia2V5IjoidG9rZW4iLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiIiLCJzZXNzaW9uSW5kZXgiOjB9LHsia2V5IjoiY29sbGVjdGlvbk5hbWUiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiIiLCJzZXNzaW9uSW5kZXgiOjF9LHsia2V5IjoiY29sbGVjdGlvblNjaGVtYVVybCIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQiLCJzZXNzaW9uVmFsdWUiOiIiLCJjb21wbGV0ZVNlc3Npb25WYWx1ZSI6IiIsInNlc3Npb25JbmRleCI6Mn0seyJrZXkiOiJhY2Nlc3NLZXkiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiIiLCJzZXNzaW9uSW5kZXgiOjN9LHsia2V5Ijoid29ya3NwYWNlSWQiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiIiLCJzZXNzaW9uSW5kZXgiOjR9LHsia2V5IjoiY29sbGVjdGlvbklkIiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCIsInNlc3Npb25WYWx1ZSI6IiIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoiIiwic2Vzc2lvbkluZGV4Ijo1fSx7ImtleSI6ImJhc2V1cmwiLCJ2YWx1ZSI6InNhbmRib3giLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCIsInNlc3Npb25WYWx1ZSI6IiIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoiIiwic2Vzc2lvbkluZGV4Ijo2fSx7ImtleSI6ImJlYXJlclRva2VuIiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoic2VjcmV0Iiwic2Vzc2lvblZhbHVlIjoiZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5Sm9kSFJ3T2k4dmMyTm9aVzFoY3k1dGFXTnliM052Wm5RdVkyOXRMM2R6THpJd01EZ3ZNRFl2YVdSbGJuUnBkSGt2WTJ4aGFXMXpMM0p2YkdVaU9pSkJjR2xMWlhraUxDSm8uLi4iLCJjb21wbGV0ZVNlc3Npb25WYWx1ZSI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpvZEhSd09pOHZjMk5vWlcxaGN5NXRhV055YjNOdlpuUXVZMjl0TDNkekx6SXdNRGd2TURZdmFXUmxiblJwZEhrdlkyeGhhVzF6TDNKdmJHVWlPaUpCY0dsTFpYa2lMQ0pvZEhSd09pOHZjMk5vWlcxaGN5NXRhV055YjNOdlpuUXVZMjl0TDNkekx6SXdNRGd2TURZdmFXUmxiblJwZEhrdlkyeGhhVzF6TDJGMWRHaGxiblJwWTJGMGFXOXViV1YwYUc5a0lqb2lVM1J5WVdSa2JHVkJjR2xCZFhSb1RXVjBhRzlrSWl3aWRHOXJaVzVmYVdRaU9pSm1PR0ptT1dVNE15MDFNREUxTFRRMU9UUXRPV1JqTXkwMU5ERm1PR1kwTVdFelpqSWlMQ0psYm5acGNtOXViV1Z1ZENJNkluTmhibVJpYjNnaUxDSm9kSFJ3T2k4dmMyTm9aVzFoY3k1dGFXTnliM052Wm5RdVkyOXRMM2R6THpJd01EZ3ZNRFl2YVdSbGJuUnBkSGt2WTJ4aGFXMXpMMlY0Y0dseVlYUnBiMjRpT2lJeE56TXlPRE00TkRBd0lpd2lhWE56SWpvaWMzUnlZV1JrYkdVaWZRIiwic2Vzc2lvbkluZGV4Ijo3fV0=)
     # Introduction

    Built on REST principles, the Straddle API uses intuitive, resource-oriented
    URLs and communicates via JSON-encoded request bodies and responses. We
    employ standard HTTP methods, authentication, and status codes to ensure
    consistency and predictability.



    # Environments


    Straddle provides two separate environments to support your development
    workflow: the **Sandbox** environment for testing and development, and the
    **Production** environment for live transactions.


    | Environment | Base URL                      | Purpose                 |

    |-------------|-------------------------------|------------------------|

    | Sandbox     | `https://sandbox.straddle.com` | Testing and development |

    | Production  | `https://production.straddle.com` | Live transactions      
    |


    **Warning:** Always ensure you're using the correct environment and API
    keys. Using Sandbox credentials in Production will cause requests to fail
    and negatively impact the user experience.



    # Authentication


    Straddle uses Bearer Token authentication via JWT API keys. Include your
    secret API key in the `Authorization` header of every request:


    ```bash

    curl https://sandbox.straddle.com/v1/customers \
      -H "Authorization: Bearer YOUR_SECRET_API_KEY"
    ```


    ### Generate an API Key


    Generate an API key from the Straddle Dashboard:


    1. Log in to your [Straddle Dashboard](https://dashboard.straddle.com).

    2. Navigate to **Developers** > **API Keys**.

    3. Click **Create API Key** to generate a new key.


    > **Warning:** Your secret API key grants full access to your Straddle
    account. Keep it secure and **never** share it publicly or include it in
    client-side code.


    ### Sandbox and Production Environments


    Straddle provides separate API keys for sandbox and production environments:


    - **Sandbox API Keys**: Use these keys for development and testing.

    - **Production API Keys**: Use these keys in production when you're ready to
    accept real transactions.


    > **Tip:** Always test your integration thoroughly using sandbox API keys
    before switching to production keys.


    ### Keep your API keys secure


    Follow these guidelines to keep your API keys secure:


    1. **Keep Secret Keys Confidential:** Do not share your secret keys in
    emails, chat messages, or public repositories.

    2. **Use Environment Variables:** Store keys securely using environment
    variables or a secrets management system.

    3. **Rotate Keys Regularly:** Periodically rotate your API keys to reduce
    risk.

    4. **Monitor Usage:** Regularly review your API logs in the Dashboard for
    any suspicious activity.


    With authentication and environments configured, you can start making
    requests to Straddle's API. Keep reading to learn more. 



    # Idempotent Requests


    Straddle supports idempotent API requests, which means you can safely retry
    requests without fear of performing the same operation multiple times. This
    is especially important for operations that change state, like creating a
    payment, where duplicate requests could lead to financial discrepancies.


    Idempotency is achieved by including a unique `Idempotency-Key` header in
    your HTTP requests. Straddle uses this key to detect and prevent duplicate
    operations. If a request with a given key has already been successfully
    processed, Straddle will return the original response without re-executing
    the operation.



    ### Request Headers


    To make an idempotent API request, include a unique string in the
    `Idempotency-Key` header. We require a key length of 10-40 characters.


    | Header | Type | Description |

    |--------|------|-------------|

    | `Idempotency-Key` | string | A unique identifier for the request. Must be
    10-40 characters long. |


    ### Response Headers


    When an identical request is successfully replayed, the response will
    include the original HTTP status code, original response headers, and the
    original response body, with an additional header:


    | Header | Type | Description |

    |--------|------|-------------|

    | `Idempotent-Replayed` | boolean | Set to `true` when the response is a
    replay of a previous successful request. |


    ### Idempotency Error Responses


    The Straddle will return specific error responses in idempotency-related
    scenarios:


    | Status Code | Error Type | Description |

    |-------------|------------|-------------|

    | **400** | Bad Request | The `Idempotency-Key` header is invalid (missing
    or incorrect length). |

    | **409** | Conflict | The idempotency key was already used for a different
    request, or a previous identical request is currently in progress. |


    ### Idempotency Key Reused for Different Request


    If you send a request with an `Idempotency-Key` that was previously used for
    a different request (e.g., different path, method, or request body), you
    will receive a `409 Conflict` error.


    ```json

    {
      "status": 409,
      "type": "/conflict",
      "title": "Conflict",
      "detail": "Idempotency key already used for a different request."
    }

    ```


    ### Concurrent Request in Progress


    If you send a request with an `Idempotency-Key` that is currently being
    processed by another request, you will receive a `409 Conflict` error.


    ```json

    {
      "status": 409,
      "type": "/conflict",
      "title": "Conflict",
      "detail": "Previous identical request currently in progress."
    }

    ```


    ### Invalid Idempotency Key


    If the `Idempotency-Key` header is missing or does not meet the length
    requirements (10-40 characters), a `400 Bad Request` error will be returned.


    ```json

    {
      "status": 400,
      "type": "/bad-request",
      "title": "Bad Request",
      "detail": "The Idempotency-Key header is invalid. It must be between 10 and 40 characters long."
    }

    ```


    ### Best Practices


    1. **Generate Unique Keys per Business Operation**: For each distinct
    business operation you initiate, generate a new and unique
    `Idempotency-Key`. Do not reuse keys across different logical actions.

    2. **Use UUIDs**: Universally Unique Identifiers (UUIDs) are an excellent
    choice for generating idempotency keys due to their high probability of
    uniqueness.

    4. **Handle 409 Conflicts**: Implement logic in your client to properly
    handle `409 Conflict` responses. For "key already used for a different
    request," generate a new key. For "previous identical request currently in
    progress," consider retrying.

    5. **Key Length**: Ensure your `Idempotency-Key` is between 10 and 40
    characters long.

    6. **Avoid Sending Same Key with Different Data**: Never send the same
    `Idempotency-Key` with a different request body, path, or HTTP method. This
    will result in a `409 Conflict` error.


    ### Example Usage


    ```bash

    curl -X POST https://sandbox.straddle.com/v1/charges \

    -H "Authorization: Bearer YOUR_API_KEY" \

    -H "Content-Type: application/json" \

    -H "Idempotency-Key: unique-client-key-7890" \

    -d '{
      "amount": 100.00,
      "currency": "USD"
    }'

    ```


    Idempotency is currently supported for **POST**, **PUT**, **PATCH** and
    **DELETE** requests only, and requires API key authentication. 



    # Response Structure


    The Straddle API provides responses with consistent structure to ensure
    readability and ease of integration. All API responses follow these
    conventions to ensure consistency and ease of integration across different
    client applications.


    - **Field Naming**
      - Use `snake_case` for all field names
      - Use descriptive full words, except common acronyms (e.g., `dob`, `SSN`)
      
    - **Resource IDs**
      - All IDs are UUIDs for cross-system uniqueness and compatibility
      
    - **Response Type (`response_type`)**
      - `"object"`: Single resource response
      - `"array"`: List of resources, typically paginated
      - `"error"`: Error response with details in `error` field
      
    - **Primary Data (`data`)**
      - Contains main response payload
      - Holds resource(s) for `"object"` and `"array"` types
      - For `"error"` type, error details go in `error` field
      
    - **Meta Information (`meta`)**
      - Standard fields:
        - `api_request_id`: Unique request identifier
        - `api_request_timestamp`: ISO 8601 request time (e.g., `"2023-11-07T05:31:56Z"`)
      - Pagination fields (for `"array"` responses):
        - `page_number`: Current page
        - `page_size`: Items per page
        - `total_items`: Total available items
        - `sort_order`: `"asc"` or `"desc"`
        - `sort_by`: Sort field name

    ### Examples


    #### Single-Object Response


    ```json

    {
      "meta": {
        "api_request_id": "3a2b1c4d-0e6f-4a88-9876-123456abcdef",
        "api_request_timestamp": "2023-11-07T05:31:56Z"
      },
      "response_type": "object",
      "data": {
        "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "dob": "1990-01-01",
        "address": {
          "street": "123 Main St",
          "city": "Springfield",
          "state": "IL",
          "postal_code": "62701"
        }
      }
    }

    ```


    #### Paginated List Response


    ```json

    {
      "meta": {
        "api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "api_request_timestamp": "2023-11-07T05:31:56Z",
        "page_number": 2,
        "page_size": 50,
        "total_items": 500,
        "sort_order": "asc",
        "sort_by": "name"
      },
      "response_type": "array",
      "data": [
        {
          "id": "c1b1b1b1-1b1b-1b1b-1b1b-1b1b1b1b1b1b",
          "name": "John Doe",
          "email": "john.doe@example.com"
        },
        {
          "id": "a9b1b1b1-1b1b-1b1b-1b1b-1b1b1b1b1b1b",
          "name": "Steven Martin",
          "email": "steven.martin@example.com"
        }
      ]
    }

    ```


    #### Error Response


    ```json

    {
      "meta": {
        "api_request_id": "f1b1b1b1-1b1b-1b1b-1b1b-1b1b1b1b1b1b"
      },
      "response_type": "error",
      "error": {
        "status": 400,
        "type": "/field_validation",
        "title": "Invalid Input Data",
        "detail": "The request contains invalid field values.",
        "items": [
          {
            "reference": "customer.email",
            "detail": "Email address must be unique."
          }
        ]
      }
    }

    ```


    ### Best Practices for Handling Responses


    1. **Check the `response_type`**: Determine how to parse the response based
    on the `response_type` field.

    2. **Handle Pagination**: Use pagination metadata to navigate through
    paginated data effectively.

    3. **Implement Robust Error Handling**: Examine the `error` object in error
    responses to understand and address issues.

    4. **Log `api_request_id`**: Record the `api_request_id` for each request to
    assist with troubleshooting and support.

    5. **Access Data via `data` Property**: Retrieve the main payload from the
    `data` property for successful responses.

    6. **Synchronize Timestamps**: Use `api_request_timestamp` for event logging
    and synchronization.

    7. **Consistent Parsing Logic**: Apply a consistent parsing strategy across
    all responses for reliability.

    8. **Avoid Sensitive Data in Logs**: When logging responses, ensure that
    sensitive information is excluded to maintain security.


    By adhering to these practices, you can build a robust integration with the
    Straddle API that gracefully handles various response scenarios.



    # Metadata


    Metadata allows you to attach custom key-value pairs to Straddle objects
    like `customers`, `charges`, and `payouts`. Use metadata to store additional
    information important to your business that isn't captured by Straddle's
    standard fields.


    > **Important:** Do not confuse the `metadata` field with the `meta` object.
    The `meta` object contains system-level information about the API request,
    while `metadata` is for custom data you provide.


    ### Adding Metadata


    You can add metadata when creating or updating objects through the Straddle
    API. Here's how:


    #### Adding Metadata When Creating a Customer


    Include a `metadata` object in your request:


    ```json

    {
      "name": "John Doe",
      "type": "individual",
      "email": "john@example.com",
      "address": {
        "address1": "123 Main St",
        "address2": null,
        "type": "residential",
        "city": "Springfield",
        "state": "IL",
        "zip": "62701"
      },
      "phone": "+1234567890",
      "external_id": "CUS-123",
      "device": {
        "ip_address": "192.168.1.1"
      },
      "metadata": {
        "order_id": "6735",
        "customer_group": "premium"
      }
    }

    ```


    ### Tips

    - **Use Consistent Keys:** Establish and follow a consistent naming
    convention for your metadata keys.

    - **Keep It Simple:** Store simple key-value pairs. For complex data, store
    a reference ID in metadata and keep the full data in your own database.

    - **Avoid Sensitive Data:** Do not store sensitive information like credit
    card numbers or social security numbers in metadata.


    ### Limitations


    - Metadata keys and values must be 40 characters or fewer.

    - You can have up to 20 key-value pairs in the `metadata` object.


    # Embedded Accounts


    Platforms building on Embed can make API calls on behalf of their embedded
    accounts, allowing you to perform actions for your users seamlessly. To
    issue requests as an embedded account, include the `Straddle-Account-Id`
    header with the embedded account's ID (prefixed with `acct_`) in each
    request. You can make API calls for your embedded accounts in two ways:


    1. **Server-side**: Use the `Straddle-Account-Id` header with the embedded
    account ID in each request.

    2. **Client-side**: Pass the `Straddle-Account-Id` as an argument when
    initializing the Straddle client library.


    > **Note:** To ensure optimal performance and reliability, Straddle enforces
    rate limits on API endpoints. These limits apply collectively to all
    requests made by your platform, including those made on behalf of embedded
    accounts.


    ### Server-side Requests Using the `Straddle-Account-Id` Header


    When making server-side API calls, include the `Straddle-Account-Id` header
    with the embedded account's ID to execute requests on their behalf.


    #### Example: Creating a Charge


    The following example demonstrates how to create a charge using your
    platform's secret API key and your user's account ID.


    ```bash

    curl --request POST \
      --url https://sandbox.straddle.com/v1/charges \
      --header 'Authorization: Bearer <your-secret-api-key>' \
      --header 'Content-Type: application/json' \
      --header 'Straddle-Account-Id: <uuid>' \
      --data '{
        "paykey": "<string>",
        "description": "<string>",
        "amount": 123,
        "currency": "<string>",
        "payment_date": "2023-12-25",
        "consent_type": "internet",
        "device": {
          "ip_address": "<string>"
        },
        "external_id": "<string>",
        "config": {
          "balance_check": "required"
        },
        "metadata": {}
      }'
    ```


    ### Client-side Requests


    To make client-side API calls on behalf of an embedded account, pass the
    embedded account ID when initializing the Straddle client. This feature is
    *coming soon*.


    > **Warning:** Exercise caution when making client-side requests as an
    embedded account. Ensure you are not exposing sensitive information or
    providing unnecessary permissions to the client.



    # Errors


    Straddle uses standard HTTP status codes to indicate the success or failure
    of API requests. Understanding these codes and how to handle errors will
    help you build robust and user-friendly applications.


    Here is a summary of the HTTP status and error codes that Straddle may
    return:


    | Status Code | Type | Description |

    |------------|------|-------------|

    | **200** | OK | The request was successful, and the response contains the
    expected data. |

    | **400** | Bad Request | The request was invalid, often due to missing or
    incorrect parameters. |

    | **401** | Unauthorized | No valid API key was provided with the request. |

    | **403** | Forbidden | The API key doesn't have the necessary permissions
    to perform the request. |

    | **404** | Not Found | The requested resource does not exist. |

    | **409** | Conflict | The request conflicts with another request (e.g.,
    using the same idempotency key). |

    | **422** | Unprocessable Entity | The request was well-formed but could not
    be processed due to semantic errors. |

    | **429** | Too Many Requests | Too many requests have been made in a short
    period of time. Implement exponential backoff and retry later. |

    | **500, 502, 503, 504** | Server Errors | Server errors—something went
    wrong on Straddle's end. These errors are rare. |


    | Error Type | Description |

    | ---------- | ----------- |

    | `invalid_request_error` | Occurs when the request has invalid parameters,
    such as missing required fields or invalid values. |

    | `validation_error` | Occurs when the request data fails Straddle's
    validation checks, like providing an invalid address or unsupported payment
    method. |

    | `authentication_error` | Occurs when the provided API key is invalid or
    lacks the necessary permissions for the requested action. |

    | `api_error` | Covers any other type of problem, such as temporary issues
    with Straddle's servers. These errors are rare. |


    When an error occurs, Straddle returns an HTTP response with the appropriate
    status code and a JSON body containing an `error` object with details about
    the error.


    ### Error Response Structure


    When an error occurs, Straddle returns an HTTP response with the appropriate
    status code and a JSON body containing an `error` object with details about
    the error.


    The `error` object includes the following attributes:


    | Attribute | Type | Description |

    |-----------|------|-------------|

    | `status` | integer | The HTTP status code returned. |

    | `type` | string | A string identifying the type of error. Possible values
    are `api_error`, `invalid_request_error`, `validation_error`, or
    `authentication_error`. |

    | `title` | string | A short description of the error type. |

    | `detail` | string | A detailed message about the error. |

    | `items` | array | (Optional) An array of objects providing more specific
    details about individual errors. |

    | `items[].reference` | string | An identifier related to the error, such as
    a field name or error code. |

    | `items[].detail` | string | A detailed description of the specific error.
    |


    ### Example Error Response


    Here's an example of a validation error response:


    ```json

    {
      "meta": {
        "api_request_id": "3a2b1c4d-0e6f-4a88-9876-123456abcdef",
        "api_request_timestamp": "2023-11-07T05:31:56Z"
      },
      "response_type": "error",
      "error": {
        "status": 400,
        "type": "validation_error",
        "title": "Invalid Input Data",
        "detail": "The request contains invalid field values.",
        "items": [
          {
            "reference": "customer.email",
            "detail": "Email address must be unique."
          }
        ]
      }
    }

    ```


    - The error type is `validation_error`, indicating issues with the input
    data.

    - The `items` array provides specific details about which field caused the
    error. 

    # 
servers:
  - url: https://{environment}.straddle.com
    description: Straddle API server
    variables:
      environment:
        default: sandbox
        enum:
          - production
          - sandbox
        description: >-
          API environment for testing (sandbox) or live transactions
          (production)
security:
  - Bearer: []
tags:
  - name: Customers
    description: >-
      Customers represent the end users who send or receive payments through
      your integration. Each customer undergoes automatic identity verification
      and fraud screening upon creation. Use customers to track payment history,
      manage bank account connections, and maintain a secure record of all
      transactions associated with a user. Customers can be either individuals
      or businesses with appropriate compliance checks for each type.
  - name: Bridge
    description: >-
      Bridge provides a comprehensive suite of tools for connecting customer
      bank accounts. Use it to generate secure widget sessions for instant
      account verification, accept tokens from major providers like Plaid and
      Finicity, or verify accounts directly via our API. Bridge handles all
      sensitive banking credentials and ensures secure, compliant connections
      with support for 90% of US bank accounts.
  - name: Paykeys
    description: >-
      Paykeys are secure tokens that link verified customer identities to their
      bank accounts. Each Paykey includes built-in balance checking, fraud
      detection through LSTM machine learning models, and can be reused for
      subscriptions and recurring payments without storing sensitive data.
      Paykeys eliminate fraud by ensuring the person initiating payment owns the
      funding account.
  - name: Charge
    description: >-
      Charges represent attempts to debit money from a customer's bank account
      using a Paykey. Each charge includes automatic balance verification,
      real-time fraud screening, and multi-rail optimization and detailed status
      tracking throughout the payment lifecycle. Use charges to accept bank
      payments with confidence knowing every transaction is protected.
    x-displayName: Charges
  - name: Payout
    description: >-
      Payouts represent transfers from Straddle to customer bank accounts.
      Create payouts to handle disbursements, process refunds, or manage
      marketplace settlements. Use payouts to send money quickly and securely
      with the most cost-effective rail automatically selected.
    x-displayName: Payouts
  - name: Funding Events
    description: >-
      Funding events represent all money movement between Straddle and an
      Account's external bank accounts. They are automatically generated when
      charges settle or payouts are initiated. Each event provides detailed
      tracking of settlement status, fee breakdowns, and reconciliation data
      across both incoming and outgoing transfers. Use funding events to monitor
      your platform's entire money movement lifecycle.
  - name: Payments
    description: >-
      Payments provide endpoints to filter both Charges and Payouts with
      multiple different parameters.
  - name: Organizations
    description: >-
      Organizations are a powerful feature in Straddle that allow you to manage
      multiple accounts under a single umbrella. This hierarchical structure is
      particularly useful for businesses with complex operations, multiple
      departments, or legally related entities.
  - name: Accounts
    description: >-
      Accounts represent businesses using Straddle through your platform. Each
      account must complete automated verification before processing payments.
      Use accounts to manage your users' payment capabilities, track
      verification status, and control access to features. Accounts can be
      instantly created in sandbox and require additional verification for
      production access.
  - name: Representatives
    description: >-
      Representatives are individuals who have legal authority or significant
      responsibility within a business entity associated with a Straddle
      account. Each representative undergoes automated verification as part of
      KYC/KYB compliance. Use representatives to collect and verify beneficial
      owners, control persons, and authorized signers required for account
      onboarding. Representatives also determine who can legally operate the
      account and make important changes.
  - name: CapabilityRequests
    description: >-
      Capabilities enable specific features and services for an Account. Use
      capability requests to unlock higher processing limits, new payment types,
      or additional platform features as your users' businesses grow. Track
      approval status and manage documentation requirements through a single
      interface.
    x-displayName: Capabilities
  - name: LinkedBankAccounts
    description: >-
      Linked bank accounts connect your platform users' external bank accounts
      to Straddle for settlements and payment funding. Each linked account
      undergoes automated verification and continuous monitoring. Use linked
      accounts to manage where clients receive deposits, fund payouts, and track
      settlement preferences.
    x-displayName: Linked Bank Accounts
x-tagGroups:
  - name: Pay by Bank
    tags:
      - Customers
      - Bridge
      - Paykeys
      - Charge
      - Payout
      - Funding Events
      - Payments
  - name: Embed
    tags:
      - Organizations
      - Accounts
      - Representatives
      - LinkedBankAccounts
      - CapabilityRequests
paths:
  /v1/accounts/{account_id}:
    get:
      tags:
        - Accounts
      summary: Lookup an account
      description: >-
        Retrieves the details of an account that has previously been created.
        Supply the unique account ID that was returned from your previous
        request, and Straddle will return the corresponding account information.
      operationId: GetAccount
      parameters:
        - name: account_id
          in: path
          description: The unique identifier of the account to retrieve.
          required: true
          schema:
            type: string
            description: The unique identifier of the account to retrieve.
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const accountV1 = await client.embed.accounts.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(accountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            account_v1 = client.embed.accounts.get(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taccountV1, err := client.Embed.Accounts.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", accountV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            account_v1 =
            straddle.embed.accounts.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(account_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountGetParams parameters = new()
            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var accountV1 = await client.Embed.Accounts.Get(parameters);

            Console.WriteLine(accountV1);
        - lang: CLI
          source: |-
            straddle embed:accounts get \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid>
    put:
      tags:
        - Accounts
      summary: Update an account
      description: >-
        Updates an existing account's information. This endpoint allows you to
        update various account details during onboarding or after the account
        has been created.
      operationId: UpdateAccount
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateAccountV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const accountV1 = await client.embed.accounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                business_profile: { name: 'name', website: 'https://example.com' },
              });

              console.log(accountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            account_v1 = client.embed.accounts.update(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                business_profile={
                    "name": "name",
                    "website": "https://example.com",
                },
            )
            print(account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taccountV1, err := client.Embed.Accounts.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountUpdateParams{\n\t\t\tBusinessProfile: straddle.BusinessProfileV1Param{\n\t\t\t\tName:    \"name\",\n\t\t\t\tWebsite: \"https://example.com\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", accountV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            account_v1 = straddle.embed.accounts.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              business_profile: {name: "name", website: "https://example.com"}
            )

            puts(account_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountUpdateParams parameters = new()
            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                BusinessProfile = new()
                {
                    Name = "name",
                    Website = "https://example.com",
                    Address = new()
                    {
                        Address1 = "address1",
                        City = "city",
                        Line1 = "line1",
                        PostalCode = "21029-1360",
                        State = "SE",
                        Zip = "zip",
                        Address2 = "address2",
                        Country = "country",
                        Line2 = "line2",
                    },
                    Description = "description",
                    Industry = new()
                    {
                        Category = "category",
                        Mcc = "mcc",
                        Sector = "sector",
                    },
                    LegalName = "legal_name",
                    Phone = "+46991022",
                    SupportChannels = new()
                    {
                        Email = "dev@stainless.com",
                        Phone = "+46991022",
                        Url = "https://example.com",
                    },
                    TaxID = "210297980",
                    UseCase = "use_case",
                },
            };

            var accountV1 = await client.Embed.Accounts.Update(parameters);

            Console.WriteLine(accountV1);
        - lang: CLI
          source: |-
            straddle embed:accounts update \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --business-profile '{name: name, website: https://example.com}'
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "business_profile": {
                "name": "<string>",
                "website": "https://example.com"
              }
            }'
  /v1/accounts:
    post:
      tags:
        - Accounts
      summary: Create an account
      description: >-
        Creates a new account associated with your Straddle platform
        integration. This endpoint allows you to set up an account with
        specified details, including business information and access levels.
      operationId: CreateAccount
      parameters:
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateAccountV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateAccountV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const accountV1 = await client.embed.accounts.create({
                access_level: 'standard',
                account_type: 'business',
                business_profile: { name: 'name', website: 'https://example.com' },
                organization_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              });

              console.log(accountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            account_v1 = client.embed.accounts.create(
                access_level="standard",
                account_type="business",
                business_profile={
                    "name": "name",
                    "website": "https://example.com",
                },
                organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taccountV1, err := client.Embed.Accounts.New(context.TODO(), straddle.EmbedAccountNewParams{\n\t\tAccessLevel: straddle.EmbedAccountNewParamsAccessLevelStandard,\n\t\tAccountType: straddle.EmbedAccountNewParamsAccountTypeBusiness,\n\t\tBusinessProfile: straddle.BusinessProfileV1Param{\n\t\t\tName:    \"name\",\n\t\t\tWebsite: \"https://example.com\",\n\t\t},\n\t\tOrganizationID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", accountV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            account_v1 = straddle.embed.accounts.create(
              access_level: :standard,
              account_type: :business,
              business_profile: {name: "name", website: "https://example.com"},
              organization_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            )

            puts(account_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountCreateParams parameters = new()
            {
                AccessLevel = AccessLevel.Standard,
                AccountType = AccountType.Business,
                BusinessProfile = new()
                {
                    Name = "name",
                    Website = "https://example.com",
                    Address = new()
                    {
                        Address1 = "address1",
                        City = "city",
                        Line1 = "line1",
                        PostalCode = "21029-1360",
                        State = "SE",
                        Zip = "zip",
                        Address2 = "address2",
                        Country = "country",
                        Line2 = "line2",
                    },
                    Description = "description",
                    Industry = new()
                    {
                        Category = "category",
                        Mcc = "mcc",
                        Sector = "sector",
                    },
                    LegalName = "legal_name",
                    Phone = "+46991022",
                    SupportChannels = new()
                    {
                        Email = "dev@stainless.com",
                        Phone = "+46991022",
                        Url = "https://example.com",
                    },
                    TaxID = "210297980",
                    UseCase = "use_case",
                },
                OrganizationID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            };

            var accountV1 = await client.Embed.Accounts.Create(parameters);

            Console.WriteLine(accountV1);
        - lang: CLI
          source: |-
            straddle embed:accounts create \
              --api-key 'My API Key' \
              --access-level standard \
              --account-type business \
              --business-profile '{name: name, website: https://example.com}' \
              --organization-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts \
              --header 'Content-Type: application/json' \
              --data '{
              "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "account_type": "business",
              "business_profile": {
                "name": "<string>",
                "website": "https://example.com"
              },
              "access_level": "standard"
            }'
    get:
      tags:
        - Accounts
      summary: List accounts
      description: >-
        Returns a list of accounts associated with your Straddle platform
        integration. The accounts are returned sorted by creation date, with the
        most recently created accounts appearing first. This endpoint supports
        advanced sorting and filtering options.
      operationId: ListAccounts
      parameters:
        - name: page_number
          in: query
          description: 'Results page number. Starts at page 1. Default value: 1'
          required: false
          schema:
            type: integer
            description: 'Results page number. Starts at page 1. Default value: 1'
            format: int32
            default: 1
        - name: page_size
          in: query
          description: 'Page size. Default value: 100. Max value: 1000'
          required: false
          schema:
            type: integer
            description: 'Page size. Default value: 100. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          description: 'Sort By. Default value: ''id''.'
          required: false
          schema:
            type: string
            description: 'Sort By. Default value: ''id''.'
            default: id
        - name: sort_order
          in: query
          description: 'Sort Order. Default value: ''asc''.'
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort Order. Default value: ''asc''.'
            default: asc
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: search_text
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            enum:
              - created
              - onboarding
              - active
              - rejected
              - inactive
            type: string
        - name: type
          in: query
          schema:
            enum:
              - business
            type: string
        - name: external_id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const account of client.embed.accounts.list()) {
                console.log(account.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.embed.accounts.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Embed.Accounts.List(context.TODO(), straddle.EmbedAccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.embed.accounts.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountListParams parameters = new();

            var page = await client.Embed.Accounts.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle embed:accounts list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts
  /v1/accounts/{account_id}/onboard:
    post:
      tags:
        - Accounts
      summary: Onboard an account
      description: >-
        Initiates the onboarding process for a new account. This endpoint can
        only be used for accounts where at least one representative and one bank
        account have already been created.
      operationId: OnboardAccount
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnboardAccountV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/OnboardAccountV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/OnboardAccountV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const accountV1 = await client.embed.accounts.onboard('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                terms_of_service: { accepted_date: '2019-12-27T18:11:19.117Z', agreement_type: 'embedded' },
              });

              console.log(accountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_datetime

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            account_v1 = client.embed.accounts.onboard(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                terms_of_service={
                    "accepted_date": parse_datetime("2019-12-27T18:11:19.117Z"),
                    "agreement_type": "embedded",
                },
            )
            print(account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taccountV1, err := client.Embed.Accounts.Onboard(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountOnboardParams{\n\t\t\tTermsOfService: straddle.TermsOfServiceV1Param{\n\t\t\t\tAcceptedDate:  time.Now(),\n\t\t\t\tAgreementType: straddle.TermsOfServiceV1AgreementTypeEmbedded,\n\t\t\t\tAgreementURL:  straddle.String(\"agreement_url\"),\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", accountV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            account_v1 = straddle.embed.accounts.onboard(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              terms_of_service: {accepted_date: "2019-12-27T18:11:19.117Z", agreement_type: :embedded, agreement_url: "agreement_url"}
            )

            puts(account_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountOnboardParams parameters = new()
            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                TermsOfService = new()
                {
                    AcceptedDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
                    AgreementType = AgreementType.Embedded,
                    AgreementUrl = "agreement_url",
                    AcceptedIP = "accepted_ip",
                    AcceptedUserAgent = "accepted_user_agent",
                },
            };

            var accountV1 = await client.Embed.Accounts.Onboard(parameters);

            Console.WriteLine(accountV1);
        - lang: CLI
          source: |-
            straddle embed:accounts onboard \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --terms-of-service "{accepted_date: '2019-12-27T18:11:19.117Z', agreement_type: embedded, agreement_url: agreement_url}"
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid>/onboard \
              --header 'Content-Type: application/json' \
              --data '{
              "terms_of_service": {
                "accepted_date": "2019-12-27T18:11:19.117Z",
                "agreement_url": "<string>",
                "agreement_type": "embedded"
              }
            }'
  /v1/accounts/{account_id}/capability_requests:
    post:
      tags:
        - CapabilityRequests
      summary: Request a capability
      description: >-
        Submits a request to enable a specific capability for an account. Use
        this endpoint to request additional features or services for an account.
      operationId: CreateCapabilityRequest
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestCapabilityV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/RequestCapabilityV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RequestCapabilityV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const capabilityRequestPagedV1 = await client.embed.accounts.capabilityRequests.create(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              );

              console.log(capabilityRequestPagedV1.data);
            }

            main();
        - lang: Python
          source: >-
            import os

            from straddle import Straddle


            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )

            capability_request_paged_v1 =
            client.embed.accounts.capability_requests.create(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )

            print(capability_request_paged_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcapabilityRequestPagedV1, err := client.Embed.Accounts.CapabilityRequests.New(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountCapabilityRequestNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", capabilityRequestPagedV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            capability_request_paged_v1 =
            straddle.embed.accounts.capability_requests.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(capability_request_paged_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Accounts.CapabilityRequests;


            StraddleClient client = new();


            CapabilityRequestCreateParams parameters = new()

            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var capabilityRequestPagedV1 = await
            client.Embed.Accounts.CapabilityRequests.Create(parameters);


            Console.WriteLine(capabilityRequestPagedV1);
        - lang: CLI
          source: |-
            straddle embed:accounts:capability-requests create \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid>/capability_requests \
              --header 'Content-Type: application/json'
    get:
      tags:
        - CapabilityRequests
      summary: List capability requests
      description: >-
        Retrieves a list of capability requests associated with an account. The
        requests are returned sorted by creation date, with the most recent
        requests appearing first. This endpoint supports advanced sorting and
        filtering options.
      operationId: ListCapabilityRequests
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: type
          in: query
          description: Filter capability requests by the specific type of capability.
          schema:
            enum:
              - charges
              - payouts
              - individuals
              - businesses
              - signed_agreement
              - internet
            type: string
            description: Filter capability requests by the specific type of capability.
        - name: category
          in: query
          description: Filter capability requests by category.
          schema:
            enum:
              - payment_type
              - customer_type
              - consent_type
            type: string
            description: Filter capability requests by category.
        - name: status
          in: query
          description: Filter capability requests by their current status.
          schema:
            enum:
              - active
              - inactive
              - in_review
              - rejected
            type: string
            description: Filter capability requests by their current status.
        - name: page_number
          in: query
          description: Results page number. Starts at page 1.
          required: false
          schema:
            type: integer
            description: Results page number. Starts at page 1.
            format: int32
            default: 1
        - name: page_size
          in: query
          description: 'Page size.Max value: 1000'
          required: false
          schema:
            type: integer
            description: 'Page size. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          description: Sort By.
          required: false
          schema:
            type: string
            description: 'Sort By. Default value: ''id''.'
            default: id
        - name: sort_order
          in: query
          description: Sort Order.
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort Order. Default value: ''asc''.'
            default: asc
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfCapabilityRequestV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const capabilityRequest of client.embed.accounts.capabilityRequests.list(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              )) {
                console.log(capabilityRequest.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.embed.accounts.capability_requests.list(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Embed.Accounts.CapabilityRequests.List(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountCapabilityRequestListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            page =
            straddle.embed.accounts.capability_requests.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(page)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Accounts.CapabilityRequests;


            StraddleClient client = new();


            CapabilityRequestListParams parameters = new()

            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var page = await
            client.Embed.Accounts.CapabilityRequests.List(parameters);

            await foreach (var item in page.Paginate())

            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle embed:accounts:capability-requests list \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid>/capability_requests
  /v1/accounts/{account_id}/simulate:
    post:
      tags:
        - Accounts
      summary: Simulate status transitions for a sandbox account
      description: >-
        Simulate the status transitions for sandbox accounts. This endpoint can
        only be used for sandbox accounts.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: final_status
          in: query
          schema:
            enum:
              - onboarding
              - active
            type: string
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const accountV1 = await client.embed.accounts.simulate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(accountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            account_v1 = client.embed.accounts.simulate(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taccountV1, err := client.Embed.Accounts.Simulate(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedAccountSimulateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", accountV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            account_v1 =
            straddle.embed.accounts.simulate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(account_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Accounts;

            StraddleClient client = new();

            AccountSimulateParams parameters = new()
            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var accountV1 = await client.Embed.Accounts.Simulate(parameters);

            Console.WriteLine(accountV1);
        - lang: CLI
          source: |-
            straddle embed:accounts simulate \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/accounts/<uuid>/simulate
  /v1/linked_bank_accounts:
    post:
      tags:
        - LinkedBankAccounts
      summary: Create a linked bank account
      description: >-
        Creates a new linked bank account associated with a Straddle account.
        This endpoint allows you to associate external bank accounts with a
        Straddle account for various payment operations such as payment
        deposits, payout withdrawals, and more.
      operationId: CreateLinkedBankAccount
      parameters:
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLinkedBankAccountV1'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateLinkedBankAccountV1'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateLinkedBankAccountV1'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const linkedBankAccountV1 = await client.embed.linkedBankAccounts.create({
                account_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                bank_account: {
                  account_holder: 'account_holder',
                  account_number: 'account_number',
                  routing_number: 'xxxxxxxxx',
                },
              });

              console.log(linkedBankAccountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            linked_bank_account_v1 = client.embed.linked_bank_accounts.create(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                bank_account={
                    "account_holder": "account_holder",
                    "account_number": "account_number",
                    "routing_number": "xxxxxxxxx",
                },
            )
            print(linked_bank_account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlinkedBankAccountV1, err := client.Embed.LinkedBankAccounts.New(context.TODO(), straddle.EmbedLinkedBankAccountNewParams{\n\t\tAccountID: straddle.String(\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\"),\n\t\tBankAccount: straddle.EmbedLinkedBankAccountNewParamsBankAccount{\n\t\t\tAccountHolder: \"account_holder\",\n\t\t\tAccountNumber: \"account_number\",\n\t\t\tRoutingNumber: \"xxxxxxxxx\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", linkedBankAccountV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            linked_bank_account_v1 = straddle.embed.linked_bank_accounts.create(
              account_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              bank_account: {account_holder: "account_holder", account_number: "account_number", routing_number: "xxxxxxxxx"}
            )

            puts(linked_bank_account_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.LinkedBankAccounts;


            StraddleClient client = new();


            LinkedBankAccountCreateParams parameters = new()

            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                BankAccount = new()
                {
                    AccountHolder = "account_holder",
                    AccountNumber = "account_number",
                    RoutingNumber = "xxxxxxxxx",
                },
            };


            var linkedBankAccountV1 = await
            client.Embed.LinkedBankAccounts.Create(parameters);


            Console.WriteLine(linkedBankAccountV1);
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts create \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --bank-account '{account_holder: account_holder, account_number: account_number, routing_number: xxxxxxxxx}'
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts \
              --header 'Content-Type: application/json' \
              --data '{
              "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "bank_account": {
                "account_holder": "<string>",
                "routing_number": "<string>",
                "account_number": "<string>"
              }
            }'
    get:
      tags:
        - LinkedBankAccounts
      summary: List linked bank accounts
      description: >-
        Returns a list of bank accounts associated with a specific Straddle
        account. The linked bank accounts are returned sorted by creation date,
        with the most recently created appearing first. This endpoint supports
        pagination to handle accounts with multiple linked bank accounts.
      parameters:
        - name: account_id
          in: query
          description: The unique identifier of the related account.
          schema:
            type: string
            description: The unique identifier of the related account.
            format: uuid
        - name: page_number
          in: query
          description: Results page number. Starts at page 1.
          required: false
          schema:
            type: integer
            description: 'Results page number. Starts at page 1. Default value: 1'
            format: int32
            default: 1
        - name: page_size
          in: query
          description: 'Page size. Max value: 1000'
          required: false
          schema:
            type: integer
            description: 'Page size. Default value: 100. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          description: Sort By.
          required: false
          schema:
            type: string
            description: 'Sort By. Default value: ''id''.'
            default: id
        - name: sort_order
          in: query
          description: Sort Order.
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort Order. Default value: ''asc''.'
            default: asc
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: level
          in: query
          schema:
            enum:
              - account
              - platform
            type: string
        - name: purpose
          in: query
          description: >-
            The purpose of the linked bank accounts to return. Possible values:
            'charges', 'payouts', 'billing'.
          schema:
            enum:
              - charges
              - payouts
              - billing
            type: string
            description: >-
              The purpose of the linked bank accounts to return. Possible
              values: 'charges', 'payouts', 'billing'.
        - name: status
          in: query
          description: >-
            The status of the linked bank accounts to return. Possible values:
            'created', 'onboarding', 'active', 'inactive', 'rejected'.
          schema:
            enum:
              - created
              - onboarding
              - active
              - rejected
              - inactive
              - canceled
            type: string
            description: >-
              The status of the linked bank accounts to return. Possible values:
              'created', 'onboarding', 'active', 'inactive', 'rejected'.
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfLinkedBankAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfLinkedBankAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfLinkedBankAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const linkedBankAccount of client.embed.linkedBankAccounts.list()) {
                console.log(linkedBankAccount.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.embed.linked_bank_accounts.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Embed.LinkedBankAccounts.List(context.TODO(), straddle.EmbedLinkedBankAccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.embed.linked_bank_accounts.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.LinkedBankAccounts;

            StraddleClient client = new();

            LinkedBankAccountListParams parameters = new();

            var page = await client.Embed.LinkedBankAccounts.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts
  /v1/linked_bank_accounts/{linked_bank_account_id}:
    put:
      tags:
        - LinkedBankAccounts
      summary: Update a linked bank account
      description: >-
        Updates an existing linked bank account's information. This can be used
        to update account details during onboarding or to update metadata
        associated with the linked account. The linked bank account must be in
        'created' or 'onboarding' status.
      operationId: UpdateLinkedBankAccount
      parameters:
        - name: linked_bank_account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLinkedBankAccountV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateLinkedBankAccountV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateLinkedBankAccountV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const linkedBankAccountV1 = await client.embed.linkedBankAccounts.update(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                {
                  bank_account: {
                    account_holder: 'account_holder',
                    account_number: 'account_number',
                    routing_number: 'xxxxxxxxx',
                  },
                },
              );

              console.log(linkedBankAccountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            linked_bank_account_v1 = client.embed.linked_bank_accounts.update(
                linked_bank_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                bank_account={
                    "account_holder": "account_holder",
                    "account_number": "account_number",
                    "routing_number": "xxxxxxxxx",
                },
            )
            print(linked_bank_account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlinkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedLinkedBankAccountUpdateParams{\n\t\t\tBankAccount: straddle.EmbedLinkedBankAccountUpdateParamsBankAccount{\n\t\t\t\tAccountHolder: \"account_holder\",\n\t\t\t\tAccountNumber: \"account_number\",\n\t\t\t\tRoutingNumber: \"xxxxxxxxx\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", linkedBankAccountV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            linked_bank_account_v1 = straddle.embed.linked_bank_accounts.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              bank_account: {account_holder: "account_holder", account_number: "account_number", routing_number: "xxxxxxxxx"}
            )

            puts(linked_bank_account_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.LinkedBankAccounts;


            StraddleClient client = new();


            LinkedBankAccountUpdateParams parameters = new()

            {
                LinkedBankAccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                BankAccount = new()
                {
                    AccountHolder = "account_holder",
                    AccountNumber = "account_number",
                    RoutingNumber = "xxxxxxxxx",
                },
            };


            var linkedBankAccountV1 = await
            client.Embed.LinkedBankAccounts.Update(parameters);


            Console.WriteLine(linkedBankAccountV1);
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts update \
              --api-key 'My API Key' \
              --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --bank-account '{account_holder: account_holder, account_number: account_number, routing_number: xxxxxxxxx}'
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "bank_account": {
                "account_holder": "<string>",
                "routing_number": "<string>",
                "account_number": "<string>"
              }
            }'
    get:
      tags:
        - LinkedBankAccounts
      summary: Lookup a linked bank account
      description: >-
        Retrieves the details of a linked bank account that has previously been
        created. Supply the unique linked bank account `id`, and Straddle will
        return the corresponding information. The response includes masked
        account details for security purposes.
      operationId: GetLinkedBankAccount
      parameters:
        - name: linked_bank_account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const linkedBankAccountV1 = await client.embed.linkedBankAccounts.get(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              );

              console.log(linkedBankAccountV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            linked_bank_account_v1 = client.embed.linked_bank_accounts.get(
                linked_bank_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(linked_bank_account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlinkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedLinkedBankAccountGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", linkedBankAccountV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            linked_bank_account_v1 =
            straddle.embed.linked_bank_accounts.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(linked_bank_account_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.LinkedBankAccounts;


            StraddleClient client = new();


            LinkedBankAccountGetParams parameters = new()

            {
                LinkedBankAccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var linkedBankAccountV1 = await
            client.Embed.LinkedBankAccounts.Get(parameters);


            Console.WriteLine(linkedBankAccountV1);
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts get \
              --api-key 'My API Key' \
              --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts/<uuid>
  /v1/linked_bank_accounts/{linked_bank_account_id}/unmask:
    get:
      tags:
        - LinkedBankAccounts
      summary: Unmask a linked bank account
      description: >-
        Retrieves the unmasked details of a linked bank account that has
        previously been created. Supply the unique linked bank account `id`, and
        Straddle will return the corresponding information, including sensitive
        details. This endpoint needs to be enabled by Straddle for your account
        and should only be used when absolutely necessary.
      operationId: GetLinkedBankAccountUnmasked
      parameters:
        - name: linked_bank_account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountUnmaskV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountUnmaskV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountUnmaskV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const linkedBankAccountUnmaskV1 = await client.embed.linkedBankAccounts.unmask(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              );

              console.log(linkedBankAccountUnmaskV1.data);
            }

            main();
        - lang: Python
          source: >-
            import os

            from straddle import Straddle


            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )

            linked_bank_account_unmask_v1 =
            client.embed.linked_bank_accounts.unmask(
                linked_bank_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )

            print(linked_bank_account_unmask_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlinkedBankAccountUnmaskV1, err := client.Embed.LinkedBankAccounts.Unmask(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedLinkedBankAccountUnmaskParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", linkedBankAccountUnmaskV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            linked_bank_account_unmask_v1 =
            straddle.embed.linked_bank_accounts.unmask("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(linked_bank_account_unmask_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.LinkedBankAccounts;


            StraddleClient client = new();


            LinkedBankAccountUnmaskParams parameters = new()

            {
                LinkedBankAccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var linkedBankAccountUnmaskV1 = await
            client.Embed.LinkedBankAccounts.Unmask(parameters);


            Console.WriteLine(linkedBankAccountUnmaskV1);
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts unmask \
              --api-key 'My API Key' \
              --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts/<uuid>/unmask
  /v1/organizations:
    post:
      tags:
        - Organizations
      summary: Create an organization
      description: >-
        Creates a new organization related to your Straddle integration.
        Organizations can be used to group related accounts and manage
        permissions across multiple users.
      operationId: CreateOrganization
      parameters:
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const organizationV1 = await client.embed.organizations.create({ name: 'name' });

              console.log(organizationV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            organization_v1 = client.embed.organizations.create(
                name="name",
            )
            print(organization_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\torganizationV1, err := client.Embed.Organizations.New(context.TODO(), straddle.EmbedOrganizationNewParams{\n\t\tName: \"name\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", organizationV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            organization_v1 = straddle.embed.organizations.create(name: "name")

            puts(organization_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Organizations;


            StraddleClient client = new();


            OrganizationCreateParams parameters = new() { Name = "name" };


            var organizationV1 = await
            client.Embed.Organizations.Create(parameters);


            Console.WriteLine(organizationV1);
        - lang: CLI
          source: |-
            straddle embed:organizations create \
              --api-key 'My API Key' \
              --name name
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/organizations \
              --header 'Content-Type: application/json' \
              --data '{
              "name": "<string>"
            }'
    get:
      tags:
        - Organizations
      summary: List organizations
      description: >-
        Retrieves a list of organizations associated with your Straddle
        integration. The organizations are returned sorted by creation date,
        with the most recently created organizations appearing first. This
        endpoint supports advanced sorting and filtering options to help you
        find specific organizations.
      operationId: ListOrganizations
      parameters:
        - name: name
          in: query
          description: List organizations by name (partial match supported).
          schema:
            type: string
            description: List organizations by name (partial match supported).
        - name: external_id
          in: query
          description: List organizations by their external ID.
          schema:
            type: string
            description: List organizations by their external ID.
        - name: page_number
          in: query
          description: Results page number. Starts at page 1.
          required: false
          schema:
            type: integer
            description: Results page number. Starts at page 1.
            format: int32
            default: 1
        - name: page_size
          in: query
          description: 'Page size. Max value: 1000'
          required: false
          schema:
            type: integer
            description: 'Page size. Default value: 100. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          description: Sort By.
          required: false
          schema:
            type: string
            description: 'Sort By. Default value: ''id''.'
            default: id
        - name: sort_order
          in: query
          description: Sort Order.
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort Order. Default value: ''asc''.'
            default: asc
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfOrganizationV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfOrganizationV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfOrganizationV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const organization of client.embed.organizations.list()) {
                console.log(organization.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.embed.organizations.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Embed.Organizations.List(context.TODO(), straddle.EmbedOrganizationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.embed.organizations.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Organizations;

            StraddleClient client = new();

            OrganizationListParams parameters = new();

            var page = await client.Embed.Organizations.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle embed:organizations list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/organizations
  /v1/representatives:
    post:
      tags:
        - Representatives
      summary: Create a representative
      description: >-
        Creates a new representative associated with an account. Representatives
        are individuals who have legal authority or significant responsibility
        within the business.
      operationId: CreateRepresentative
      parameters:
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRepresentativeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateRepresentativeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateRepresentativeV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const representative = await client.embed.representatives.create({
                account_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                dob: '1980-01-01',
                email: 'ron.swanson@pawnee.com',
                first_name: 'first_name',
                last_name: 'last_name',
                mobile_number: '+12128675309',
                relationship: { control: true, owner: true, primary: true },
                ssn_last4: '1234',
              });

              console.log(representative.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            representative = client.embed.representatives.create(
                account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                dob=parse_date("1980-01-01"),
                email="ron.swanson@pawnee.com",
                first_name="first_name",
                last_name="last_name",
                mobile_number="+12128675309",
                relationship={
                    "control": True,
                    "owner": True,
                    "primary": True,
                },
                ssn_last4="1234",
            )
            print(representative.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\trepresentative, err := client.Embed.Representatives.New(context.TODO(), straddle.EmbedRepresentativeNewParams{\n\t\tAccountID:    \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tDob:          time.Now(),\n\t\tEmail:        \"ron.swanson@pawnee.com\",\n\t\tFirstName:    \"first_name\",\n\t\tLastName:     \"last_name\",\n\t\tMobileNumber: \"+12128675309\",\n\t\tRelationship: straddle.EmbedRepresentativeNewParamsRelationship{\n\t\t\tControl: true,\n\t\t\tOwner:   true,\n\t\t\tPrimary: true,\n\t\t},\n\t\tSsnLast4: \"1234\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", representative.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            representative = straddle.embed.representatives.create(
              account_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              dob: "1980-01-01",
              email: "ron.swanson@pawnee.com",
              first_name: "first_name",
              last_name: "last_name",
              mobile_number: "+12128675309",
              relationship: {control: true, owner: true, primary: true},
              ssn_last4: "1234"
            )

            puts(representative)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Representatives;


            StraddleClient client = new();


            RepresentativeCreateParams parameters = new()

            {
                AccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Dob = "1980-01-01",
                Email = "ron.swanson@pawnee.com",
                FirstName = "first_name",
                LastName = "last_name",
                MobileNumber = "+12128675309",
                Relationship = new()
                {
                    Control = true,
                    Owner = true,
                    Primary = true,
                    PercentOwnership = 0,
                    Title = "title",
                },
                SsnLast4 = "1234",
            };


            var representative = await
            client.Embed.Representatives.Create(parameters);


            Console.WriteLine(representative);
        - lang: CLI
          source: |-
            straddle embed:representatives create \
              --api-key 'My API Key' \
              --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --dob "'1980-01-01'" \
              --email ron.swanson@pawnee.com \
              --first-name first_name \
              --last-name last_name \
              --mobile-number +12128675309 \
              --relationship '{control: true, owner: true, primary: true}' \
              --ssn-last4 1234
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/representatives \
              --header 'Content-Type: application/json' \
              --data '{
              "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "first_name": "<string>",
              "last_name": "<string>",
              "dob": "2019-12-27",
              "ssn_last4": "1234",
              "email": "user@example.com",
              "mobile_number": "+12128675309",
              "relationship": {
                "primary": true,
                "control": true,
                "owner": true
              }
            }'
    get:
      tags:
        - Representatives
      summary: List representatives
      operationId: ListRepresentatives
      description: >-
        Returns a list of representatives associated with a specific account or
        organization. The representatives are returned sorted by creation date,
        with the most recently created representatives appearing first. This
        endpoint supports advanced sorting and filtering options.
      parameters:
        - name: account_id
          in: query
          description: The unique identifier of the account to list representatives for.
          schema:
            type: string
            description: The unique identifier of the account to list representatives for.
            format: uuid
        - name: page_number
          in: query
          description: Results page number. Starts at page 1.
          required: false
          schema:
            type: integer
            description: Results page number. Starts at page 1.
            format: int32
            default: 1
        - name: page_size
          in: query
          description: 'Page size. Max value: 1000'
          required: false
          schema:
            type: integer
            description: 'Page size. Default value: 100. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          description: Sort By.
          required: false
          schema:
            type: string
            description: 'Sort By. Default value: ''id''.'
            default: id
        - name: sort_order
          in: query
          description: Sort Order.
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort Order. Default value: ''asc''.'
            default: asc
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: platform_id
          in: query
          schema:
            type: string
            format: uuid
        - name: organization_id
          in: query
          schema:
            type: string
            format: uuid
        - name: level
          in: query
          schema:
            enum:
              - account
              - platform
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PagedResponseOfRepresentativeV1'
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfRepresentativeV1'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfRepresentativeV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const representative of client.embed.representatives.list()) {
                console.log(representative.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.embed.representatives.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Embed.Representatives.List(context.TODO(), straddle.EmbedRepresentativeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.embed.representatives.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Embed.Representatives;

            StraddleClient client = new();

            RepresentativeListParams parameters = new();

            var page = await client.Embed.Representatives.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle embed:representatives list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/representatives
  /v1/representatives/{representative_id}:
    put:
      tags:
        - Representatives
      summary: Update a representative
      operationId: UpdateRepresentative
      description: >-
        Updates an existing representative's information. This can be used to
        update personal details, contact information, or the relationship to the
        account or organization.
      parameters:
        - name: representative_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRepresentativeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateRepresentativeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateRepresentativeV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const representative = await client.embed.representatives.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                dob: '1980-01-01',
                email: 'ron.swanson@pawnee.com',
                first_name: 'Ron',
                last_name: 'Swanson',
                mobile_number: '+12128675309',
                relationship: { control: true, owner: true, primary: true },
                ssn_last4: '1234',
              });

              console.log(representative.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            representative = client.embed.representatives.update(
                representative_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                dob=parse_date("1980-01-01"),
                email="ron.swanson@pawnee.com",
                first_name="Ron",
                last_name="Swanson",
                mobile_number="+12128675309",
                relationship={
                    "control": True,
                    "owner": True,
                    "primary": True,
                },
                ssn_last4="1234",
            )
            print(representative.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\trepresentative, err := client.Embed.Representatives.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedRepresentativeUpdateParams{\n\t\t\tDob:          time.Now(),\n\t\t\tEmail:        \"ron.swanson@pawnee.com\",\n\t\t\tFirstName:    \"Ron\",\n\t\t\tLastName:     \"Swanson\",\n\t\t\tMobileNumber: \"+12128675309\",\n\t\t\tRelationship: straddle.EmbedRepresentativeUpdateParamsRelationship{\n\t\t\t\tControl: true,\n\t\t\t\tOwner:   true,\n\t\t\t\tPrimary: true,\n\t\t\t},\n\t\t\tSsnLast4: \"1234\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", representative.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            representative = straddle.embed.representatives.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              dob: "1980-01-01",
              email: "ron.swanson@pawnee.com",
              first_name: "Ron",
              last_name: "Swanson",
              mobile_number: "+12128675309",
              relationship: {control: true, owner: true, primary: true},
              ssn_last4: "1234"
            )

            puts(representative)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Representatives;


            StraddleClient client = new();


            RepresentativeUpdateParams parameters = new()

            {
                RepresentativeID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Dob = "1980-01-01",
                Email = "ron.swanson@pawnee.com",
                FirstName = "Ron",
                LastName = "Swanson",
                MobileNumber = "+12128675309",
                Relationship = new()
                {
                    Control = true,
                    Owner = true,
                    Primary = true,
                    PercentOwnership = 0,
                    Title = "title",
                },
                SsnLast4 = "1234",
            };


            var representative = await
            client.Embed.Representatives.Update(parameters);


            Console.WriteLine(representative);
        - lang: CLI
          source: |-
            straddle embed:representatives update \
              --api-key 'My API Key' \
              --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --dob "'1980-01-01'" \
              --email ron.swanson@pawnee.com \
              --first-name Ron \
              --last-name Swanson \
              --mobile-number +12128675309 \
              --relationship '{control: true, owner: true, primary: true}' \
              --ssn-last4 1234
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/representatives/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "first_name": "Ron",
              "last_name": "Swanson",
              "dob": "2019-12-27",
              "ssn_last4": "1234",
              "email": "user@example.com",
              "mobile_number": "+12128675309",
              "relationship": {
                "primary": true,
                "control": true,
                "owner": true
              }
            }'
    get:
      tags:
        - Representatives
      summary: Lookup a representative
      operationId: GetRepresentative
      description: >-
        Retrieves the details of an existing representative. Supply the unique
        representative ID, and Straddle will return the corresponding
        representative information.
      parameters:
        - name: representative_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const representative = await client.embed.representatives.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(representative.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            representative = client.embed.representatives.get(
                representative_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(representative.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\trepresentative, err := client.Embed.Representatives.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedRepresentativeGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", representative.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            representative =
            straddle.embed.representatives.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(representative)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Representatives;


            StraddleClient client = new();


            RepresentativeGetParams parameters = new()

            {
                RepresentativeID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var representative = await
            client.Embed.Representatives.Get(parameters);


            Console.WriteLine(representative);
        - lang: CLI
          source: |-
            straddle embed:representatives get \
              --api-key 'My API Key' \
              --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/representatives/<uuid>
  /v1/bridge/bank_account:
    post:
      tags:
        - Bridge
      summary: Bridge a bank account
      operationId: CreateBankAccountPaykey
      description: >-
        Use Bridge to create a new paykey using a bank routing and account
        number as the source. This endpoint allows you to create a secure
        payment token linked to a specific bank account.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountPaykeyV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const paykeyV1 = await client.bridge.link.bankAccount({
                account_number: 'account_number',
                account_type: 'checking',
                customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                routing_number: 'xxxxxxxxx',
              });

              console.log(paykeyV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.bridge.link.bank_account(
                account_number="account_number",
                account_type="checking",
                customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                routing_number="xxxxxxxxx",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Bridge.Link.BankAccount(context.TODO(), straddle.BridgeLinkBankAccountParams{\n\t\tAccountNumber: \"account_number\",\n\t\tAccountType:   straddle.BridgeLinkBankAccountParamsAccountTypeChecking,\n\t\tCustomerID:    \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tRoutingNumber: \"xxxxxxxxx\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            paykey_v1 = straddle.bridge.link.bank_account(
              account_number: "account_number",
              account_type: :checking,
              customer_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              routing_number: "xxxxxxxxx"
            )

            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Bridge.Link;

            StraddleClient client = new();

            LinkBankAccountParams parameters = new()
            {
                AccountNumber = "account_number",
                AccountType = AccountType.Checking,
                CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                RoutingNumber = "xxxxxxxxx",
            };

            var paykeyV1 = await client.Bridge.Link.BankAccount(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle bridge:link bank-account \
              --api-key 'My API Key' \
              --account-number account_number \
              --account-type checking \
              --customer-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --routing-number xxxxxxxxx
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/bank_account \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "routing_number": "<string>",
              "account_number": "<string>",
              "account_type": "checking"
            }'
  /v1/bridge/plaid:
    post:
      tags:
        - Bridge
      summary: Bridge a Plaid token
      operationId: CreatePlaidPaykey
      description: >-
        Use Bridge to create a new paykey using a Plaid token as the source.
        This endpoint allows you to create a secure payment token linked to a
        bank account authenticated through Plaid.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlaidPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreatePlaidPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreatePlaidPaykeyV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const paykeyV1 = await client.bridge.link.plaid({
                customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                plaid_token: 'plaid_token',
              });

              console.log(paykeyV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.bridge.link.plaid(
                customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                plaid_token="plaid_token",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Bridge.Link.Plaid(context.TODO(), straddle.BridgeLinkPlaidParams{\n\t\tCustomerID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tPlaidToken: \"plaid_token\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            paykey_v1 = straddle.bridge.link.plaid(
              customer_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              plaid_token: "plaid_token"
            )

            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Bridge.Link;

            StraddleClient client = new();

            LinkPlaidParams parameters = new()
            {
                CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                PlaidToken = "plaid_token",
            };

            var paykeyV1 = await client.Bridge.Link.Plaid(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle bridge:link plaid \
              --api-key 'My API Key' \
              --customer-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --plaid-token plaid_token
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/plaid \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "plaid_token": "<string>"
            }'
  /v1/bridge/initialize:
    post:
      tags:
        - Bridge
      summary: Create a Widget session token
      description: >-
        Use this endpoint to generate a session token for use in the Bridge
        widget.
      operationId: CreateBridgeToken
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBridgeTokenV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateBridgeTokenV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateBridgeTokenV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/BridgeTokenV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/BridgeTokenV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/BridgeTokenV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const bridgeTokenV1 = await client.bridge.initialize({
                customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              });

              console.log(bridgeTokenV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            bridge_token_v1 = client.bridge.initialize(
                customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(bridge_token_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbridgeTokenV1, err := client.Bridge.Initialize(context.TODO(), straddle.BridgeInitializeParams{\n\t\tCustomerID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", bridgeTokenV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            bridge_token_v1 = straddle.bridge.initialize_(customer_id:
            "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(bridge_token_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Bridge;

            StraddleClient client = new();

            BridgeInitializeParams parameters = new()
            {
                CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var bridgeTokenV1 = await client.Bridge.Initialize(parameters);

            Console.WriteLine(bridgeTokenV1);
        - lang: CLI
          source: |-
            straddle bridge initialize \
              --api-key 'My API Key' \
              --customer-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/initialize \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            }'
  /v1/customers/{id}:
    get:
      tags:
        - Customers
      summary: Lookup a customer
      description: >-
        Retrieves the details of an existing customer. Supply the unique
        customer ID that was returned from your 'create customer' request, and
        Straddle will return the corresponding customer information.
      operationId: GetCustomer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_v1 =
            straddle.customers.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(customer_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Customers;

            StraddleClient client = new();

            CustomerGetParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var customerV1 = await client.Customers.Get(parameters);

            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>
    put:
      tags:
        - Customers
      summary: Update a customer
      description: >-
        Updates an existing customer's information. This endpoint allows you to
        modify the customer's contact details, PII, and metadata.
      operationId: UpdateCustomer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                device: { ip_address: '192.168.1.1' },
                email: 'dev@stainlessapi.com',
                name: 'name',
                phone: '+46991022',
                status: 'pending',
              });

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.update(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                device={
                    "ip_address": "192.168.1.1"
                },
                email="dev@stainlessapi.com",
                name="name",
                phone="+46991022",
                status="pending",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerUpdateParams{\n\t\t\tDevice: straddle.DeviceUnmaskedV1Param{\n\t\t\t\tIPAddress: \"192.168.1.1\",\n\t\t\t},\n\t\t\tEmail:  \"dev@stainless.com\",\n\t\t\tName:   \"name\",\n\t\t\tPhone:  \"+46991022\",\n\t\t\tStatus: straddle.CustomerUpdateParamsStatusPending,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            customer_v1 = straddle.customers.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              device: {ip_address: "192.168.1.1"},
              email: "dev@stainless.com",
              name: "name",
              phone: "+46991022",
              status: :pending
            )

            puts(customer_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Customers;

            StraddleClient client = new();

            CustomerUpdateParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Device = new("192.168.1.1"),
                Email = "dev@stainless.com",
                Name = "name",
                Phone = "+46991022",
                Status = Status.Pending,
            };

            var customerV1 = await client.Customers.Update(parameters);

            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers update \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --device '{ip_address: 192.168.1.1}' \
              --email dev@stainless.com \
              --name name \
              --phone +46991022 \
              --status pending
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "name": "<string>",
              "email": "user@example.com",
              "phone": "<string>",
              "device": {
                "ip_address": "192.168.1.1"
              },
              "status": "pending"
            }'
    delete:
      tags:
        - Customers
      summary: Delete a customer
      description: >-
        Permanently removes a customer record from Straddle. This action cannot
        be undone and should only be used to satisfy regulatory requirements or
        for privacy compliance.
      operationId: DeleteCustomer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.delete(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.Delete(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_v1 =
            straddle.customers.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(customer_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Customers;

            StraddleClient client = new();

            CustomerDeleteParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var customerV1 = await client.Customers.Delete(parameters);

            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers delete \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request DELETE \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>
  /v1/customers:
    get:
      tags:
        - Customers
      summary: List customers
      description: >-
        Lists or searches customers connected to your account. All supported
        query parameters are optional. If none are provided, the response will
        include all customers connected to your account. This endpoint supports
        advanced sorting and filtering options.
      operationId: ListCustomers
      parameters:
        - name: page_number
          required: false
          in: query
          description: Page number for paginated results. Starts at 1.
          schema:
            type: integer
            description: Page number for paginated results. Starts at 1.
            format: int32
            default: '1'
        - name: page_size
          required: false
          in: query
          description: 'Number of results per page. Maximum: 1000.'
          schema:
            type: integer
            description: 'Number of results per page. Maximum: 1000.'
            format: int32
            default: '100'
        - name: sort_by
          required: false
          in: query
          schema:
            $ref: '#/components/schemas/CustomerSortByV1'
        - name: sort_order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: created_from
          in: query
          required: false
          description: Start date for filtering by `created_at` date.
          schema:
            type: string
            description: Start date for filtering by `created_at` date.
            format: date-time
        - name: created_to
          in: query
          description: End date for filtering by `created_at` date.
          schema:
            type: string
            description: End date for filtering by `created_at` date.
            format: date-time
        - name: name
          in: query
          description: Filter customers by `name` (partial match).
          schema:
            type: string
            description: Filter customers by `name` (partial match).
        - name: external_id
          in: query
          description: Filter by your system's `external_id`.
          schema:
            type: string
            description: Filter by your system's `external_id`.
        - name: email
          in: query
          description: Filter customers by `email` address.
          schema:
            type: string
            description: Filter customers by `email` address.
        - name: status
          in: query
          description: Filter customers by their current `status`.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/CustomerStatusV1'
            description: Filter customers by their current `status`.
        - name: search_text
          in: query
          description: General search term to filter customers.
          schema:
            type: string
            description: General search term to filter customers.
        - name: types
          in: query
          description: Filter by customer type `individual` or `business`.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/CustomerTypeV1'
            description: Filter by customer type `individual` or `business`.
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an `account_id` to set the scope of
            a request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerSummaryV1PagedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerSummaryV1PagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerSummaryV1PagedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const customer of client.customers.list()) {
                console.log(customer.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.customers.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Customers.List(context.TODO(), straddle.CustomerListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.customers.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Customers;

            StraddleClient client = new();

            CustomerListParams parameters = new();

            var page = await client.Customers.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle customers list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers
    post:
      tags:
        - Customers
      summary: Create a customer
      description: >-
        Creates a new customer record and automatically initiates identity,
        fraud, and risk assessment scores. This endpoint allows you to create a
        customer profile and associate it with paykeys and payments.
      operationId: CreateCustomer
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateCustomerV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.create({
                device: { ip_address: '192.168.1.1' },
                email: 'ron.swanson@pawnee.com',
                name: 'Ron Swanson',
                phone: '+12128675309',
                type: 'individual',
              });

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.create(
                device={
                    "ip_address": "192.168.1.1"
                },
                email="ron.swanson@pawnee.com",
                name="Ron Swanson",
                phone="+12128675309",
                type="individual",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.New(context.TODO(), straddle.CustomerNewParams{\n\t\tDevice: straddle.DeviceUnmaskedV1Param{\n\t\t\tIPAddress: \"192.168.1.1\",\n\t\t},\n\t\tEmail: \"ron.swanson@pawnee.com\",\n\t\tName:  \"Ron Swanson\",\n\t\tPhone: \"+12128675309\",\n\t\tType:  straddle.CustomerNewParamsTypeIndividual,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            customer_v1 = straddle.customers.create(
              device: {ip_address: "192.168.1.1"},
              email: "ron.swanson@pawnee.com",
              name: "Ron Swanson",
              phone: "+12128675309",
              type: :individual
            )

            puts(customer_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Customers = Straddle.Models.Customers;

            StraddleClient client = new();

            Customers::CustomerCreateParams parameters = new()
            {
                Device = new("192.168.1.1"),
                Email = "ron.swanson@pawnee.com",
                Name = "Ron Swanson",
                Phone = "+12128675309",
                Type = Customers::Type.Individual,
            };

            var customerV1 = await client.Customers.Create(parameters);

            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers create \
              --api-key 'My API Key' \
              --device '{ip_address: 192.168.1.1}' \
              --email ron.swanson@pawnee.com \
              --name 'Ron Swanson' \
              --phone +12128675309 \
              --type individual
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers \
              --header 'Content-Type: application/json' \
              --data '{
              "name": "Ron Swanson",
              "type": "individual",
              "email": "user@example.com",
              "phone": "+12128675309",
              "device": {
                "ip_address": "192.168.1.1"
              }
            }'
  /v1/customers/{id}/unmasked:
    get:
      tags:
        - Customers
      summary: Unmask customer data
      description: >-
        Retrieves the unmasked details, including PII, of an existing customer.
        Supply the unique customer ID that was returned from your 'create
        customer' request, and Straddle will return the corresponding customer
        information. This endpoint needs to be enabled by Straddle and should
        only be used when absolutely necessary.
      operationId: GetCustomerUnmasked
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerUnmaskedV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerUnmaskedV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerUnmaskedV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerUnmaskedV1 = await client.customers.unmasked('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(customerUnmaskedV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_unmasked_v1 = client.customers.unmasked(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(customer_unmasked_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerUnmaskedV1, err := client.Customers.Unmasked(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerUnmaskedParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerUnmaskedV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_unmasked_v1 =
            straddle.customers.unmasked("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(customer_unmasked_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Customers;


            StraddleClient client = new();


            CustomerUnmaskedParams parameters = new()

            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var customerUnmaskedV1 = await
            client.Customers.Unmasked(parameters);


            Console.WriteLine(customerUnmaskedV1);
        - lang: CLI
          source: |-
            straddle customers unmasked \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>/unmasked
  /v1/customers/{id}/review:
    get:
      tags:
        - Customers
      summary: Review a customer's identity results
      description: >-
        Retrieves and analyzes the results of a customer's identity validation
        and fraud score. This endpoint provides a comprehensive breakdown of the
        validation outcome, including:

        - Risk and correlation scores

        - Reason codes for the decision

        - Results of watchlist screening

        - Any network alerts detected

        Use this endpoint to gain insights into the verification process and
        make informed decisions about customer onboarding.
      operationId: GetCustomerReview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerReviewV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerReviewV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerReviewV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerReviewV1 = await client.customers.review.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(customerReviewV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_review_v1 = client.customers.review.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(customer_review_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerReviewV1, err := client.Customers.Review.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerReviewGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerReviewV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_review_v1 =
            straddle.customers.review.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(customer_review_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Customers.Review;


            StraddleClient client = new();


            ReviewGetParams parameters = new()

            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var customerReviewV1 = await
            client.Customers.Review.Get(parameters);


            Console.WriteLine(customerReviewV1);
        - lang: CLI
          source: |-
            straddle customers:review get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>/review
    patch:
      tags:
        - Customers
      summary: Update a customer's verification status
      description: >-
        Updates the status of a customer's identity decision. This endpoint
        allows you to modify the outcome of a customer risk screening and is
        useful for correcting or updating the status of a customer's
        verification. Note that this endpoint is only available for customers
        with a current status of `review`.
      operationId: UpdateCustomerReview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchCustomerReviewV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/PatchCustomerReviewV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PatchCustomerReviewV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.review.decision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                status: 'verified',
              });

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.review.decision(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                status="verified",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.Review.Decision(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerReviewDecisionParams{\n\t\t\tStatus: straddle.CustomerReviewDecisionParamsStatusVerified,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_v1 =
            straddle.customers.review.decision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            status: :verified)


            puts(customer_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Customers.Review;

            StraddleClient client = new();

            ReviewDecisionParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Status = Status.Verified,
            };

            var customerV1 = await client.Customers.Review.Decision(parameters);

            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers:review decision \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --status verified
        - lang: cURL
          source: |-
            curl --request PATCH \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>/review \
              --header 'Content-Type: application/json' \
              --data '{
              "status": "verified"
            }'
  /v1/paykeys/{id}:
    get:
      tags:
        - Paykeys
      summary: Lookup a paykey
      description: >-
        Retrieves the details of an existing paykey. Supply the unique paykey
        `id` and Straddle will return the corresponding paykey record ,
        including the `paykey` token value and masked bank account details.
      operationId: GetPaykey
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const paykeyV1 = await client.paykeys.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(paykeyV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.paykeys.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Paykeys.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            paykey_v1 =
            straddle.paykeys.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyGetParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var paykeyV1 = await client.Paykeys.Get(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle paykeys get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>
  /v1/paykeys/{id}/unmasked:
    get:
      tags:
        - Paykeys
      summary: Unmask a paykey
      description: >-
        Retrieves the unmasked details of an existing paykey. Supply the unique
        paykey `id` and Straddle will return the corresponding paykey record,
        including the unmasked bank account details. This endpoint needs to be
        enabled by Straddle for your account and should only be used when
        absolutely necessary.
      operationId: GetPaykeyUnmasked
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayKeyUnmaskedV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayKeyUnmaskedV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayKeyUnmaskedV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const paykeyUnmaskedV1 = await client.paykeys.unmasked('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(paykeyUnmaskedV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_unmasked_v1 = client.paykeys.unmasked(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(paykey_unmasked_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyUnmaskedV1, err := client.Paykeys.Unmasked(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyUnmaskedParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyUnmaskedV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            paykey_unmasked_v1 =
            straddle.paykeys.unmasked("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(paykey_unmasked_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyUnmaskedParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var paykeyUnmaskedV1 = await client.Paykeys.Unmasked(parameters);

            Console.WriteLine(paykeyUnmaskedV1);
        - lang: CLI
          source: |-
            straddle paykeys unmasked \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/unmasked
  /v1/paykeys:
    get:
      tags:
        - Paykeys
      summary: List paykeys
      description: >-
        Returns a list of paykeys associated with a Straddle account. This
        endpoint supports advanced sorting and filtering options.
      operationId: ListPaykeys
      parameters:
        - name: customer_id
          in: query
          required: false
          description: Filter paykeys by related customer ID.
          schema:
            type: string
            description: Filter paykeys by related customer ID.
            format: uuid
        - name: page_number
          required: false
          in: query
          description: Page number for paginated results. Starts at 1.
          schema:
            type: integer
            description: Page number for paginated results. Starts at 1.
            default: 1
            format: int32
        - name: page_size
          required: false
          in: query
          description: 'Number of results per page. Maximum: 1000.'
          schema:
            type: integer
            description: 'Number of results per page. Maximum: 1000.'
            format: int32
            default: 100
        - name: status
          in: query
          required: false
          description: Filter paykeys by their current status.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PaykeyStatusV1'
            description: Filter paykeys by their current status.
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PaykeySortByV1'
        - name: sort_order
          required: false
          in: query
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: source
          in: query
          description: Filter paykeys by their source.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PaykeySourceV1'
            description: Filter paykeys by their source.
        - name: unblock_eligible
          in: query
          description: >-
            Filter paykeys by unblock eligibility. When true, returns only
            blocked paykeys eligible for client-initiated unblocking (blocked
            due to R29 returns and not previously unblocked). When false,
            returns only blocked paykeys that are not eligible for unblocking.
          schema:
            type: boolean
            description: >-
              Filter paykeys by unblock eligibility. When true, returns only
              blocked paykeys eligible for client-initiated unblocking (blocked
              due to R29 returns and not previously unblocked). When false,
              returns only blocked paykeys that are not eligible for unblocking.
        - name: search_text
          in: query
          description: General search term to filter paykeys.
          schema:
            type: string
            description: General search term to filter paykeys.
        - name: created_from
          in: query
          description: Start date for filtering by creation date.
          schema:
            type: string
            description: Start date for filtering by creation date.
            format: date-time
        - name: created_to
          in: query
          description: End date for filtering by creation date.
          schema:
            type: string
            description: End date for filtering by creation date.
            format: date-time
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeySummaryV1PagedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeySummaryV1PagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeySummaryV1PagedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const paykey of client.paykeys.list()) {
                console.log(paykey.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.paykeys.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Paykeys.List(context.TODO(), straddle.PaykeyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.paykeys.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyListParams parameters = new();

            var page = await client.Paykeys.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle paykeys list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys
  /v1/reports/total_customers_by_status:
    post:
      tags:
        - Reports
      summary: ''
      description: ''
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TotalCustomersByStatusV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/TotalCustomersByStatusV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/TotalCustomersByStatusV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.reports.createTotalCustomersByStatus();

              console.log(response.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.reports.create_total_customers_by_status()
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Reports.NewTotalCustomersByStatus(context.TODO(), straddle.ReportNewTotalCustomersByStatusParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            response = straddle.reports.create_total_customers_by_status

            puts(response)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Reports;


            StraddleClient client = new();


            ReportCreateTotalCustomersByStatusParams parameters = new();


            var response = await
            client.Reports.CreateTotalCustomersByStatus(parameters);


            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle reports create-total-customers-by-status \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/reports/total_customers_by_status
  /v1/charges/{id}:
    get:
      tags:
        - Charge
      summary: Lookup a charge
      description: >-
        Retrieves the details of an existing charge. Supply the unique charge
        `id`, and Straddle will return the corresponding charge information.
      operationId: GetCharge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            charge_v1 =
            straddle.charges.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeGetParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var chargeV1 = await client.Charges.Get(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>
    put:
      tags:
        - Charge
      summary: Update a charge
      operationId: UpdateCharge
      description: >-
        Change the values of parameters associated with a charge prior to
        processing. The status of the charge must be `created`, `scheduled`, or
        `on_hold`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateChargeV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                amount: 0,
                description: 'Monthly subscription fee',
                payment_date: '2019-12-27',
              });

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.update(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                amount=0,
                description="Monthly subscription fee",
                payment_date=parse_date("2019-12-27"),
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeUpdateParams{\n\t\t\tAmount:      10000,\n\t\t\tDescription: straddle.String(\"Monthly subscription fee\"),\n\t\t\tPaymentDate: time.Now(),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            charge_v1 = straddle.charges.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              amount: 10000,
              description: "Monthly subscription fee",
              payment_date: "2019-12-27"
            )

            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeUpdateParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Amount = 10000,
                Description = "Monthly subscription fee",
                PaymentDate = "2019-12-27",
            };

            var chargeV1 = await client.Charges.Update(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges update \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --amount 10000 \
              --description 'Monthly subscription fee' \
              --payment-date "'2019-12-27'"
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "description": "Monthly subscription fee",
              "amount": "10000",
              "payment_date": "2019-12-27"
            }'
  /v1/charges:
    post:
      tags:
        - Charge
      summary: Create a charge
      operationId: CreateCharge
      description: >-
        Use charges to collect money from a customer for the sale of goods or
        services.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChargeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateChargeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateChargeV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.create({
                amount: 0,
                config: { balance_check: 'required' },
                consent_type: 'internet',
                currency: 'currency',
                description: 'Monthly subscription fee',
                device: { ip_address: '192.168.1.1' },
                external_id: 'external_id',
                paykey: 'paykey',
                payment_date: '2019-12-27',
              });

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.create(
                amount=0,
                config={
                    "balance_check": "required"
                },
                consent_type="internet",
                currency="currency",
                description="Monthly subscription fee",
                device={
                    "ip_address": "192.168.1.1"
                },
                external_id="external_id",
                paykey="paykey",
                payment_date=parse_date("2019-12-27"),
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n\t\"github.com/straddleio/straddle-go/shared\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.New(context.TODO(), straddle.ChargeNewParams{\n\t\tAmount: 10000,\n\t\tConfig: straddle.ChargeNewParamsConfig{\n\t\t\tBalanceCheck: \"required\",\n\t\t},\n\t\tConsentType: straddle.ChargeNewParamsConsentTypeInternet,\n\t\tCurrency:    \"currency\",\n\t\tDescription: straddle.String(\"Monthly subscription fee\"),\n\t\tDevice: shared.DeviceInfoV1Param{\n\t\t\tIPAddress: \"192.168.1.1\",\n\t\t},\n\t\tExternalID:  \"external_id\",\n\t\tPaykey:      \"paykey\",\n\t\tPaymentDate: time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            charge_v1 = straddle.charges.create(
              amount: 10000,
              config: {balance_check: :required},
              consent_type: :internet,
              currency: "currency",
              description: "Monthly subscription fee",
              device: {ip_address: "192.168.1.1"},
              external_id: "external_id",
              paykey: "paykey",
              payment_date: "2019-12-27"
            )

            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeCreateParams parameters = new()
            {
                Amount = 10000,
                Config = new()
                {
                    BalanceCheck = BalanceCheck.Required,
                    AutoHold = true,
                    AutoHoldMessage = "auto_hold_message",
                    SandboxOutcome = SandboxOutcome.Standard,
                },
                ConsentType = ConsentType.Internet,
                Currency = "currency",
                Description = "Monthly subscription fee",
                Device = new("192.168.1.1"),
                ExternalID = "external_id",
                Paykey = "paykey",
                PaymentDate = "2019-12-27",
            };

            var chargeV1 = await client.Charges.Create(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges create \
              --api-key 'My API Key' \
              --amount 10000 \
              --config '{balance_check: required}' \
              --consent-type internet \
              --currency currency \
              --description 'Monthly subscription fee' \
              --device '{ip_address: 192.168.1.1}' \
              --external-id external_id \
              --paykey paykey \
              --payment-date "'2019-12-27'"
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges \
              --header 'Content-Type: application/json' \
              --data '{
              "paykey": "<string>",
              "description": "Monthly subscription fee",
              "amount": "10000",
              "currency": "<string>",
              "payment_date": "2019-12-27",
              "consent_type": "internet",
              "device": {
                "ip_address": "192.168.1.1"
              },
              "external_id": "<string>",
              "config": {
                "balance_check": "required"
              }
            }'
  /v1/charges/{id}/hold:
    put:
      tags:
        - Charge
      summary: Hold a charge
      description: >-
        Place a charge on hold to prevent it from being originated for
        processing. The status of the charge must be `created` or `scheduled`.
      operationId: HoldCharge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.hold('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.hold(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.Hold(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeHoldParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            charge_v1 =
            straddle.charges.hold("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeHoldParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var chargeV1 = await client.Charges.Hold(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges hold \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/hold \
              --header 'Content-Type: application/json'
  /v1/charges/{id}/release:
    put:
      tags:
        - Charge
      summary: Release a charge
      description: >-
        Release a charge from an `on_hold` status to allow it to be rescheduled
        for processing.
      operationId: ReleaseCharge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.release('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.release(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.Release(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeReleaseParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            charge_v1 =
            straddle.charges.release("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeReleaseParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var chargeV1 = await client.Charges.Release(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges release \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/release \
              --header 'Content-Type: application/json'
  /v1/charges/{id}/cancel:
    put:
      tags:
        - Charge
      summary: Cancel a charge
      description: >-
        Cancel a charge to prevent it from being originated for processing. The
        status of the charge must be `created`, `scheduled`, or `on_hold`.
      operationId: CancelCharge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateChargeStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const chargeV1 = await client.charges.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(chargeV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            charge_v1 = client.charges.cancel(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(charge_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargeV1, err := client.Charges.Cancel(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeCancelParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargeV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            charge_v1 =
            straddle.charges.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(charge_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeCancelParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var chargeV1 = await client.Charges.Cancel(parameters);

            Console.WriteLine(chargeV1);
        - lang: CLI
          source: |-
            straddle charges cancel \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/cancel \
              --header 'Content-Type: application/json'
  /v1/funding_events:
    get:
      tags:
        - Funding Events
      summary: List funding events
      description: >-
        Retrieves a list of funding events for your account. This endpoint
        supports advanced sorting and filtering options.
      operationId: ListFundingEvents
      parameters:
        - name: page_number
          in: query
          required: false
          description: Results page number. Starts at page 1.
          schema:
            type: integer
            description: Results page number. Starts at page 1.
            format: int32
            default: 1
        - name: page_size
          in: query
          required: false
          description: 'Results page size. Max value: 1000'
          schema:
            type: integer
            description: 'Results page size. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/FundingEventSortByV1'
            description: The field to sort the results by.
            default: id
        - name: sort_order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
            description: The order in which to sort the results.
            default: asc
        - name: created_from
          in: query
          description: >-
            The start date of the range to filter by using the `YYYY-MM-DD`
            format.
          schema:
            type: string
            description: >-
              The start date of the range to filter by using the `YYYY-MM-DD`
              format.
            format: date
            nullable: true
        - name: created_to
          in: query
          description: >-
            The end date of the range to filter by using the `YYYY-MM-DD`
            format.
          schema:
            type: string
            description: >-
              The end date of the range to filter by using the `YYYY-MM-DD`
              format.
            format: date
            nullable: true
        - name: direction
          in: query
          schema:
            $ref: '#/components/schemas/TransferDirectionV1'
        - name: event_type
          in: query
          schema:
            $ref: '#/components/schemas/FundingEventTypeV1'
        - name: trace_number
          in: query
          description: Trace number.
          schema:
            type: string
            description: Trace number.
            nullable: true
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: search_text
          in: query
          description: Search text.
          schema:
            type: string
            description: Search text.
            nullable: true
        - name: status
          in: query
          description: Funding Event status.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PaymentStatusV1'
            description: Payment status.
            nullable: true
        - name: trace_id
          in: query
          description: Trace Id.
          schema:
            type: string
            description: Trace Id.
            nullable: true
        - name: status_reason
          in: query
          description: Reason for latest payment status change.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StatusReasonV1'
            description: Reason for latest payment status change.
            nullable: true
        - name: status_source
          in: query
          description: Source of latest payment status change.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StatusSourceV1'
            description: Source of latest payment status change.
            nullable: true
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1PagedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1PagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1PagedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const fundingEvent of client.fundingEvents.list()) {
                console.log(fundingEvent.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.funding_events.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FundingEvents.List(context.TODO(), straddle.FundingEventListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.funding_events.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.FundingEvents;

            StraddleClient client = new();

            FundingEventListParams parameters = new();

            var page = await client.FundingEvents.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle funding-events list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/funding_events
  /v1/funding_events/{id}:
    get:
      tags:
        - Funding Events
      summary: Lookup a funding event
      description: >-
        Retrieves the details of an existing funding event. Supply the unique
        funding event `id`, and Straddle will return the individual transaction
        items that make up the funding event.
      operationId: GetFundingEvent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/FundingEventSummaryV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const fundingEventSummaryItemV1 = await client.fundingEvents.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(fundingEventSummaryItemV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            funding_event_summary_item_v1 = client.funding_events.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(funding_event_summary_item_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfundingEventSummaryItemV1, err := client.FundingEvents.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.FundingEventGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fundingEventSummaryItemV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            funding_event_summary_item_v1 =
            straddle.funding_events.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(funding_event_summary_item_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.FundingEvents;


            StraddleClient client = new();


            FundingEventGetParams parameters = new()

            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var fundingEventSummaryItemV1 = await
            client.FundingEvents.Get(parameters);


            Console.WriteLine(fundingEventSummaryItemV1);
        - lang: CLI
          source: |-
            straddle funding-events get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/funding_events/<uuid>
  /v1/payments:
    get:
      tags:
        - Payments
      summary: Search payments
      description: >-
        Search for payments, including `charges` and `payouts`, using a variety
        of criteria. This endpoint supports advanced sorting and filtering
        options.
      operationId: ListPayments
      parameters:
        - name: page_number
          required: false
          in: query
          description: Results page number. Starts at page 1.
          schema:
            type: integer
            description: Results page number. Starts at page 1.
            format: int32
            default: 1
        - name: page_size
          in: query
          required: false
          description: 'Results page size. Max value: 1000'
          schema:
            type: integer
            description: 'Results page size. Max value: 1000'
            format: int32
            default: 100
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PaymentSortByV1'
        - name: sort_order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: payment_type
          in: query
          description: Search by the type of a `charge` or `payout`.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PaymentTypeV1'
            description: Payment type.
        - name: payment_status
          in: query
          description: Search by the status of a `charge` or `payout`.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PaymentStatusV1'
            description: Payment status.
        - name: payment_id
          in: query
          description: Search using the `id` of a `charge` or `payout`.
          schema:
            type: string
            description: Payment id.
            format: uuid
        - name: external_id
          in: query
          description: Search using the `external_id` of a `charge` or `payout`.
          schema:
            type: string
            description: External id.
        - name: customer_id
          in: query
          description: Search using the `customer_id` of a `charge` or `payout`.
          schema:
            type: string
            description: Customer id.
            format: uuid
        - name: paykey_id
          in: query
          description: Search using the `paykey_id` of a `charge` or `payout`.
          schema:
            type: string
            description: Paykey id.
            format: uuid
        - name: paykey
          in: query
          description: Search using the `paykey` of a `charge` or `payout`.
          schema:
            type: string
            description: Paykey.
        - name: min_amount
          in: query
          description: Search using the minimum `amount of a `charge` or `payout`.
          schema:
            type: integer
            description: Minimum amount.
            format: int32
        - name: max_amount
          in: query
          description: Search using a maximum `amount` of a `charge` or `payout`.
          schema:
            type: integer
            description: Maximum amount.
            format: int32
        - name: min_payment_date
          in: query
          description: Search using the earliest ` `of a `charge` or `payout`.
          schema:
            type: string
            description: Minimum payment date.
            format: date
        - name: max_payment_date
          in: query
          description: Search using the latest `payment_date` of a `charge` or `payout`.
          schema:
            type: string
            description: Maximum payment date.
            format: date
        - name: min_created_at
          in: query
          description: >-
            Search using the earliest `created_at` date of a `charge` or
            `payout`.
          schema:
            type: string
            description: Minimum created at.
            format: date-time
        - name: max_created_at
          in: query
          description: Search using the latest `created_at` date of a `charge` or `payout`.
          schema:
            type: string
            description: Maximum created at.
            format: date-time
        - name: min_effective_at
          in: query
          description: >-
            Search using the earliest `effective_date` of a `charge` or
            `payout`.
          schema:
            type: string
            description: Minimum effective at.
            format: date-time
        - name: max_effective_at
          in: query
          description: Search using the latest `effective_date` of a `charge` or `payout`.
          schema:
            type: string
            description: Maximum effective at.
            format: date-time
        - name: funding_id
          in: query
          description: Search using the `funding_id` of a `charge` or `payout`.
          schema:
            type: string
            description: Funding id.
            format: uuid
        - name: search_text
          in: query
          description: Search using a text string associated with a `charge` or `payout`.
          schema:
            type: string
            description: Search text.
        - name: default_page_size
          in: query
          schema:
            type: integer
            format: int32
        - name: default_sort
          in: query
          schema:
            $ref: '#/components/schemas/PaymentSortByV1'
        - name: default_sort_order
          in: query
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: status_reason
          in: query
          description: Reason for latest payment status change.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StatusReasonV1'
            description: Reason for latest payment status change.
        - name: status_source
          in: query
          description: Source of latest payment status change.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StatusSourceV1'
            description: Source of latest payment status change.
        - name: include_metadata
          in: query
          description: Include the metadata for payments in the returned data.
          schema:
            type: boolean
            description: Include the metadata for payments in the returned data.
        - name: is_refund
          in: query
          description: >-
            Is the payment a refund of an original charge (only applicable to
            payouts).
          schema:
            type: boolean
            description: >-
              Is the payment a refund of an original charge (only applicable to
              payouts).
        - name: has_refund
          in: query
          description: >-
            Has the payment been refunded by an associated payout (only
            applicable to charges).
          schema:
            type: boolean
            description: >-
              Has the payment been refunded by an associated payout (only
              applicable to charges).
        - name: is_resubmit
          in: query
          description: Is the payment a resubmit of an original payment.
          schema:
            type: boolean
            description: Is the payment a resubmit of an original payment.
        - name: has_resubmit
          in: query
          description: Has the payment been resubmitted.
          schema:
            type: boolean
            description: Has the payment been resubmitted.
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaymentSummaryV1PagedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSummaryV1PagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaymentSummaryV1PagedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              // Automatically fetches more pages as needed.
              for await (const payment of client.payments.list()) {
                console.log(payment.id);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.payments.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Payments.List(context.TODO(), straddle.PaymentListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            page = straddle.payments.list

            puts(page)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payments;

            StraddleClient client = new();

            PaymentListParams parameters = new();

            var page = await client.Payments.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
        - lang: CLI
          source: |-
            straddle payments list \
              --api-key 'My API Key'
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payments
  /v1/payouts/{id}:
    get:
      tags:
        - Payout
      summary: Lookup a payout
      description: >-
        Retrieves the details of an existing payout. Supply the unique payout
        `id` to retrieve the corresponding payout information.
      operationId: GetPayout
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            payout_v1 =
            straddle.payouts.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutGetParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var payoutV1 = await client.Payouts.Get(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>
    put:
      tags:
        - Payout
      summary: Update a payout
      description: >-
        Update the details of a payout prior to processing. The status of the
        payout must be `created`, `scheduled`, or `on_hold`.
      operationId: UpdatePayout
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
                amount: 0,
                description: 'description',
                payment_date: '2019-12-27',
              });

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.update(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                amount=0,
                description="description",
                payment_date=parse_date("2019-12-27"),
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutUpdateParams{\n\t\t\tAmount:      10000,\n\t\t\tDescription: straddle.String(\"description\"),\n\t\t\tPaymentDate: time.Now(),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            payout_v1 = straddle.payouts.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              amount: 10000,
              description: "description",
              payment_date: "2019-12-27"
            )

            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutUpdateParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Amount = 10000,
                Description = "description",
                PaymentDate = "2019-12-27",
            };

            var payoutV1 = await client.Payouts.Update(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts update \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --amount 10000 \
              --description description \
              --payment-date "'2019-12-27'"
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid> \
              --header 'Content-Type: application/json' \
              --data '{
              "description": "<string>",
              "amount": "10000",
              "payment_date": "2019-12-27"
            }'
  /v1/payouts:
    post:
      tags:
        - Payout
      summary: Create a payout
      description: Use payouts to send money to your customers.
      operationId: CreatePayout
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayoutV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreatePayoutV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreatePayoutV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.create({
                amount: 0,
                currency: 'currency',
                description: 'Vendor invoice payment',
                device: { ip_address: '192.168.1.1' },
                external_id: 'external_id',
                paykey: 'paykey',
                payment_date: '2019-12-27',
              });

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle
            from straddle._utils import parse_date

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.create(
                amount=0,
                currency="currency",
                description="Vendor invoice payment",
                device={
                    "ip_address": "192.168.1.1"
                },
                external_id="external_id",
                paykey="paykey",
                payment_date=parse_date("2019-12-27"),
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n\t\"github.com/straddleio/straddle-go/shared\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.New(context.TODO(), straddle.PayoutNewParams{\n\t\tAmount:      10000,\n\t\tCurrency:    \"currency\",\n\t\tDescription: straddle.String(\"Vendor invoice payment\"),\n\t\tDevice: shared.DeviceInfoV1Param{\n\t\t\tIPAddress: \"192.168.1.1\",\n\t\t},\n\t\tExternalID:  \"external_id\",\n\t\tPaykey:      \"paykey\",\n\t\tPaymentDate: time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            payout_v1 = straddle.payouts.create(
              amount: 10000,
              currency: "currency",
              description: "Vendor invoice payment",
              device: {ip_address: "192.168.1.1"},
              external_id: "external_id",
              paykey: "paykey",
              payment_date: "2019-12-27"
            )

            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutCreateParams parameters = new()
            {
                Amount = 10000,
                Currency = "currency",
                Description = "Vendor invoice payment",
                Device = new("192.168.1.1"),
                ExternalID = "external_id",
                Paykey = "paykey",
                PaymentDate = "2019-12-27",
            };

            var payoutV1 = await client.Payouts.Create(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts create \
              --api-key 'My API Key' \
              --amount 10000 \
              --currency currency \
              --description 'Vendor invoice payment' \
              --device '{ip_address: 192.168.1.1}' \
              --external-id external_id \
              --paykey paykey \
              --payment-date "'2019-12-27'"
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts \
              --header 'Content-Type: application/json' \
              --data '{
              "paykey": "<string>",
              "description": "Vendor invoice payment",
              "amount": "10000",
              "currency": "<string>",
              "payment_date": "2019-12-27",
              "device": {
                "ip_address": "192.168.1.1"
              },
              "external_id": "<string>"
            }'
  /v1/payouts/{id}/hold:
    put:
      tags:
        - Payout
      summary: Hold a payout
      description: >-
        Hold a payout to prevent it from being processed. The status of the
        payout must be `created`, `scheduled`, or `on_hold`.
      operationId: HoldPayout
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.hold('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { reason: 'reason' });

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.hold(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                reason="reason",
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.Hold(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutHoldParams{\n\t\t\tReason: \"reason\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            payout_v1 =
            straddle.payouts.hold("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            reason: "reason")


            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutHoldParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Reason = "reason",
            };

            var payoutV1 = await client.Payouts.Hold(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts hold \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --reason reason
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>/hold \
              --header 'Content-Type: application/json' \
              --data '{
              "reason": "<string>"
            }'
  /v1/payouts/{id}/release:
    put:
      tags:
        - Payout
      summary: Release a payout
      description: >-
        Release a payout from a `hold` status to allow it to be rescheduled for
        processing.
      operationId: ReleasePayout
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.release('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { reason: 'reason' });

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.release(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                reason="reason",
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.Release(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutReleaseParams{\n\t\t\tReason: \"reason\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            payout_v1 =
            straddle.payouts.release("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            reason: "reason")


            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutReleaseParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Reason = "reason",
            };

            var payoutV1 = await client.Payouts.Release(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts release \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --reason reason
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>/release \
              --header 'Content-Type: application/json' \
              --data '{
              "reason": "<string>"
            }'
  /v1/payouts/{id}/cancel:
    put:
      tags:
        - Payout
      summary: Cancel a payout
      description: >-
        Cancel a payout to prevent it from being processed. The status of the
        payout must be `created`, `scheduled`, or `on_hold`.
      operationId: CancelPayout
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutStatusV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const payoutV1 = await client.payouts.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { reason: 'reason' });

              console.log(payoutV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            payout_v1 = client.payouts.cancel(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                reason="reason",
            )
            print(payout_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpayoutV1, err := client.Payouts.Cancel(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutCancelParams{\n\t\t\tReason: \"reason\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payoutV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            payout_v1 =
            straddle.payouts.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            reason: "reason")


            puts(payout_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutCancelParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Reason = "reason",
            };

            var payoutV1 = await client.Payouts.Cancel(parameters);

            Console.WriteLine(payoutV1);
        - lang: CLI
          source: |-
            straddle payouts cancel \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --reason reason
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>/cancel \
              --header 'Content-Type: application/json' \
              --data '{
              "reason": "<string>"
            }'
  /v1/organizations/{organization_id}:
    get:
      tags:
        - Organizations
      summary: Retrieve organization details
      description: >-
        Retrieves the details of an Organization that has previously been
        created. Supply the unique organization ID that was returned from your
        previous request, and Straddle will return the corresponding
        organization information.
      operationId: GetOrganizationById
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfOrganizationV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const organizationV1 = await client.embed.organizations.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(organizationV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            organization_v1 = client.embed.organizations.get(
                organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(organization_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\torganizationV1, err := client.Embed.Organizations.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedOrganizationGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", organizationV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            organization_v1 =
            straddle.embed.organizations.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(organization_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Organizations;


            StraddleClient client = new();


            OrganizationGetParams parameters = new()

            {
                OrganizationID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var organizationV1 = await
            client.Embed.Organizations.Get(parameters);


            Console.WriteLine(organizationV1);
        - lang: CLI
          source: |-
            straddle embed:organizations get \
              --api-key 'My API Key' \
              --organization-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/organizations/<uuid>
  /v1/representatives/{representative_id}/unmask:
    get:
      tags:
        - Representatives
      summary: Retrieve unmasked representative details
      description: >-
        Retrieves the unmasked details of a representative that has previously
        been created. Supply the unique representative ID, and Straddle will
        return the corresponding representative information, including sensitive
        details. This endpoint requires additional authentication and should be
        used with caution.
      parameters:
        - name: representative_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfRepresentativeV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const representative = await client.embed.representatives.unmask('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(representative.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            representative = client.embed.representatives.unmask(
                representative_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(representative.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\trepresentative, err := client.Embed.Representatives.Unmask(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedRepresentativeUnmaskParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", representative.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            representative =
            straddle.embed.representatives.unmask("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(representative)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.Representatives;


            StraddleClient client = new();


            RepresentativeUnmaskParams parameters = new()

            {
                RepresentativeID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var representative = await
            client.Embed.Representatives.Unmask(parameters);


            Console.WriteLine(representative);
        - lang: CLI
          source: |-
            straddle embed:representatives unmask \
              --api-key 'My API Key' \
              --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/representatives/<uuid>/unmask
  /v1/paykeys/{id}/reveal:
    get:
      tags:
        - Paykeys
      summary: Retrieve an unmasked paykey token
      description: >-
        Retrieves the details of a paykey that has previously been created.
        Supply the unique paykey ID that was returned from your previous
        request, and Straddle will return the corresponding paykey information
        including the unmasked token.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.paykeys.reveal('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(response.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.paykeys.reveal(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Paykeys.Reveal(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyRevealParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            response =
            straddle.paykeys.reveal("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyRevealParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var response = await client.Paykeys.Reveal(parameters);

            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle paykeys reveal \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/reveal
  /v1/customers/{id}/refresh_review:
    put:
      tags:
        - Customers
      summary: Update a customer's identity decision
      description: >-
        Updates the decision of a customer's identity validation. This endpoint
        allows you to modify the outcome of a customer decision and is useful
        for correcting or updating the status of a customer's verification.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CustomerV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const customerV1 = await client.customers.refreshReview('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(customerV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            customer_v1 = client.customers.refresh_review(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(customer_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerV1, err := client.Customers.Review.RefreshReview(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.CustomerReviewRefreshReviewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            customer_v1 =
            straddle.customers.refresh_review("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(customer_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Customers.Review;


            StraddleClient client = new();


            ReviewRefreshReviewParams parameters = new()

            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var customerV1 = await
            client.Customers.Review.RefreshReview(parameters);


            Console.WriteLine(customerV1);
        - lang: CLI
          source: |-
            straddle customers:review refresh-review \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/customers/<uuid>/refresh_review
  /v1/bridge/tan:
    post:
      tags:
        - Bridge
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTanPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateTanPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateTanPaykeyV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.bridge.link.createTan({
                account_type: 'checking',
                customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                routing_number: 'routing_number',
                tan: 'tan',
              });

              console.log(response.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.bridge.link.create_tan(
                account_type="checking",
                customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                routing_number="routing_number",
                tan="tan",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Bridge.Link.NewTan(context.TODO(), straddle.BridgeLinkNewTanParams{\n\t\tAccountType:   straddle.BridgeLinkNewTanParamsAccountTypeChecking,\n\t\tCustomerID:    \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tRoutingNumber: \"routing_number\",\n\t\tTan:           \"tan\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            response = straddle.bridge.link.create_tan(
              account_type: :checking,
              customer_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              routing_number: "routing_number",
              tan: "tan"
            )

            puts(response)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Bridge.Link;

            StraddleClient client = new();

            LinkCreateTanParams parameters = new()
            {
                AccountType = LinkCreateTanParamsAccountType.Checking,
                CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                RoutingNumber = "routing_number",
                Tan = "tan",
            };

            var response = await client.Bridge.Link.CreateTan(parameters);

            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle bridge:link create-tan \
              --api-key 'My API Key' \
              --account-type checking \
              --customer-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --routing-number routing_number \
              --tan tan
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/tan \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "routing_number": "<string>",
              "tan": "<string>",
              "account_type": "checking"
            }'
  /v1/charges/{id}/unmask:
    get:
      tags:
        - Charge
      summary: Get a charge by id.
      description: ''
      operationId: ChargesUnmaskV1Get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeUnmaskedV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeUnmaskedV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeUnmaskedV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.charges.unmask('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(response.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.charges.unmask(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Charges.Unmask(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.ChargeUnmaskParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            response =
            straddle.charges.unmask("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Charges;

            StraddleClient client = new();

            ChargeUnmaskParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var response = await client.Charges.Unmask(parameters);

            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle charges unmask \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/unmask
  /v1/payouts/{id}/unmask:
    get:
      tags:
        - Payout
      summary: Get a payout by id.
      description: ''
      operationId: PayoutsUnmaskV1Get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutUnmaskedV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutUnmaskedV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutUnmaskedV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.payouts.unmask('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(response.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.payouts.unmask(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Payouts.Unmask(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PayoutUnmaskParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            response =
            straddle.payouts.unmask("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Payouts;

            StraddleClient client = new();

            PayoutUnmaskParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var response = await client.Payouts.Unmask(parameters);

            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle payouts unmask \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>/unmask
  /v1/paykeys/{id}/cancel:
    put:
      tags:
        - Paykeys
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CancelPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CancelPaykeyV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const paykeyV1 = await client.paykeys.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

              console.log(paykeyV1.data);
            }

            main();
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.paykeys.cancel(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Paykeys.Cancel(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyCancelParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )


            paykey_v1 =
            straddle.paykeys.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyCancelParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var paykeyV1 = await client.Paykeys.Cancel(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle paykeys cancel \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/cancel \
              --header 'Content-Type: application/json'
  /v1/bridge/quiltt:
    post:
      tags:
        - Bridge
      summary: Create a paykey from a Quiltt token
      description: >-
        Creates a new paykey using a Quiltt token as the source. This endpoint
        allows you to create a secure payment token linked to a bank account
        authenticated through Quiltt.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuilttPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateQuilttPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateQuilttPaykeyV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Straddle from '@straddlecom/straddle';

            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.bridge.link.createPaykey({
              customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              quiltt_token: 'quiltt_token',
            });

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.bridge.link.create_paykey(
                customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                quiltt_token="quiltt_token",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Bridge.Link.NewPaykey(context.TODO(), straddle.BridgeLinkNewPaykeyParams{\n\t\tCustomerID:  \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tQuilttToken: \"quiltt_token\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Ruby
          source: |-
            require "straddle"

            straddle = Straddle::Client.new(
              api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
              environment: "production" # defaults to "sandbox"
            )

            response = straddle.bridge.link.create_paykey(
              customer_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              quiltt_token: "quiltt_token"
            )

            puts(response)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Bridge.Link;

            StraddleClient client = new();

            LinkCreatePaykeyParams parameters = new()
            {
                CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                QuilttToken = "quiltt_token",
            };

            var response = await client.Bridge.Link.CreatePaykey(parameters);

            Console.WriteLine(response);
        - lang: CLI
          source: |-
            straddle bridge:link create-paykey \
              --api-key 'My API Key' \
              --customer-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --quiltt-token quiltt_token
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/quiltt \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "quiltt_token": "<string>"
            }'
  /v1/paykeys/{id}/review:
    patch:
      tags:
        - Paykeys
      summary: 'Update a paykey''s status '
      description: Update the status of a paykey when in review status
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchPaykeyReviewV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/PatchPaykeyReviewV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PatchPaykeyReviewV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Straddle from '@straddlecom/straddle';


            const client = new Straddle({
              apiKey: 'My API Key',
            });


            const paykeyV1 = await
            client.paykeys.review('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
            status: 'active' });


            console.log(paykeyV1.data);
        - lang: Python
          source: |-
            from straddle import Straddle

            client = Straddle(
                api_key="My API Key",
            )
            paykey_v1 = client.paykeys.review(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                status="active",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Paykeys.Review.Decision(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyReviewDecisionParams{\n\t\t\tStatus: straddle.PaykeyReviewDecisionParamsStatusActive,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: "My API Key",
              environment: "production" # defaults to "sandbox"
            )


            paykey_v1 =
            straddle.paykeys.review("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            status: :active)


            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys.Review;

            StraddleClient client = new();

            ReviewDecisionParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Status = Status.Active,
            };

            var paykeyV1 = await client.Paykeys.Review.Decision(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle paykeys:review decision \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --status active
        - lang: cURL
          source: |-
            curl --request PATCH \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/review \
              --header 'Content-Type: application/json' \
              --data '{
              "status": "active"
            }'
    get:
      tags:
        - Paykeys
      summary: Get paykey review details
      description: Get additional details about a paykey.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyReviewV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyReviewV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyReviewV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Straddle from '@straddlecom/straddle';


            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });


            const review = await
            client.paykeys.review.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(review.data);
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            review = client.paykeys.review.get(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(review.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\treview, err := client.Paykeys.Review.Get(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyReviewGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", review.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: "My API Key",
              environment: "production" # defaults to "sandbox"
            )


            review =
            straddle.paykeys.review.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(review)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys.Review;

            StraddleClient client = new();

            ReviewGetParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var review = await client.Paykeys.Review.Get(parameters);

            Console.WriteLine(review);
        - lang: CLI
          source: |-
            straddle paykeys:review get \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/review
  /v1/linked_bank_accounts/{linked_bank_account_id}/cancel:
    patch:
      tags:
        - LinkedBankAccounts
      summary: Cancel a linked bank account
      description: >-
        Cancels an existing linked bank account. This can be used to cancel a
        linked bank account before it has been reviewed. The linked bank account
        must be in 'created' status.
      parameters:
        - name: linked_bank_account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfLinkedBankAccountV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Straddle from '@straddlecom/straddle';


            const client = new Straddle({
              apiKey: 'My API Key',
            });


            const linkedBankAccountV1 = await
            client.embed.linkedBankAccounts.cancel(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );


            console.log(linkedBankAccountV1.data);
        - lang: Python
          source: |-
            from straddle import Straddle

            client = Straddle(
                api_key="My API Key",
            )
            linked_bank_account_v1 = client.embed.linked_bank_accounts.cancel(
                linked_bank_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(linked_bank_account_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlinkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Cancel(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.EmbedLinkedBankAccountCancelParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", linkedBankAccountV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: "My API Key",
              environment: "production" # defaults to "sandbox"
            )


            linked_bank_account_v1 =
            straddle.embed.linked_bank_accounts.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(linked_bank_account_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Embed.LinkedBankAccounts;


            StraddleClient client = new();


            LinkedBankAccountCancelParams parameters = new()

            {
                LinkedBankAccountID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var linkedBankAccountV1 = await
            client.Embed.LinkedBankAccounts.Cancel(parameters);


            Console.WriteLine(linkedBankAccountV1);
        - lang: CLI
          source: |-
            straddle embed:linked-bank-accounts cancel \
              --api-key 'My API Key' \
              --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PATCH \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/linked_bank_accounts/<uuid>/cancel
  /v1/bridge/speedchex:
    post:
      tags:
        - Bridge
      summary: Create a paykey from a Speedchex token
      description: >-
        Creates a new paykey using a Speedchex token as the source. This
        endpoint allows you to create a secure payment token linked to a bank
        account authenticated through Speedchex.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpeedchexPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateSpeedchexPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateSpeedchexPaykeyV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RevealPaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/bridge/speedchex \
              --header 'Content-Type: application/json' \
              --data '{
              "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "speedchex_token": "<string>"
            }'
  /v1/paykeys/{id}/refresh_review:
    put:
      tags:
        - Paykeys
      summary: Update a paykey's identity review decision
      description: >-
        Updates the decision of a paykey's review validation. This endpoint
        allows you to refresh the outcome of a paykey's decision and is useful
        for correcting or updating the status of a paykey's verification.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Straddle from '@straddlecom/straddle';


            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });


            const paykeyV1 = await
            client.paykeys.review.refreshReview('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(paykeyV1.data);
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.paykeys.review.refresh_review(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Paykeys.Review.RefreshReview(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyReviewRefreshReviewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: "My API Key",
              environment: "production" # defaults to "sandbox"
            )


            paykey_v1 =
            straddle.paykeys.review.refresh_review("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(paykey_v1)
        - lang: C#
          source: >-
            using System;

            using Straddle;

            using Straddle.Models.Paykeys.Review;


            StraddleClient client = new();


            ReviewRefreshReviewParams parameters = new()

            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };


            var paykeyV1 = await
            client.Paykeys.Review.RefreshReview(parameters);


            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle paykeys:review refresh-review \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/refresh_review
  /v1/paykeys/{id}/refresh_balance:
    put:
      tags:
        - Paykeys
      summary: Update a paykey's balance
      description: >-
        Updates the balance of a paykey. This endpoint allows you to refresh the
        balance of a paykey.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Straddle from '@straddlecom/straddle';


            const client = new Straddle({
              apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
            });


            const paykeyV1 = await
            client.paykeys.updateBalance('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(paykeyV1.data);
        - lang: Python
          source: |-
            import os
            from straddle import Straddle

            client = Straddle(
                api_key=os.environ.get("STRADDLE_API_KEY"),  # This is the default and can be omitted
            )
            paykey_v1 = client.paykeys.update_balance(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(paykey_v1.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/straddleio/straddle-go\"\n\t\"github.com/straddleio/straddle-go/option\"\n)\n\nfunc main() {\n\tclient := straddle.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpaykeyV1, err := client.Paykeys.UpdateBalance(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tstraddle.PaykeyUpdateBalanceParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", paykeyV1.Data)\n}\n"
        - lang: Ruby
          source: >-
            require "straddle"


            straddle = Straddle::Client.new(
              api_key: "My API Key",
              environment: "production" # defaults to "sandbox"
            )


            paykey_v1 =
            straddle.paykeys.update_balance("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(paykey_v1)
        - lang: C#
          source: |-
            using System;
            using Straddle;
            using Straddle.Models.Paykeys;

            StraddleClient client = new();

            PaykeyUpdateBalanceParams parameters = new()
            {
                ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            };

            var paykeyV1 = await client.Paykeys.UpdateBalance(parameters);

            Console.WriteLine(paykeyV1);
        - lang: CLI
          source: |-
            straddle paykeys update-balance \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
        - lang: cURL
          source: |-
            curl --request PUT \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/refresh_balance
  /v1/funding_events/simulate:
    post:
      tags:
        - Funding Events
      summary: Simulate a funding event in Sandbox.
      description: >-
        Simulate a funding event for testing. This endpoint can only be used in
        the sandbox environment.
      parameters:
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFundingEventV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateFundingEventV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateFundingEventV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CreateFundingEventV1ResponseItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFundingEventV1ResponseItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CreateFundingEventV1ResponseItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/funding_events/simulate \
              --header 'Content-Type: application/json' \
              --data '{
              "funding_event_job_type": "charges"
            }'
  /v1/paykeys/{id}/unblock:
    patch:
      tags:
        - Paykeys
      summary: Unblock a paykey
      description: >-
        Unblocks a paykey that was previously blocked due to an R29 return code.
        Only paykeys blocked with R29 returns that have not been previously
        unblocked are eligible.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnblockPaykeyV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/UnblockPaykeyV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UnblockPaykeyV1Request'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PaykeyV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request PATCH \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/paykeys/<uuid>/unblock \
              --header 'Content-Type: application/json'
  /v1/account_settings/{account_id}:
    get:
      tags:
        - AccountSettings
      summary: Get Settings
      description: >-
        Get all resolved settings for the specified account, including inherited
        values from organization, platform, and system defaults.
      operationId: GetSettings
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: request-id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: correlation-id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountSettingsV1'
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountSettingsV1'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponseOfAccountSettingsV1'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/HttpServiceResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/account_settings/<uuid>
  /v1/charges/{id}/resubmit:
    post:
      tags:
        - Charge
      summary: Resubmit a failed or reversed charge.
      description: ''
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResubmitChargeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/ResubmitChargeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ResubmitChargeV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ChargeV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/resubmit \
              --header 'Content-Type: application/json'
  /v1/charges/{id}/refund:
    post:
      tags:
        - Charge
      summary: Refund a paid charge.
      description: >-
        Issue a refund for a successfully paid charge. The refund is created as
        a new payout linked to the original charge through `related_payments`.
        The customer receives the funds back at the bank account they paid from.
        Each charge can be refunded once; partial and full refunds are both
        supported.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundChargeV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/RefundChargeV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RefundChargeV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/charges/<uuid>/refund \
              --header 'Content-Type: application/json' \
              --data '{
              "amount": 5000
            }'
  /v1/funding_event_payments/{id}:
    get:
      tags:
        - Funding Events
      summary: Search funding events payments.
      description: All the payments that made up the funding event
      operationId: FundingEventPaymentsGet
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page_number
          in: query
          description: 'Results page number. Starts at page 1. Default value: 1'
          schema:
            type: integer
            description: 'Results page number. Starts at page 1. Default value: 1'
            format: int32
        - name: page_size
          in: query
          description: 'Results page size. Default value: 100. Max value: 1000'
          schema:
            type: integer
            description: 'Results page size. Default value: 100. Max value: 1000'
            format: int32
        - name: include_metadata
          in: query
          description: Include the metadata for payments in the returned data.
          schema:
            type: boolean
            description: Include the metadata for payments in the returned data.
        - name: default_page_size
          in: query
          schema:
            type: integer
            format: int32
        - name: default_sort
          in: query
          schema:
            $ref: '#/components/schemas/FundingEventPaymentSortByV1'
        - name: default_sort_order
          in: query
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: sort_by
          in: query
          schema:
            $ref: '#/components/schemas/FundingEventPaymentSortByV1'
        - name: sort_order
          in: query
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/FundingEventPaymentV1PagedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/FundingEventPaymentV1PagedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/FundingEventPaymentV1PagedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/funding_event_payments/<uuid>
  /v1/payouts/{id}/resubmit:
    post:
      tags:
        - Payout
      summary: Resubmit a failed or reversed payout.
      description: ''
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Straddle-Account-Id
          in: header
          description: >-
            For use by platforms to specify an account id and set scope of a
            request.
          schema:
            type: string
            format: uuid
        - name: Request-Id
          in: header
          description: Optional client generated identifier to trace and debug a request.
          schema:
            type: string
        - name: Correlation-Id
          in: header
          description: >-
            Optional client generated identifier to trace and debug a series of
            requests.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Optional client generated value to use for idempotent requests.
          schema:
            maxLength: 40
            minLength: 10
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResubmitPayoutV1Request'
          text/json:
            schema:
              $ref: '#/components/schemas/ResubmitPayoutV1Request'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ResubmitPayoutV1Request'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PayoutV1ItemResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Failed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
              --url https://sandbox.straddle.com/v1/payouts/<uuid>/resubmit \
              --header 'Content-Type: application/json'
components:
  schemas:
    AccountV1:
      required:
        - organization_id
        - status
        - id
        - type
        - status_detail
        - access_level
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the account.
          format: uuid
        organization_id:
          type: string
          description: The unique identifier of the organization this account belongs to.
          format: uuid
        type:
          enum:
            - business
          type: string
          description: The type of account (e.g., 'individual', 'business').
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
          type: string
          description: >-
            The current status of the account (e.g., 'active', 'inactive',
            'pending').
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfAccountStatusDetail'
        business_profile:
          $ref: '#/components/schemas/BusinessProfileV1'
        capabilities:
          $ref: '#/components/schemas/Capabilities'
        settings:
          $ref: '#/components/schemas/Settings'
        terms_of_service:
          $ref: '#/components/schemas/TermsOfServiceV1'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the account in a structured format.
          nullable: true
        access_level:
          enum:
            - standard
            - managed
          type: string
          description: >-
            The access level granted to the account. This is determined by your
            platform configuration. Use `standard` unless instructed otherwise
            by Straddle.
        external_id:
          type: string
          description: >-
            Unique identifier for the account in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the account was created.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: Timestamp of the most recent update to the account.
          format: date-time
          nullable: true
      additionalProperties: false
    AddressV1:
      type: object
      nullable: true
      description: The address object is optional. If provided, it must be a valid address.
      properties:
        line1:
          type: string
          description: Primary address line (e.g., street, PO Box).
          nullable: true
        line2:
          type: string
          description: Secondary address line (e.g., apartment, suite, unit, or building).
          nullable: true
        city:
          type: string
          description: City, district, suburb, town, or village.
          nullable: true
        state:
          type: string
          description: Two-letter state code.
          pattern: ^[A-Z]{2}$
          nullable: true
        postal_code:
          type: string
          description: Postal or ZIP code.
          pattern: ^[0-9]{5}(-[0-9]{4})?$
          nullable: true
        country:
          type: string
          description: The country of the address, in ISO 3166-1 alpha-2 format.
          nullable: true
      additionalProperties: false
      required:
        - city
        - state
        - postal_code
        - line1
    BankAccountUnmaskV1:
      required:
        - institution_name
        - account_holder
        - routing_number
        - account_number
      type: object
      properties:
        institution_name:
          type: string
        account_holder:
          type: string
        routing_number:
          type: string
        account_number:
          type: string
      additionalProperties: false
    BankAccountV1:
      required:
        - institution_name
        - account_holder
        - routing_number
        - account_mask
      type: object
      properties:
        institution_name:
          type: string
        account_holder:
          type: string
        routing_number:
          type: string
        account_mask:
          type: string
      additionalProperties: false
    BankAccountV1Request:
      required:
        - account_holder
        - routing_number
        - account_number
      type: object
      properties:
        account_holder:
          type: string
          description: >-
            The name of the account holder as it appears on the bank account.
            Typically, this is the legal name of the business associated with
            the account.
        routing_number:
          type: string
          description: The routing number of the bank account.
          minLength: 9
          maxLength: 9
        account_number:
          type: string
          description: The bank account number.
      additionalProperties: false
    BusinessProfileV1:
      required:
        - website
        - name
      type: object
      properties:
        name:
          type: string
          description: The operating or trade name of the business.
        website:
          type: string
          format: uri
          description: URL of the business's primary marketing website.
        legal_name:
          type: string
          description: The official registered name of the business.
          nullable: true
        description:
          type: string
          description: A brief description of the business and its products or services.
          nullable: true
        use_case:
          type: string
          description: >-
            A description of how the business intends to use Straddle's
            services.
          nullable: true
        tax_id:
          type: string
          description: The business's tax identification number (e.g., EIN in the US).
          pattern: ^[0-9]{9}$
          nullable: true
        phone:
          type: string
          description: The primary contact phone number for the business.
          pattern: ^\+[1-9]\d{1,14}$
          nullable: true
        address:
          $ref: '#/components/schemas/AddressV1'
        industry:
          $ref: '#/components/schemas/IndustryV1'
        support_channels:
          $ref: '#/components/schemas/SupportChannelsV1'
      additionalProperties: false
    BusinessesV1:
      required:
        - enable
      type: object
      properties:
        enable:
          type: boolean
      additionalProperties: false
    Capabilities:
      required:
        - customer_types
        - consent_types
        - payment_types
      type: object
      properties:
        payment_types:
          $ref: '#/components/schemas/PaymentTypes'
        customer_types:
          $ref: '#/components/schemas/CustomerTypes'
        consent_types:
          $ref: '#/components/schemas/ConsentTypes'
      additionalProperties: false
    Capability:
      required:
        - capability_status
      type: object
      properties:
        capability_status:
          enum:
            - active
            - inactive
          type: string
      additionalProperties: false
    CapabilityRequestV1:
      required:
        - created_at
        - account_id
        - category
        - updated_at
        - status
        - id
        - type
        - enable
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the capability request.
          format: uuid
        account_id:
          type: string
          description: >-
            The unique identifier of the account associated with this capability
            request.
          format: uuid
        type:
          enum:
            - charges
            - payouts
            - individuals
            - businesses
            - signed_agreement
            - internet
          type: string
          description: The specific type of capability being requested within the category.
        category:
          enum:
            - payment_type
            - customer_type
            - consent_type
          type: string
          description: >-
            The category of the requested capability. Use `payment_type` for
            charges and payouts, `customer_type` to define `individuals` or
            `businesses`, and `consent_type` for `signed_agreement` or
            `internet` payment authorization.
        settings:
          type: object
          additionalProperties: {}
          description: >-
            Any specific settings or configurations related to the requested
            capability.
          nullable: true
        status:
          enum:
            - active
            - inactive
            - in_review
            - rejected
            - approved
            - reviewing
          type: string
          description: The current status of the capability request.
        created_at:
          type: string
          description: Timestamp of when the capability request was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the capability request.
          format: date-time
        enable:
          type: boolean
          description: >-
            Whether this capability request is to enable or disable the
            capability.
      additionalProperties: false
    Charges:
      required:
        - max_amount
        - monthly_amount
        - monthly_count
        - daily_amount
        - linked_bank_account_id
        - funding_time
      type: object
      properties:
        max_amount:
          type: integer
          format: int32
          description: The maximum amount of a single charge.
        monthly_amount:
          type: integer
          format: int32
          description: The maximum dollar amount of charges in a calendar month.
        daily_amount:
          type: integer
          format: int32
          description: The maximum dollar amount of charges in a calendar day.
        monthly_count:
          type: integer
          format: int32
          description: The maximum number of charges in a calendar month.
        funding_time:
          enum:
            - immediate
            - next_day
            - one_day
            - two_day
            - three_day
            - four_day
            - five_day
          type: string
          description: >-
            The amount of time it takes for a charge to be funded. This value is
            defined by Straddle.
        linked_bank_account_id:
          type: string
          format: uuid
          description: >-
            The unique identifier of the linked bank account associated with
            charges. This value is defined by Straddle.
      additionalProperties: false
    ChargesV1:
      required:
        - max_amount
        - monthly_amount
        - monthly_count
        - daily_amount
        - enable
      type: object
      properties:
        enable:
          type: boolean
          description: Determines whether `charges` are enabled for the account.
        max_amount:
          type: number
          format: double
          description: The maximum amount of a single charge.
        daily_amount:
          type: number
          format: double
          description: The maximum dollar amount of charges in a calendar day.
        monthly_count:
          type: integer
          format: int32
          description: The maximum number of charges in a calendar month.
        monthly_amount:
          type: number
          format: double
          description: The maximum dollar amount of charges in a calendar month.
      additionalProperties: false
    ConsentTypes:
      required:
        - internet
        - signed_agreement
      type: object
      properties:
        signed_agreement:
          $ref: '#/components/schemas/Capability'
          description: >-
            Whether the signed agreement payment authorization capability is
            enabled for the account.
        internet:
          $ref: '#/components/schemas/Capability'
          description: >-
            Whether the internet payment authorization capability is enabled for
            the account.
      additionalProperties: false
    CreateAccountV1Request:
      required:
        - business_profile
        - access_level
        - account_type
        - organization_id
      type: object
      properties:
        organization_id:
          type: string
          description: The unique identifier of the organization related to this account.
          format: uuid
        account_type:
          enum:
            - business
          type: string
          description: >-
            The type of account to be created. Currently, only `business` is
            supported.
        business_profile:
          $ref: '#/components/schemas/BusinessProfileV1'
        access_level:
          enum:
            - standard
            - managed
          type: string
          description: >-
            The access level granted to the account. This is determined by your
            platform configuration. Use `standard` unless instructed otherwise
            by Straddle.
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the account in a structured format.
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the account in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CreateOrganizationV1Request:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: The name of the organization.
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the organization in a structured
            format.
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the organization in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CreateRepresentativeV1Request:
      required:
        - dob
        - account_id
        - first_name
        - ssn_last4
        - last_name
        - email
        - relationship
        - mobile_number
      type: object
      properties:
        account_id:
          type: string
          description: >-
            The unique identifier of the account this representative is
            associated with.
          format: uuid
        first_name:
          type: string
          description: The first name of the representative.
        last_name:
          type: string
          description: The last name of the representative.
        dob:
          type: string
          description: >-
            Date of birth for the representative in ISO 8601 format
            (YYYY-MM-DD).
          format: date
          example: '1980-01-01'
        ssn_last4:
          type: string
          description: The last 4 digits of the representative's Social Security Number.
          pattern: ^[0-9]{4}$
          example: '1234'
        email:
          type: string
          description: The company email address of the representative.
          format: email
          example: ron.swanson@pawnee.com
        mobile_number:
          type: string
          description: The mobile phone number of the representative.
          pattern: ^\+[1-9]\d{1,14}$
          example: '+12128675309'
        relationship:
          $ref: '#/components/schemas/RelationshipV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the representative in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the represetative in a structured
            format.
          nullable: true
      additionalProperties: false
    CustomerTypes:
      required:
        - businesses
        - individuals
      type: object
      properties:
        individuals:
          $ref: '#/components/schemas/Capability'
        businesses:
          $ref: '#/components/schemas/Capability'
      additionalProperties: false
    ErrorDataDto:
      required:
        - detail
        - status
        - items
        - type
        - title
      type: object
      properties:
        status:
          type: integer
          format: int32
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItemDto'
      additionalProperties: false
    ErrorItemDto:
      required:
        - detail
        - reference
      type: object
      properties:
        reference:
          type: string
        detail:
          type: string
      additionalProperties: false
    HttpServiceResponse:
      required:
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Metadata'
        response_type:
          enum:
            - object
            - array
            - error
          type: string
        data:
          nullable: true
        error:
          $ref: '#/components/schemas/ErrorDataDto'
      additionalProperties: false
    IndividualsV1:
      required:
        - enable
      type: object
      properties:
        enable:
          type: boolean
      additionalProperties: false
    IndustryV1:
      type: object
      properties:
        mcc:
          type: string
          description: >-
            The Merchant Category Code (MCC) that best describes the business.
            Optional.
          nullable: true
        sector:
          type: string
          description: >-
            The specific sector within the industry category. Required if not
            providing MCC.
          nullable: true
        category:
          type: string
          description: The general category of the industry. Required if not providing MCC.
          nullable: true
      additionalProperties: false
    InternetV1:
      required:
        - enable
      type: object
      properties:
        enable:
          type: boolean
      additionalProperties: false
    ItemResponseOfAccountV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          $ref: '#/components/schemas/AccountV1'
      additionalProperties: false
    ItemResponseOfLinkedBankAccountUnmaskV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          $ref: '#/components/schemas/LinkedBankAccountUnmaskV1'
      additionalProperties: false
    ItemResponseOfLinkedBankAccountV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          $ref: '#/components/schemas/LinkedBankAccountV1'
      additionalProperties: false
    ItemResponseOfOrganizationV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          $ref: '#/components/schemas/OrganizationV1'
      additionalProperties: false
    ItemResponseOfRepresentativeV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          $ref: '#/components/schemas/RepresentativeV1'
      additionalProperties: false
    LinkedBankAccountUnmaskV1:
      required:
        - created_at
        - account_id
        - status
        - updated_at
        - id
        - bank_account
        - status_detail
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the linked bank account.
        account_id:
          type: string
          format: uuid
          description: >-
            Unique identifier for the Straddle account related to this bank
            account.
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
            - canceled
          type: string
          description: The current status of the linked bank account.
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfLinkedBankAccountStatusDetailEnum'
          description: >-
            Additional details about the current status of the linked bank
            account.
        bank_account:
          $ref: '#/components/schemas/BankAccountUnmaskV1'
          description: The bank account details associated with the linked bank account.
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          nullable: true
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the linked bank account was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the linked bank account was last updated.
      additionalProperties: false
    LinkedBankAccountV1:
      required:
        - created_at
        - account_id
        - status
        - updated_at
        - id
        - bank_account
        - status_detail
        - purposes
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the linked bank account.
          format: uuid
        account_id:
          type: string
          description: >-
            The unique identifier of the Straddle account related to this bank
            account.
          format: uuid
          nullable: true
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
            - canceled
          type: string
          description: The current status of the linked bank account.
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfLinkedBankAccountStatusDetailEnum'
        bank_account:
          $ref: '#/components/schemas/BankAccountV1'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the linked bank account in a structured
            format.
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the bank account object was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the linked bank account.
          format: date-time
        platform_id:
          type: string
          description: >-
            The unique identifier of the Straddle Platform relatd to this bank
            account.
          format: uuid
          nullable: true
        purposes:
          type: array
          items:
            enum:
              - charges
              - payouts
              - billing
            type: string
          description: The purposes for the linked bank account.
        description:
          type: string
          description: Optional description for the bank account.
          nullable: true
      additionalProperties: false
    Metadata:
      required:
        - api_request_timestamp
        - api_request_id
        - sort_by
        - sort_order
      type: object
      properties:
        api_request_id:
          type: string
          description: Unique identifier for this API request, useful for troubleshooting.
        api_request_timestamp:
          type: string
          description: Timestamp for this API request, useful for troubleshooting.
        page_number:
          type: integer
          format: int32
          nullable: true
          description: The page number to return results for.
        page_size:
          type: integer
          format: int32
          nullable: true
          description: The number of results to return per page.
        total_rows:
          type: integer
          format: int32
          nullable: true
          description: The total number of results available.
        sort_order:
          type: string
          description: The order in which to sort the results.
        sort_by:
          type: string
          description: The field to sort the results by.
      additionalProperties: false
    OnboardAccountV1Request:
      required:
        - terms_of_service
      type: object
      description: >-
        Object containing details regarding the acceptance of the Terms of
        Service.
      properties:
        terms_of_service:
          $ref: '#/components/schemas/TermsOfServiceV1'
      additionalProperties: false
    OrganizationV1:
      required:
        - id
        - updated_at
        - name
        - created_at
      type: object
      properties:
        id:
          type: string
          description: Straddle's unique identifier for the organization.
          format: uuid
        name:
          type: string
          description: The name of the organization.
        external_id:
          type: string
          description: >-
            Unique identifier for the organization in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the organization in a structured
            format.
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the organization was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the organization.
          format: date-time
      additionalProperties: false
    PagedResponseMetadata:
      required:
        - page_number
        - sort_by
        - sort_order
        - total_items
        - api_request_id
        - api_request_timestamp
        - max_page_size
        - total_pages
        - page_size
      type: object
      description: >-
        Metadata about the API request, including an identifier, timestamp, and
        pagination details.
      properties:
        api_request_id:
          type: string
          description: Unique identifier for this API request, useful for troubleshooting.
          format: uuid
        api_request_timestamp:
          type: string
          description: Timestamp for this API request, useful for troubleshooting.
          format: date-time
        total_items:
          type: integer
          format: int32
          description: Total number of items returned in this response.
        page_number:
          type: integer
          description: Page number for paginated results.
          format: int32
        page_size:
          type: integer
          description: Number of items per page in this response.
          format: int32
        max_page_size:
          type: integer
          description: Maximum allowed page size for this endpoint.
          format: int32
        sort_by:
          type: string
          description: The field that the results were sorted by.
        sort_order:
          $ref: '#/components/schemas/SortOrder'
        total_pages:
          type: integer
          description: The number of pages available.
          format: int32
      additionalProperties: false
    PagedResponseOfAccountV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountV1'
      additionalProperties: false
    PagedResponseOfCapabilityRequestV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          type: array
          items:
            $ref: '#/components/schemas/CapabilityRequestV1'
      additionalProperties: false
    PagedResponseOfLinkedBankAccountV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          type: array
          items:
            $ref: '#/components/schemas/LinkedBankAccountV1'
      additionalProperties: false
    PagedResponseOfOrganizationV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationV1'
      additionalProperties: false
    PagedResponseOfRepresentativeV1:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: >-
            Indicates the structure of the returned content.

            - "object" means the `data` field contains a single JSON object.

            - "array" means the `data` field contains an array of objects.

            - "error" means the `data` field contains an error object with
            details of the issue.

            - "none" means no data is returned.
        data:
          type: array
          items:
            $ref: '#/components/schemas/RepresentativeV1'
      additionalProperties: false
    PaymentTypes:
      required:
        - charges
        - payouts
      type: object
      properties:
        charges:
          $ref: '#/components/schemas/Capability'
        payouts:
          $ref: '#/components/schemas/Capability'
      additionalProperties: false
    Payouts:
      required:
        - max_amount
        - monthly_amount
        - monthly_count
        - daily_amount
        - linked_bank_account_id
        - funding_time
      type: object
      properties:
        max_amount:
          type: integer
          format: int32
          description: The maximum amount of a single payout.
        monthly_amount:
          type: integer
          format: int32
          description: The maximum dollar amount of payouts in a month.
        daily_amount:
          type: integer
          format: int32
          description: The maximum dollar amount of payouts in a day.
        monthly_count:
          type: integer
          format: int32
          description: The maximum number of payouts in a month.
        funding_time:
          enum:
            - immediate
            - next_day
            - one_day
            - two_day
            - three_day
            - four_day
            - five_day
          type: string
          description: >-
            The amount of time it takes for a payout to be funded. This value is
            defined by Straddle.
        linked_bank_account_id:
          type: string
          format: uuid
          description: The unique identifier of the linked bank account to use for payouts.
      additionalProperties: false
    PayoutsV1:
      required:
        - max_amount
        - monthly_amount
        - monthly_count
        - daily_amount
        - enable
      type: object
      properties:
        enable:
          type: boolean
          description: Determines whether `payouts` are enabled for the account.
        max_amount:
          type: number
          format: double
          description: The maximum amount of a single payout.
        daily_amount:
          type: number
          format: double
          description: The maximum dollar amount of payouts in a day.
        monthly_count:
          type: integer
          format: int32
          description: The maximum number of payouts in a month.
        monthly_amount:
          type: number
          format: double
          description: The maximum dollar amount of payouts in a month.
      additionalProperties: false
    Relationship:
      required:
        - owner
        - control
        - primary
      type: object
      properties:
        primary:
          type: boolean
          description: >-
            Whether the person is authorized as the primary representative of
            the account. This is the person chosen by the business to provide
            information about themselves, general information about the account,
            and who consented to the services agreement.

             There can be only one primary representative for an account at a time.
        control:
          type: boolean
          description: >-
            Whether the representative has significant responsibility to
            control, manage, or direct the organization. One representative must
            be identified under the control prong for each legal entity.
        owner:
          type: boolean
          description: >-
            Whether the representative owns any percentage of of the equity
            interests of the legal entity.
        percent_ownership:
          type: number
          format: double
          nullable: true
          description: >-
            The percentage of ownership the representative has. Required if
            'Owner' is true.
        title:
          type: string
          nullable: true
          description: The job title of the representative.
      additionalProperties: false
    RelationshipV1:
      required:
        - owner
        - control
        - primary
      type: object
      properties:
        primary:
          type: boolean
          description: >-
            Whether the person is authorized as the primary representative of
            the account. This is the person chosen by the business to provide
            information about themselves, general information about the account,
            and who consented to the services agreement. 

             There can be only one primary representative for an account at a time.
        control:
          type: boolean
          description: >-
            Whether the representative has significant responsibility to
            control, manage, or direct the organization. One representative must
            be identified under the control prong for each legal entity.
        owner:
          type: boolean
          description: >-
            Whether the representative owns any percentage of of the equity
            interests of the legal entity.
        percent_ownership:
          type: number
          description: >-
            The percentage of ownership the representative has. Required if
            'Owner' is true.
          format: double
          nullable: true
        title:
          type: string
          description: The job title of the representative.
          nullable: true
      additionalProperties: false
    RepresentativeV1:
      required:
        - dob
        - created_at
        - account_id
        - first_name
        - status
        - updated_at
        - ssn_last4
        - last_name
        - id
        - email
        - relationship
        - status_detail
        - mobile_number
        - name
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the representative.
          format: uuid
        account_id:
          type: string
          description: >-
            The unique identifier of the account this representative is
            associated with.
          format: uuid
        user_id:
          type: string
          description: >-
            The unique identifier of the user account associated with this
            representative, if applicable.
          format: uuid
          nullable: true
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
          type: string
          description: The current status of the representative.
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfRepresentativeStatusDetail'
        first_name:
          type: string
          description: The first name of the representative.
          example: Ron
        last_name:
          type: string
          description: The last name of the representative.
          example: Swanson
        dob:
          type: string
          description: >-
            The date of birth of the representative, in ISO 8601 format
            (YYYY-MM-DD).
          format: date
          example: '1980-01-01'
        ssn_last4:
          type: string
          description: The last 4 digits of the representative's Social Security Number.
          example: '1234'
        email:
          type: string
          description: The email address of the representative.
          format: email
          example: ron.swanson@pawnee.com
          nullable: true
        mobile_number:
          type: string
          description: The mobile phone number of the representative.
          pattern: ^\+[1-9]\d{1,14}$
          example: '+12128675309'
        relationship:
          $ref: '#/components/schemas/Relationship'
        external_id:
          type: string
          description: >-
            Unique identifier for the representative in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the representative was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the representative.
          format: date-time
        name:
          type: string
        phone:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the represetative in a structured
            format.
          nullable: true
      additionalProperties: false
    RequestCapabilityV1Request:
      type: object
      properties:
        charges:
          $ref: '#/components/schemas/ChargesV1'
          description: The charges capability settings for the account.
        payouts:
          $ref: '#/components/schemas/PayoutsV1'
          description: The payouts capability settings for the account.
        internet:
          $ref: '#/components/schemas/InternetV1'
          description: >-
            Allows the account to accept payments authorized via the internet or
            mobile applications.
        individuals:
          $ref: '#/components/schemas/IndividualsV1'
          description: Allows the account to accept payments from individuals.
        businesses:
          $ref: '#/components/schemas/BusinessesV1'
          description: Allows the account to accept payments from businesses.
        signed_agreement:
          $ref: '#/components/schemas/SignedAgreementV1'
          description: >-
            Allows the account to accept payments authorized by signed
            agreements or contracts.
      additionalProperties: false
    ResponseMetadata:
      required:
        - api_request_id
        - api_request_timestamp
      type: object
      description: Metadata about the API request, including an identifier and timestamp.
      properties:
        api_request_id:
          type: string
          description: Unique identifier for this API request, useful for troubleshooting.
          format: uuid
        api_request_timestamp:
          type: string
          description: Timestamp for this API request, useful for troubleshooting.
          format: date-time
      additionalProperties: false
    Settings:
      required:
        - charges
        - payouts
      type: object
      properties:
        charges:
          $ref: '#/components/schemas/Charges'
        payouts:
          $ref: '#/components/schemas/Payouts'
      additionalProperties: false
    SignedAgreementV1:
      required:
        - enable
      type: object
      properties:
        enable:
          type: boolean
      additionalProperties: false
    StatusDetailOfAccountStatusDetail:
      required:
        - message
        - code
        - reason
        - source
      type: object
      properties:
        reason:
          enum:
            - unverified
            - in_review
            - pending
            - stuck
            - verified
            - failed_verification
            - disabled
            - terminated
            - new
          type: string
          description: >-
            A machine-readable identifier for the specific status, useful for
            programmatic handling.
        source:
          enum:
            - watchtower
          type: string
          description: >-
            Identifies the origin of the status change (e.g., `bank_decline`,
            `watchtower`). This helps in tracking the cause of status updates.
        code:
          type: string
          description: >-
            A machine-readable code for the specific status, useful for
            programmatic handling.
        message:
          type: string
          description: A human-readable message describing the current status.
      additionalProperties: false
    StatusDetailOfLinkedBankAccountStatusDetailEnum:
      required:
        - message
        - code
        - reason
        - source
      type: object
      properties:
        reason:
          enum:
            - unverified
            - in_review
            - pending
            - stuck
            - verified
            - failed_verification
            - disabled
            - new
          type: string
          description: >-
            A machine-readable identifier for the specific status, useful for
            programmatic handling.
        source:
          enum:
            - watchtower
          type: string
          description: >-
            Identifies the origin of the status change (e.g., `watchtower`).
            This helps in tracking the cause of status updates.
        code:
          type: string
          description: >-
            A machine-readable code for the specific status, useful for
            programmatic handling.
        message:
          type: string
          description: A human-readable message describing the current status.
      additionalProperties: false
    StatusDetailOfRepresentativeStatusDetail:
      required:
        - message
        - code
        - reason
        - source
      type: object
      properties:
        reason:
          enum:
            - unverified
            - in_review
            - pending
            - stuck
            - verified
            - failed_verification
            - disabled
            - new
          type: string
          description: >-
            A machine-readable identifier for the specific status, useful for
            programmatic handling.
        source:
          enum:
            - watchtower
          type: string
          description: >-
            Identifies the origin of the status change (e.g., `watchtower`).
            This helps in tracking the cause of status updates.
        code:
          type: string
          description: >-
            A machine-readable code for the specific status, useful for
            programmatic handling.
        message:
          type: string
          description: A human-readable message describing the current status.
      additionalProperties: false
    SupportChannelsV1:
      type: object
      properties:
        email:
          type: string
          description: The email address for customer support inquiries.
          format: email
          nullable: true
        phone:
          type: string
          description: The phone number for customer support.
          pattern: ^\+[1-9]\d{1,14}$
          nullable: true
        url:
          type: string
          description: The URL of the business's customer support page or contact form.
          format: uri
          nullable: true
      additionalProperties: false
    TermsOfServiceV1:
      required:
        - accepted_date
        - agreement_type
        - agreement_url
      type: object
      properties:
        accepted_date:
          type: string
          description: >-
            The datetime of when the terms of service were accepted, in ISO 8601
            format.
          format: date-time
        accepted_ip:
          type: string
          description: The IP address from which the terms of service were accepted.
          nullable: true
        accepted_user_agent:
          type: string
          description: >-
            The user agent string of the browser or application used to accept
            the terms.
          nullable: true
        agreement_url:
          type: string
          description: The URL where the full text of the accepted agreement can be found.
          nullable: true
        agreement_type:
          enum:
            - embedded
            - direct
          type: string
          description: >-
            The type or version of the agreement accepted. Use `embedded` unless
            your platform was specifically enabled for `direct` agreements.
          default: embedded
      additionalProperties: false
    UpdateAccountV1Request:
      required:
        - business_profile
      type: object
      properties:
        business_profile:
          $ref: '#/components/schemas/BusinessProfileV1'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the account in a structured format.
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the account in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    UpdateLinkedBankAccountV1Request:
      required:
        - bank_account
      type: object
      properties:
        bank_account:
          $ref: '#/components/schemas/BankAccountV1Request'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the linked bank account in a structured
            format.
          nullable: true
      additionalProperties: false
    UpdateRepresentativeV1Request:
      required:
        - dob
        - first_name
        - ssn_last4
        - last_name
        - email
        - relationship
        - mobile_number
      type: object
      properties:
        first_name:
          type: string
          description: The first name of the representative.
          example: Ron
        last_name:
          type: string
          description: The last name of the representative.
          example: Swanson
        dob:
          type: string
          description: >-
            The date of birth of the representative, in ISO 8601 format
            (YYYY-MM-DD).
          format: date
          example: '1980-01-01'
        ssn_last4:
          type: string
          description: The last 4 digits of the representative's Social Security Number.
          pattern: ^[0-9]{4}$
          example: '1234'
        email:
          type: string
          description: The email address of the representative.
          format: email
          example: ron.swanson@pawnee.com
        mobile_number:
          type: string
          description: The mobile phone number of the representative.
          pattern: ^\+[1-9]\d{1,14}$
          example: '+12128675309'
        relationship:
          $ref: '#/components/schemas/RelationshipV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the representative in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the represetative in a structured
            format.
          nullable: true
      additionalProperties: false
    AccountTypeV1:
      enum:
        - checking
        - savings
      type: string
    AddressV11:
      required:
        - state
        - address1
        - city
        - zip
      type: object
      description: >-
        An object containing the customer's address. This is optional, but if
        provided, all required fields must be present.
      nullable: true
      properties:
        address1:
          type: string
          description: Primary address line (e.g., street, PO Box).
          example: 123 Main St
          maxLength: 100
        address2:
          type: string
          description: Secondary address line (e.g., apartment, suite, unit, or building).
          example: Apt 1
          maxLength: 100
          nullable: true
        city:
          type: string
          description: City, district, suburb, town, or village.
          example: Anytown
          maxLength: 100
        state:
          type: string
          description: Two-letter state code.
          example: CA
          pattern: ^[A-Z]{2}$
        zip:
          type: string
          description: Zip or postal code.
          example: '12345'
          pattern: ^[0-9]{5}(-[0-9]{4})?$
      additionalProperties: false
    BridgeTokenV1:
      required:
        - bridge_token
      type: object
      properties:
        bridge_token:
          type: string
          description: JWT Token to use in the bridge widget.
      additionalProperties: false
    BridgeTokenV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/BridgeTokenV1'
      additionalProperties: false
    ComplianceProfileUnmaskedV1:
      oneOf:
        - type: object
          title: Individual Compliance Profile
          description: >-
            Individual PII data required to trigger Patriot Act compliant KYC
            verification.
          properties:
            ssn:
              type: string
              pattern: ^[0-9]{3}-[0-9]{2}-[0-9]{4}$
              description: >-
                Social Security Number (format XXX-XX-XXXX). Required for
                Patriot Act-compliant KYC verification.
              nullable: true
              example: 123-45-6789
            dob:
              type: string
              format: date
              description: >-
                Date of birth (YYYY-MM-DD). Required for Patriot Act-compliant
                KYC verification.
              nullable: true
              example: '1969-04-20'
          required:
            - ssn
            - dob
        - type: object
          title: Business Compliance Profile
          description: >-
            Business registration data required to trigger Patriot Act compliant
            KYB verification.
          properties:
            ein:
              type: string
              pattern: ^[0-9]{2}-[0-9]{7}$
              description: >-
                Employer Identification Number (format XX-XXXXXXX). Required for
                Patriot Act-compliant KYB verification.
              nullable: true
              example: 12-3456789
            legal_business_name:
              type: string
              description: >-
                Official registered business name as listed with the IRS. This
                value will be matched against the 'legal_business name'.
              nullable: true
              example: Acme Corp LLC
            website:
              type: string
              format: uri
              description: >-
                Official business website URL. Optional but recommended for
                enhanced KYB.
              nullable: true
              example: https://example.com
            representatives:
              type: array
              items:
                $ref: '#/components/schemas/RepresentativeV11'
              description: >-
                A list of people related to the company. Only valid where
                customer type is 'business'.
              nullable: true
          required:
            - ein
            - legal_business_name
    ComplianceProfileV1:
      oneOf:
        - type: object
          title: Individual Compliance Profile
          description: PII required to trigger Patriot Act compliant KYC verification.
          properties:
            dob:
              type: string
              format: date
              description: Masked date of birth in ****-**-** format.
              nullable: true
              example: '****-**-**'
            ssn:
              type: string
              description: Masked Social Security Number in the format ***-**-****.
              nullable: true
              example: '***-**-****'
          required:
            - dob
            - ssn
        - type: object
          title: Business Compliance Profile
          description: >-
            Business registration data required to trigger Patriot Act compliant
            KYB verification.
          properties:
            ein:
              type: string
              pattern: ^[0-9]{2}-[0-9]{7}$
              description: Masked Employer Identification Number in the format **-*******
              nullable: true
              example: '**-*******'
            legal_business_name:
              type: string
              description: >-
                The official registered name of the business. This name should
                be correlated with the `ein` value.
              nullable: true
              example: Acme Corp LLC
            website:
              type: string
              format: uri
              description: >-
                Official business website URL. Optional but recommended for
                enhanced KYB.
              nullable: true
              example: https://example.com
            representatives:
              type: array
              items:
                $ref: '#/components/schemas/RepresentativeV11'
              description: >-
                A list of people related to the company. Only valid where
                customer type is 'business'.
              nullable: true
          required:
            - ein
            - legal_business_name
    CreateBankAccountPaykeyV1Request:
      required:
        - account_type
        - routing_number
        - customer_id
        - account_number
      type: object
      properties:
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
        routing_number:
          type: string
          description: The routing number of the bank account.
          minLength: 9
          maxLength: 9
        account_number:
          type: string
          description: The bank account number.
        account_type:
          $ref: '#/components/schemas/AccountTypeV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CreateBridgeTokenV1Request:
      required:
        - customer_id
      type: object
      properties:
        customer_id:
          type: string
          description: >-
            The Straddle generated unique identifier of the `customer` to create
            a bridge token for.
          format: uuid
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CreateCustomerV1Request:
      required:
        - name
        - phone
        - device
        - email
        - type
      type: object
      properties:
        name:
          type: string
          description: Full name of the individual or business name.
          example: Ron Swanson
        type:
          $ref: '#/components/schemas/CustomerTypeV1'
        email:
          type: string
          description: The customer's email address.
          format: email
          example: ron.swanson@pawnee.com
        address:
          $ref: '#/components/schemas/AddressV11'
          description: >-
            An object containing the customer's address. **This is optional.**
            If used, all required fields must be present.
        phone:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: >-
            The customer's phone number in E.164 format. Mobile number is
            preferred.
          example: '+12128675309'
        compliance_profile:
          $ref: '#/components/schemas/ComplianceProfileUnmaskedV1'
          description: >-
            An object containing the customer's compliance profile. **This is
            optional.** If all required fields must be present for the
            appropriate customer type.
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          example: customer_123
          nullable: true
        device:
          $ref: '#/components/schemas/DeviceUnmaskedV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the customer in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/CustomerConfigurationV1'
      additionalProperties: false
      example:
        name: Ron Swanson
        type: individual
        email: ron.swanson@pawnee.com
        address:
          address1: 123 Main St
          city: Anytown
          state: CA
          zip: '94105'
        phone: '+12128675309'
        external_id: customer_123
        device:
          ip_address: 192.168.1.1
        metadata: {}
    CreatePlaidPaykeyV1Request:
      required:
        - plaid_token
        - customer_id
      type: object
      properties:
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
        plaid_token:
          type: string
          description: >-
            Plaid processor token generated by your application for use with the
            Straddle API.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CustomerIdentityV1:
      required:
        - created_at
        - updated_at
        - decision
        - review_id
        - breakdown
      type: object
      properties:
        review_id:
          type: string
          description: Unique identifier for the review.
          format: uuid
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        messages:
          type: object
          additionalProperties:
            type: string
          description: Dictionary of all messages from the customer verification process.
          nullable: true
        breakdown:
          type: object
          properties:
            address:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            email:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            fraud:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            phone:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            synthetic:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            business_identification:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            business_validation:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
            business_evaluation:
              $ref: '#/components/schemas/IdentityVerificationBreakdownV1'
          additionalProperties: false
          description: >-
            Detailed breakdown of the customer verification results, including
            decisions, risk scores, correlation score, and more.
        network_alerts:
          $ref: '#/components/schemas/IdentityVerificationAlertsV1'
        watch_list:
          $ref: '#/components/schemas/IdentityVerificationWatchlistV1'
        kyc:
          $ref: '#/components/schemas/KnowYourCustomerV1'
        created_at:
          type: string
          description: Timestamp of when the review was initiated.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the review.
          format: date-time
        reputation:
          $ref: '#/components/schemas/IdentityVerificationReputationV1'
      additionalProperties: false
    CustomerReviewV1:
      required:
        - customer_details
      type: object
      properties:
        customer_details:
          $ref: '#/components/schemas/CustomerV1'
        identity_details:
          $ref: '#/components/schemas/CustomerIdentityV1'
      additionalProperties: false
    CustomerReviewV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/CustomerReviewV1'
      additionalProperties: false
    CustomerSortByV1:
      enum:
        - name
        - created_at
      type: string
    CustomerStatus:
      enum:
        - pending
        - review
        - verified
        - inactive
        - rejected
      type: string
      default: verified
    CustomerReviewStatus:
      enum:
        - verified
        - rejected
      type: string
      description: The final status of the customer review.
      default: verified
    CustomerStatusV1:
      enum:
        - pending
        - review
        - verified
        - inactive
        - rejected
      type: string
      default: verified
    CustomerSummaryV1:
      required:
        - created_at
        - name
        - phone
        - updated_at
        - status
        - id
        - email
        - type
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the customer.
          format: uuid
        name:
          type: string
          description: Full name of the individual or business name.
        type:
          $ref: '#/components/schemas/CustomerTypeV1'
        email:
          type: string
          description: The customer's email address.
          format: email
        phone:
          type: string
          description: The customer's phone number in E.164 format.
          pattern: ^\+[1-9]\d{1,14}$
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        status:
          $ref: '#/components/schemas/CustomerStatusV1'
        created_at:
          type: string
          description: Timestamp of when the customer record was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the customer record.
          format: date-time
      additionalProperties: false
    CustomerSummaryV1PagedResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata1'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerSummaryV1'
      additionalProperties: false
    CustomerTypeV1:
      enum:
        - individual
        - business
      type: string
    CustomerUnmaskedV1:
      required:
        - created_at
        - name
        - phone
        - updated_at
        - status
        - id
        - email
        - type
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the customer.
          format: uuid
        name:
          type: string
          description: Full name of the individual or business name.
          example: Ron Swanson
        type:
          $ref: '#/components/schemas/CustomerTypeV1'
        email:
          type: string
          description: The customer's email address.
          format: email
          example: ron.swanson@pawnee.com
        phone:
          type: string
          description: The customer's phone number in E.164 format.
          example: '+12128675309'
          pattern: ^\+[1-9]\d{1,14}$
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        status:
          $ref: '#/components/schemas/CustomerStatusV1'
        created_at:
          type: string
          description: Timestamp of when the customer record was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the customer record.
          format: date-time
        address:
          $ref: '#/components/schemas/AddressV11'
        compliance_profile:
          $ref: '#/components/schemas/ComplianceProfileUnmaskedV1'
          nullable: true
        device:
          $ref: '#/components/schemas/DeviceUnmaskedV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the customer in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/CustomerConfigurationV1'
      additionalProperties: false
    CustomerUnmaskedV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/CustomerUnmaskedV1'
      additionalProperties: false
    CustomerV1:
      required:
        - created_at
        - name
        - phone
        - updated_at
        - status
        - id
        - email
        - type
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the customer.
          format: uuid
        name:
          type: string
          description: Full name of the individual or business name.
          example: Ron Swanson
        type:
          $ref: '#/components/schemas/CustomerTypeV1'
        email:
          type: string
          description: The customer's email address.
          format: email
          example: ron.swanson@pawnee.com
        phone:
          type: string
          description: The customer's phone number in E.164 format.
          pattern: ^\+[1-9]\d{1,14}$
          example: '+12128675309'
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        status:
          $ref: '#/components/schemas/CustomerStatusV1'
        created_at:
          type: string
          description: Timestamp of when the customer record was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the customer record.
          format: date-time
        address:
          $ref: '#/components/schemas/AddressV11'
          nullable: true
        compliance_profile:
          $ref: '#/components/schemas/ComplianceProfileV1'
          nullable: true
        device:
          $ref: '#/components/schemas/DeviceV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the customer in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/CustomerConfigurationV1'
      additionalProperties: false
    CustomerV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/CustomerV1'
      additionalProperties: false
    DeviceUnmaskedV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          minLength: 1
          type: string
          description: >-
            The customer's IP address at the time of profile creation. Use
            `0.0.0.0` to represent an offline customer registration.
          format: ipv4
          example: 192.168.1.1
      additionalProperties: false
    DeviceV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          minLength: 1
          type: string
          description: >-
            The customer's IP address at the time of profile creation. Use
            `0.0.0.0` to represent an offline customer registration.
          format: ipv4
          example: 192.168.1.1
      additionalProperties: false
    ErrorContent:
      required:
        - type
        - status
        - title
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code for the error.
          format: int32
        type:
          type: string
          description: Predefined general type of error (e.g. '/field_validation')
        title:
          type: string
          description: Generic message for this type of issue.
        detail:
          type: string
          description: Specific message regarding this exact request.
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
          description: Array of error objects with more specific details.
          nullable: true
      additionalProperties: false
    ErrorItem:
      required:
        - detail
      type: object
      properties:
        reference:
          type: string
          description: Identifier for the error (e.g., field name, error code).
          nullable: true
        detail:
          type: string
          description: Detailed description of the specific error.
      additionalProperties: false
    ErrorResponse:
      required:
        - error
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        error:
          $ref: '#/components/schemas/ErrorContent'
      additionalProperties: false
    IdentityDecisionV1:
      enum:
        - accept
        - reject
        - review
      type: string
    IdentityVerificationAlertsV1:
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        codes:
          type: array
          items:
            type: string
          description: List of specific result codes from the consortium alert screening.
          nullable: true
        alerts:
          type: array
          items:
            type: string
          description: Any alerts or flags raised during the consortium alert screening.
          nullable: true
      additionalProperties: false
    IdentityVerificationBreakdownV1:
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        codes:
          type: array
          items:
            type: string
          description: List of specific result codes from the fraud and risk screening.
          nullable: true
        risk_score:
          type: number
          description: >-
            Predicts the inherent risk associated with the customer for a given
            module. A higher score indicates a greater likelihood of fraud.
          format: double
          nullable: true
        correlation_score:
          type: number
          description: >-
            Represents the strength of the correlation between provided and
            known information. A higher score indicates a stronger correlation.
          format: double
          nullable: true
        correlation:
          $ref: '#/components/schemas/CorrelationBucketV1'
      additionalProperties: false
    IdentityVerificationWatchlistV1:
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        codes:
          type: array
          items:
            type: string
          description: Specific codes related to the Straddle watchlist screening results.
          nullable: true
        matched:
          type: array
          items:
            type: string
          description: Information about any matches found during screening.
          nullable: true
        matches:
          type: array
          items:
            $ref: '#/components/schemas/IdentityVerificationWatchlistMatchV1'
          description: Information about any matches found during screening.
          nullable: true
      additionalProperties: false
    KnowYourCustomerV1:
      required:
        - validations
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        codes:
          type: array
          items:
            type: string
          description: List of specific result codes from the KYC screening process.
          nullable: true
        validations:
          type: object
          properties:
            first_name:
              type: boolean
            last_name:
              type: boolean
            address:
              type: boolean
            city:
              type: boolean
            state:
              type: boolean
            zip:
              type: boolean
            phone:
              type: boolean
            dob:
              type: boolean
            ssn:
              type: boolean
            email:
              type: boolean
          additionalProperties: false
          description: >-
            Boolean values indicating the result of each validation in the KYC
            process.
      additionalProperties: false
    PagedResponseMetadata1:
      required:
        - page_number
        - sort_by
        - sort_order
        - total_items
        - api_request_id
        - api_request_timestamp
        - max_page_size
        - total_pages
        - page_size
      type: object
      properties:
        api_request_id:
          type: string
          description: Unique identifier for this API request, useful for troubleshooting.
          format: uuid
        api_request_timestamp:
          type: string
          description: Timestamp for this API request, useful for troubleshooting.
          format: date-time
        total_items:
          type: integer
          format: int32
        page_number:
          type: integer
          description: Page number for paginated results.
          format: int32
        page_size:
          type: integer
          description: Number of items per page in this response.
          format: int32
        max_page_size:
          type: integer
          description: Maximum allowed page size for this endpoint.
          format: int32
        sort_by:
          type: string
          description: The field that the results were sorted by.
        sort_order:
          $ref: '#/components/schemas/SortOrder'
        total_pages:
          type: integer
          description: The number of pages available.
          format: int32
      additionalProperties: false
    PatchCustomerReviewV1Request:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/CustomerReviewStatus'
      additionalProperties: false
    PayKeyUnmaskedV1:
      required:
        - created_at
        - status
        - label
        - updated_at
        - id
        - source
        - paykey
        - config
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
          nullable: true
        label:
          type: string
          description: Human-readable label used to represent this paykey in a UI.
        source:
          $ref: '#/components/schemas/PaykeySourceV1'
        institution_name:
          type: string
          description: Name of the financial institution.
          example: Bank of America
          nullable: true
        status:
          $ref: '#/components/schemas/PaykeyStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
        expires_at:
          type: string
          description: Expiration date and time of the paykey, if applicable.
          format: date-time
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the paykey was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the paykey.
          format: date-time
        paykey:
          type: string
          description: >-
            The tokenized paykey value. This value is used to create payments
            and should be stored securely.
        bank_data:
          $ref: '#/components/schemas/PaykeyBankDetailsUnmaskedV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        balance:
          $ref: '#/components/schemas/PaykeyBalanceDetailsV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    PayKeyUnmaskedV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/PayKeyUnmaskedV1'
      additionalProperties: false
    PaykeyBankDetailsUnmaskedV1:
      required:
        - account_type
        - routing_number
        - account_number
      type: object
      properties:
        routing_number:
          type: string
          description: The routing number of the bank account.
          minLength: 9
          maxLength: 9
          example: '021000021'
        account_number:
          type: string
          description: The bank account number
          example: '123456789'
        account_type:
          $ref: '#/components/schemas/AccountTypeV1'
      additionalProperties: false
    PaykeyBankDetailsV1:
      required:
        - account_type
        - routing_number
        - account_number
      type: object
      properties:
        routing_number:
          type: string
          description: The routing number of the bank account.
          minLength: 9
          maxLength: 9
          example: '021000021'
        account_number:
          type: string
          description: >-
            Bank account number. This value is masked by default for security
            reasons. Use the /unmask endpoint to access the unmasked value.
          example: '****1234'
        account_type:
          $ref: '#/components/schemas/AccountTypeV1'
      additionalProperties: false
    PaykeySortByV1:
      enum:
        - institution_name
        - expires_at
        - created_at
      type: string
    PaykeySourceV1:
      enum:
        - bank_account
        - straddle
        - mx
        - plaid
        - tan
        - quiltt
      type: string
    PaykeyStatusV1:
      enum:
        - pending
        - active
        - inactive
        - rejected
        - review
        - blocked
      type: string
      default: active
    PaykeySummaryV1:
      required:
        - created_at
        - status
        - label
        - updated_at
        - id
        - source
        - paykey
        - config
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
          nullable: true
        label:
          type: string
          description: >-
            Human-readable label that combines the bank name and masked account
            number to help easility represent this paykey in a UI
          example: Bank of America ****1234
        source:
          $ref: '#/components/schemas/PaykeySourceV1'
        institution_name:
          type: string
          description: Name of the financial institution.
          nullable: true
          example: Bank of America
        status:
          $ref: '#/components/schemas/PaykeyStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
        expires_at:
          type: string
          description: Expiration date and time of the paykey, if applicable.
          format: date-time
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the paykey was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the paykey.
          format: date-time
        bank_data:
          $ref: '#/components/schemas/PaykeyBankDetailsV1'
        paykey:
          type: string
          description: >-
            The tokenized paykey value. This value is used to create payments
            and should be stored securely.
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        unblock_eligible:
          type: boolean
          description: >-
            Indicates whether this paykey is eligible for client-initiated
            unblocking. Only present for blocked paykeys. True when blocked due
            to R29 returns and not previously unblocked, false otherwise. Null
            when paykey is not blocked.
          nullable: true
      additionalProperties: false
    PaykeySummaryV1PagedResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata1'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          type: array
          items:
            $ref: '#/components/schemas/PaykeySummaryV1'
      additionalProperties: false
    PaykeyV1:
      required:
        - created_at
        - status
        - label
        - updated_at
        - id
        - source
        - paykey
        - config
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
          nullable: true
        label:
          type: string
          description: Human-readable label used to represent this paykey in a UI.
        source:
          $ref: '#/components/schemas/PaykeySourceV1'
        institution_name:
          type: string
          description: Name of the financial institution.
          example: Bank of America
          nullable: true
        status:
          $ref: '#/components/schemas/PaykeyStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
        expires_at:
          type: string
          description: Expiration date and time of the paykey, if applicable.
          format: date-time
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the paykey was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the paykey.
          format: date-time
        paykey:
          type: string
          description: >-
            The tokenized paykey value. This value is used to create payments
            and should be stored securely.
        bank_data:
          $ref: '#/components/schemas/PaykeyBankDetailsV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        balance:
          $ref: '#/components/schemas/PaykeyBalanceDetailsV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        unblock_eligible:
          type: boolean
          description: >-
            Indicates whether this paykey is eligible for client-initiated
            unblocking. Only present for blocked paykeys. True when blocked due
            to R29 returns and not previously unblocked, false otherwise. Null
            when paykey is not blocked.
          nullable: true
      additionalProperties: false
    PaykeyV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/PaykeyV1'
      additionalProperties: false
    ResponseTypeEnum:
      enum:
        - object
        - array
        - error
        - none
      type: string
      description: >-
        Indicates the structure of the returned content.

        - "object" means the `data` field contains a single JSON object.

        - "array" means the `data` field contains an array of objects.

        - "error" means the `data` field contains an error object with details
        of the issue.

        - "none" means no data is returned.
    SortOrder:
      enum:
        - asc
        - desc
      type: string
      default: asc
    StatusDetailsV1:
      required:
        - message
        - reason
        - source
        - changed_at
      type: object
      properties:
        message:
          type: string
          description: A human-readable description of the current status.
          example: Bank account sucesfully validated
        reason:
          $ref: '#/components/schemas/StatusReasonV1'
        source:
          $ref: '#/components/schemas/StatusSourceV1'
        code:
          type: string
          description: The status code if applicable.
          nullable: true
        changed_at:
          type: string
          description: The time the status change occurred.
          format: date-time
      additionalProperties: false
    TotalCustomersByStatusV1:
      required:
        - pending
        - inactive
        - verified
        - rejected
        - review
      type: object
      properties:
        verified:
          type: integer
          format: int32
        pending:
          type: integer
          format: int32
        review:
          type: integer
          format: int32
        inactive:
          type: integer
          format: int32
        rejected:
          type: integer
          format: int32
      additionalProperties: false
    TotalCustomersByStatusV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/TotalCustomersByStatusV1'
      additionalProperties: false
    UpdateCustomerV1Request:
      required:
        - name
        - phone
        - status
        - device
        - email
      type: object
      properties:
        name:
          type: string
          description: The customer's full name or business name.
        email:
          type: string
          description: The customer's email address.
          format: email
        address:
          $ref: '#/components/schemas/AddressV11'
          description: >-
            An object containing the customer's address. This is optional, but
            if provided, all required fields must be present.
        phone:
          type: string
          description: The customer's phone number in E.164 format.
          pattern: ^\+[1-9]\d{1,14}$
        compliance_profile:
          $ref: '#/components/schemas/ComplianceProfileUnmaskedV1'
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        device:
          $ref: '#/components/schemas/DeviceUnmaskedV1'
        status:
          $ref: '#/components/schemas/CustomerStatus'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the customer in a structured format.
          nullable: true
      additionalProperties: false
    BalanceCheckOptionsV1:
      enum:
        - required
        - enabled
        - disabled
      type: string
    ChargeConfigurationV1:
      required:
        - balance_check
      type: object
      properties:
        balance_check:
          $ref: '#/components/schemas/BalanceCheckOptionsV1'
          description: >-
            Defines whether to check the customer's balance before processing
            the charge.
          default: enabled
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxPaymentOutcomeV1'
        auto_hold:
          type: boolean
          description: >-
            Defines whether to automatically place this charge on hold after
            being created.
          nullable: true
        auto_hold_message:
          type: string
          description: The reason the charge is being automatically held on creation.
          nullable: true
      additionalProperties: false
    ChargeV1:
      required:
        - consent_type
        - created_at
        - config
        - currency
        - status
        - updated_at
        - device
        - status_history
        - id
        - paykey
        - status_details
        - amount
        - description
        - payment_date
        - external_id
        - funding_ids
        - trace_ids
        - has_refund
        - has_resubmit
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the charge.
          format: uuid
        paykey:
          type: string
          description: Value of the `paykey` used for the charge.
        description:
          type: string
          description: An arbitrary description for the charge.
          example: Monthly subscription fee
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailV1'
          description: The payment rail that the charge will be processed through.
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
          description: Information about the paykey used for the charge.
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
          description: Information about the customer associated with the charge.
        amount:
          type: integer
          description: The amount of the charge in cents.
          format: int32
          example: '10000'
        currency:
          type: string
          description: The currency of the charge. Only USD is supported.
          default: USD
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For charges,
            this means the date you want the customer to be debited on.
          format: date
        consent_type:
          $ref: '#/components/schemas/ConsentTypeV1'
          description: >-
            The channel or mechanism through which the payment was authorized.
            Use `internet` for payments made online or through a mobile app and
            `signed` for signed agreements where there is a consent form or
            contract. Use `signed` for PDF signatures.
        device:
          $ref: '#/components/schemas/DeviceInfoV1'
          description: >-
            Information about the device used when the customer authorized the
            payment.
        external_id:
          type: string
          description: >-
            Unique identifier for the charge in your database. This value must
            be unique across all charges.
        config:
          $ref: '#/components/schemas/ChargeConfigurationV1'
          description: Configuration options for the charge.
        created_at:
          type: string
          description: Timestamp of when the charge was created.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: Timestamp of when the charge was last updated.
          format: date-time
          nullable: true
        processed_at:
          type: string
          description: >-
            Timestamp of when the charge was processed by Straddle and
            originated to the payment rail.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: >-
            Timestamp of when the charge was effective in the customer's bank
            account, otherwise known as the date on which the customer is
            debited.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
          description: The current status of the charge.
        status_details:
          $ref: '#/components/schemas/StatusDetailsV11'
          description: Additional details about the current status of the charge.
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryV1'
            description: A record of the charge's status changes over time.
          description: Status history.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the charge in a structured format.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentV1'
          description: Related payments.
          nullable: true
        has_refund:
          type: boolean
          description: Has the charge been refunded by an associated payout.
        is_resubmit:
          type: boolean
          description: Is the charge a resubmit of an original charge.
        has_resubmit:
          type: boolean
          description: Has the charge been resubmitted.
      additionalProperties: false
    ChargeV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/ChargeV1'
      additionalProperties: false
    ConsentTypeV1:
      enum:
        - internet
        - signed
      type: string
      description: >-
        The channel or mechanism through which the payment was authorized. Use
        `internet` for payments made online or through a mobile app and `signed`
        for signed agreements where there is a consent form or contract. Use
        `signed` for PDF signatures.
    CreateChargeV1Request:
      required:
        - consent_type
        - config
        - currency
        - device
        - paykey
        - amount
        - description
        - payment_date
        - external_id
      type: object
      properties:
        paykey:
          type: string
          description: Value of the `paykey` used for the charge.
        description:
          type: string
          description: An arbitrary description for the charge.
          example: Monthly subscription fee
          nullable: true
        amount:
          type: integer
          description: The amount of the charge in cents.
          format: int32
          example: '10000'
        currency:
          type: string
          description: The currency of the charge. Only USD is supported.
          default: USD
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For charges,
            this means the date you want the customer to be debited on.
          format: date
        consent_type:
          $ref: '#/components/schemas/ConsentTypeV1'
          description: >-
            The channel or mechanism through which the payment was authorized.
            Use `internet` for payments made online or through a mobile app and
            `signed` for signed agreements where there is a consent form or
            contract. Use `signed` for PDF signatures.
        device:
          $ref: '#/components/schemas/DeviceInfoV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the charge in your database. This value must
            be unique across all charges.
        config:
          $ref: '#/components/schemas/ChargeConfigurationV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the charge in a structured format.
          nullable: true
      additionalProperties: false
    CreatePayoutV1Request:
      required:
        - currency
        - device
        - paykey
        - amount
        - description
        - payment_date
        - external_id
      type: object
      properties:
        paykey:
          type: string
          description: Value of the `paykey` used for the payout.
        description:
          type: string
          description: An arbitrary description for the payout.
          example: Vendor invoice payment
          nullable: true
        amount:
          type: integer
          description: The amount of the payout in cents.
          format: int32
          example: '10000'
        currency:
          type: string
          description: The currency of the payout. Only USD is supported.
          default: USD
        payment_date:
          type: string
          description: >-
            The desired date on which the payout should be occur. For payouts,
            this means the date you want the funds to be sent from your bank
            account.
          format: date
        device:
          $ref: '#/components/schemas/DeviceInfoV1'
          description: >-
            Information about the device used when the customer authorized the
            payout.
        external_id:
          type: string
          description: >-
            Unique identifier for the payout in your database. This value must
            be unique across all payouts.
        config:
          $ref: '#/components/schemas/PayoutConfigurationV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the payout in a structured format.
          nullable: true
      additionalProperties: false
    CustomerDetailsV1:
      required:
        - name
        - phone
        - id
        - email
        - customer_type
      type: object
      description: Information about the customer associated with the charge or payout.
      properties:
        id:
          type: string
          description: Unique identifier for the customer
          format: uuid
        name:
          type: string
          description: The name of the customer
          example: Ron Swanson
        customer_type:
          $ref: '#/components/schemas/CustomerTypeV11'
          description: The type of customer
        email:
          type: string
          description: The customer's email address
          example: ron@swanson.com
        phone:
          type: string
          description: The customer's phone number in E.164 format
          example: '+1234567890'
      additionalProperties: false
    CustomerTypeV11:
      enum:
        - individual
        - business
      type: string
    DeviceInfoV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          type: string
          description: >-
            The IP address of the device used when the customer authorized the
            charge or payout. Use `0.0.0.0` to represent an offline consent
            interaction.
          format: ipv4
          example: 192.168.1.1
      additionalProperties: false
    FundingEventSortByV1:
      enum:
        - transfer_date
        - id
        - amount
      type: string
    FundingEventSummaryV1:
      required:
        - direction
        - event_type
        - id
        - transfer_date
        - payment_count
        - amount
        - trace_numbers
        - created_at
        - trace_ids
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the funding event.
          format: uuid
        amount:
          type: integer
          description: The amount of the funding event in cents.
          format: int32
          example: '100000'
        direction:
          $ref: '#/components/schemas/TransferDirectionV1'
        event_type:
          $ref: '#/components/schemas/FundingEventTypeV1'
        trace_number:
          type: string
          description: The trace number of the funding event.
          nullable: true
        payment_count:
          type: integer
          description: The number of payments associated with the funding event.
          format: int32
        transfer_date:
          type: string
          description: >-
            The date on which the funding event occurred. For `deposits` and
            `returns`, this is the date the funds were credited to your bank
            account. For `withdrawals` and `reversals`, this is the date the
            funds were debited from your bank account.
          format: date
        trace_numbers:
          type: array
          items:
            type: string
          description: Trace number.
        created_at:
          type: string
          description: Created at.
          format: date-time
        updated_at:
          type: string
          description: Updated at.
          format: date-time
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
      additionalProperties: false
    FundingEventSummaryV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/FundingEventSummaryV1'
      additionalProperties: false
    FundingEventSummaryV1PagedResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata2'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          type: array
          items:
            $ref: '#/components/schemas/FundingEventSummaryV1'
      additionalProperties: false
    FundingEventTypeV1:
      enum:
        - charge_deposit
        - charge_reversal
        - payout_return
        - payout_withdrawal
      type: string
      description: >-
        The funding event types describes the direction and reason for the
        funding event.
    PagedResponseMetadata2:
      required:
        - page_number
        - sort_by
        - sort_order
        - total_items
        - api_request_id
        - api_request_timestamp
        - max_page_size
        - total_pages
        - page_size
      type: object
      properties:
        api_request_id:
          type: string
          description: Unique identifier for this API request, useful for troubleshooting.
          format: uuid
        api_request_timestamp:
          type: string
          description: Timestamp for this API request, useful for troubleshooting.
          format: date-time
        total_items:
          type: integer
          format: int32
        page_number:
          type: integer
          description: Page number for paginated results.
          format: int32
        page_size:
          type: integer
          description: Number of items per page in this response.
          format: int32
        max_page_size:
          type: integer
          description: Maximum allowed page size for this endpoint.
          format: int32
        sort_by:
          type: string
          description: The field that the results were sorted by.
        sort_order:
          $ref: '#/components/schemas/SortOrder'
        total_pages:
          type: integer
          description: The number of pages available.
          format: int32
      additionalProperties: false
    PaykeyDetailsV1:
      required:
        - id
        - label
        - customer_id
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        customer_id:
          type: string
          description: Unique identifier for the customer associated with the paykey.
          format: uuid
        label:
          type: string
          description: >-
            Human-readable label that combines the bank name and masked account
            number to help easility represent this paykey in a UI
          example: Bank of America ****1234
        balance:
          type: integer
          description: >-
            The most recent balance of the bank account associated with the
            paykey in dollars.
          format: int32
          nullable: true
          example: '100.00'
      additionalProperties: false
    PaymentRailV1:
      enum:
        - ach
      type: string
      description: The payment rail used for the charge or payout.
    PaymentSortByV1:
      enum:
        - created_at
        - payment_date
        - effective_at
        - id
        - amount
      type: string
      description: The field to sort the results by.
      default: id
    PaymentStatusV1:
      enum:
        - created
        - scheduled
        - failed
        - cancelled
        - on_hold
        - pending
        - paid
        - reversed
        - validating
      type: string
      description: The current status of the `charge` or `payout`.
      default: created
    PaymentSummaryV1:
      required:
        - created_at
        - currency
        - status
        - updated_at
        - id
        - paykey
        - status_details
        - payment_type
        - description
        - amount
        - payment_date
        - external_id
        - funding_ids
        - trace_ids
        - has_refund
        - has_resubmit
        - is_refund
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the `charge` or `payout`.
          format: uuid
        payment_type:
          $ref: '#/components/schemas/PaymentTypeV1'
          description: The type of payment. Valid values are `charge` or `payout`.
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For charges,
            this means the date you want the customer to be debited on. For
            payouts, this means the date you want the funds to be sent from your
            bank account.
          format: date
        effective_at:
          type: string
          description: >-
            The actual date on which the payment occurred. For charges, this is
            the date the customer was debited. For payouts, this is the date the
            funds were sent from your bank account.
          format: date-time
          nullable: true
        description:
          type: string
          description: An arbitrary description for the `charge` or `payout`.
          example: Invoice payment for 100 widgets
          nullable: true
        external_id:
          type: string
          description: >-
            Unique identifier for the `charge` or `payout` in your database.
            This value must be unique across all charges or payouts.
        amount:
          type: integer
          description: The amount of the `charge` or `payout` in cents.
          format: int32
          example: '10000'
        currency:
          type: string
          description: The currency of the `charge` or `payout`. Only USD is supported.
          default: USD
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
        paykey:
          type: string
          description: Value of the `paykey` used for the `charge` or `payout`.
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
          description: Information about the paykey used for the `charge` or `payout`.
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
          description: The current status of the `charge` or `payout`.
        status_details:
          $ref: '#/components/schemas/StatusDetailsV11'
          description: Details about the current status of the `charge` or `payout`.
        funding_id:
          type: string
          description: >-
            Unique identifier for the funding event associated with the `charge`
            or `payout`.
          format: uuid
          nullable: true
        created_at:
          type: string
          description: The time the `charge` or `payout` was created.
          format: date-time
        updated_at:
          type: string
          description: The time the `charge` or `payout` was last updated.
          format: date-time
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding ids.
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace ids.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata for payment - only included if requested.
          nullable: true
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentV1'
          description: >-
            Payments related to this one (e.g. refunds, resubmissions), mapped
            by payment ID to relationship type.
          nullable: true
        is_refund:
          type: boolean
          description: >-
            Is the payment a refund of an original charge (only applicable to
            payouts).
        has_refund:
          type: boolean
          description: >-
            Has the payment been refunded by an associated payout (only
            applicable to charges).
        is_resubmit:
          type: boolean
          description: Is the payment a resubmit of an original payment.
        has_resubmit:
          type: boolean
          description: Has the payment been resubmitted.
      additionalProperties: false
    PaymentSummaryV1PagedResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata2'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          type: array
          items:
            $ref: '#/components/schemas/PaymentSummaryV1'
      additionalProperties: false
    PaymentTypeV1:
      enum:
        - charge
        - payout
      type: string
      description: The type of payment.
    PayoutConfigurationV1:
      type: object
      additionalProperties: false
      properties:
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxPaymentOutcomeV1'
        auto_hold:
          type: boolean
          description: >-
            Defines whether to automatically place this charge on hold after
            being created.
          nullable: true
        auto_hold_message:
          type: string
          description: The reason the payout is being automatically held on creation.
          nullable: true
    PayoutV1:
      required:
        - config
        - currency
        - status
        - status_history
        - device
        - id
        - paykey
        - status_details
        - amount
        - description
        - payment_date
        - external_id
        - funding_ids
        - trace_ids
        - has_resubmit
        - is_refund
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the payout.
          format: uuid
        paykey:
          type: string
          description: Value of the `paykey` used for the payout.
        description:
          type: string
          description: An arbitrary description for the payout.
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailV1'
          description: The payment rail used for the payout.
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
          description: Information about the customer associated with the payout.
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
          description: Information about the paykey used for the payout.
        amount:
          type: integer
          description: The amount of the payout in cents.
          format: int32
          example: '10000'
        currency:
          type: string
          description: The currency of the payout. Only USD is supported.
          default: USD
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For payouts,
            this means the date you want the funds to be sent from your bank
            account.
          format: date
        device:
          $ref: '#/components/schemas/DeviceInfoV1'
          description: >-
            Information about the device used when the customer authorized the
            payout.
        external_id:
          type: string
          description: >-
            Unique identifier for the payout in your database. This value must
            be unique across all payouts.
        config:
          $ref: '#/components/schemas/PayoutConfigurationV1'
          description: Configuration for the payout.
        created_at:
          type: string
          description: The time the payout was created.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: The time the payout was last updated.
          format: date-time
          nullable: true
        processed_at:
          type: string
          description: >-
            The time the payout was processed by Straddle and originated to the
            payment rail.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: >-
            The actual date on which the payment occurred. For payouts, this is
            the date the funds were sent from your bank account.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
          description: The current status of the payout.
          example: created
        status_details:
          $ref: '#/components/schemas/StatusDetailsV11'
          description: Details about the current status of the payout.
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryV1'
          description: History of the status changes for the payout.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the payout in a structured format.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentV1'
          description: Related payments.
          nullable: true
        is_refund:
          type: boolean
          description: Is the payout a refund of an original charge.
        is_resubmit:
          type: boolean
          description: Is the payout a resubmit of an original payout.
        has_resubmit:
          type: boolean
          description: Has the payout been resubmitted.
      additionalProperties: false
    PayoutV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/PayoutV1'
      additionalProperties: false
    StatusDetailsV11:
      required:
        - message
        - changed_at
        - reason
        - source
      type: object
      properties:
        message:
          type: string
          description: A human-readable description of the current status.
          example: Payment successfully created and awaiting validation.
        reason:
          $ref: '#/components/schemas/StatusReasonV1'
          description: >-
            A machine-readable identifier for the specific status, useful for
            programmatic handling.
          example: OK
        source:
          $ref: '#/components/schemas/StatusSourceV1'
          description: >-
            Identifies the origin of the status change (e.g., `bank_decline`,
            `watchtower`). This helps in tracking the cause of status updates.
          example: system
        changed_at:
          type: string
          description: The time the status change occurred.
          format: date-time
        code:
          type: string
          description: The status code if applicable.
          nullable: true
          example: null
      additionalProperties: false
    StatusHistoryV1:
      required:
        - status
        - message
        - source
        - changed_at
        - reason
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/StatusReasonV1'
          description: >-
            A machine-readable identifier for the specific status, useful for
            programmatic handling.
        source:
          $ref: '#/components/schemas/StatusSourceV1'
          description: >-
            Identifies the origin of the status change (e.g., `bank_decline`,
            `watchtower`). This helps in tracking the cause of status updates.
        message:
          type: string
          description: A human-readable description of the status.
          example: Payment successfully created and awaiting validation.
        code:
          type: string
          description: The status code if applicable.
          nullable: true
          example: null
        changed_at:
          type: string
          description: The time the status change occurred.
          format: date-time
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
      additionalProperties: false
    StatusReasonV1:
      enum:
        - insufficient_funds
        - closed_bank_account
        - invalid_bank_account
        - invalid_routing
        - disputed
        - payment_stopped
        - owner_deceased
        - frozen_bank_account
        - risk_review
        - fraudulent
        - duplicate_entry
        - invalid_paykey
        - payment_blocked
        - amount_too_large
        - too_many_attempts
        - internal_system_error
        - user_request
        - ok
        - other_network_return
        - payout_refused
        - cancel_request
        - failed_verification
        - require_review
        - blocked_by_system
        - watchtower_review
        - validating
        - auto_hold
      type: string
    StatusSourceV1:
      enum:
        - watchtower
        - bank_decline
        - customer_dispute
        - user_action
        - system
      type: string
    TransferDirectionV1:
      enum:
        - deposit
        - withdrawal
      type: string
      description: >-
        Describes the direction of the funding event from the perspective of the
        `linked_bank_account`.
    UpdateChargeStatusV1Request:
      type: object
      properties:
        reason:
          type: string
          description: Details about why the charge status was updated.
          nullable: true
      additionalProperties: false
    UpdateChargeV1Request:
      required:
        - description
        - payment_date
        - amount
      type: object
      properties:
        description:
          type: string
          description: An arbitrary description for the charge.
          example: Monthly subscription fee
          nullable: true
        amount:
          type: integer
          description: The amount of the charge in cents.
          format: int32
          example: '10000'
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For charges,
            this means the date you want the customer to be debited on.
          format: date
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the charge in a structured format.
          nullable: true
      additionalProperties: false
    UpdatePayoutStatusV1Request:
      required:
        - reason
      type: object
      properties:
        reason:
          type: string
          description: Details about why the payout status was updated.
      additionalProperties: false
    UpdatePayoutV1Request:
      required:
        - description
        - payment_date
        - amount
      type: object
      properties:
        description:
          type: string
          description: An arbitrary description for the payout.
          nullable: true
        amount:
          type: integer
          description: The amount of the payout in cents.
          format: int32
          example: '10000'
        payment_date:
          type: string
          description: >-
            The desired date on which the payment should be occur. For payouts,
            this means the date you want the funds to be sent from your bank
            account.
          format: date
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the payout in a structured format.
          nullable: true
      additionalProperties: false
    RevealPaykeyV1:
      required:
        - created_at
        - status
        - label
        - updated_at
        - id
        - source
        - paykey
        - config
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        paykey:
          type: string
          description: >-
            The tokenized paykey value. This token is used to create payments
            and should be stored securely.
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
          nullable: true
        label:
          type: string
          description: >-
            Human-readable label that combines the bank name and masked account
            number to help easility represent this paykey in a UI
          example: Bank of America ****1234
        source:
          $ref: '#/components/schemas/PaykeySourceV1'
          example: straddle
        institution_name:
          type: string
          description: Name of the financial institution.
          nullable: true
          example: Bank of America
        status:
          $ref: '#/components/schemas/PaykeyStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
        expires_at:
          type: string
          description: Expiration date and time of the paykey, if applicable.
          format: date-time
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the paykey was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the paykey.
          format: date-time
        bank_data:
          $ref: '#/components/schemas/PaykeyBankDetailsV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        balance:
          $ref: '#/components/schemas/PaykeyBalanceDetailsV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    RevealPaykeyV1ItemResponse:
      required:
        - data
        - response_type
        - meta
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/RevealPaykeyV1'
      additionalProperties: false
    UpdateCustomerReviewStatusV1:
      enum:
        - verified
        - rejected
      type: string
    UpdateCustomerStatusV1:
      enum:
        - verified
        - inactive
        - rejected
      type: string
    CorrelationBucketV1:
      enum:
        - low_confidence
        - potential_match
        - likely_match
        - high_confidence
      type: string
    IdentityVerificationWatchlistMatchV1:
      required:
        - correlation
        - list_name
        - urls
        - match_fields
      type: object
      properties:
        list_name:
          type: string
          description: The name of the list the match was found.
        urls:
          type: array
          items:
            type: string
          description: Relevent Urls to review.
        match_fields:
          type: array
          items:
            type: string
          description: Data fields that matched.
        correlation:
          $ref: '#/components/schemas/CorrelationBucketV1'
      additionalProperties: false
    CreateLinkedBankAccountV1:
      required:
        - account_id
        - bank_account
      type: object
      properties:
        account_id:
          type: string
          description: >-
            The unique identifier of the Straddle account to associate this bank
            account with.
          format: uuid
          nullable: true
        bank_account:
          $ref: '#/components/schemas/BankAccountV1Request'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the linked bank account in a structured
            format.
          nullable: true
        platform_id:
          type: string
          description: >-
            The unique identifier of the Straddle Platform to associate this
            bank account with.
          format: uuid
          nullable: true
        purposes:
          type: array
          items:
            enum:
              - charges
              - payouts
              - billing
            type: string
          description: The purposes for the linked bank account.
          nullable: true
        description:
          type: string
          description: Optional description for the bank account.
          nullable: true
      additionalProperties: false
    ItemResponseOfRepresentativeUnmaskedV1:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: Indicates the type of data returned.
        data:
          $ref: '#/components/schemas/RepresentativeUnmaskedV1'
      additionalProperties: false
    RepresentativeUnmaskedV1:
      required:
        - account_id
        - created_at
        - dob
        - email
        - first_name
        - id
        - last_name
        - mobile_number
        - relationship
        - ssn_last4
        - status
        - status_detail
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the representative.
          format: uuid
        account_id:
          type: string
          description: >-
            The unique identifier of the account this representative is
            associated with.
          format: uuid
        user_id:
          type: string
          description: >-
            The unique identifier of the user account associated with this
            representative, if applicable.
          format: uuid
          nullable: true
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
          type: string
          description: The current status of the representative.
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfRepresentativeStatusDetail'
        first_name:
          type: string
          description: The first name of the representative.
        last_name:
          type: string
          description: The last name of the representative.
        dob:
          type: string
          description: >-
            The date of birth of the representative, in ISO 8601 format
            (YYYY-MM-DD).
          format: date
        email:
          type: string
          description: The email address of the representative.
        mobile_number:
          type: string
          description: The mobile phone number of the representative.
        relationship:
          $ref: '#/components/schemas/Relationship'
        external_id:
          type: string
          description: >-
            Unique identifier for the representative in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the representative was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the representative.
          format: date-time
        ssn_last4:
          type: string
          description: The last 4 digits of the representative's Social Security Number.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the represetative in a structured
            format.
          nullable: true
      additionalProperties: false
    RepresentativeV11:
      required:
        - name
      type: object
      properties:
        name:
          type: string
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
      additionalProperties: false
    CreateTanPaykeyV1Request:
      required:
        - account_type
        - customer_id
        - routing_number
        - tan
      type: object
      properties:
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
        routing_number:
          type: string
          description: Bank routing number.
        tan:
          type: string
          description: Tokenized account number.
        account_type:
          $ref: '#/components/schemas/AccountTypeV1'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    IdentityVerificationReputationInsightsV1:
      type: object
      properties:
        ach_fraud_transactions_count:
          type: integer
          format: int32
          nullable: true
        ach_fraud_transactions_total_amount:
          type: number
          format: double
          nullable: true
        ach_fraud_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        ach_returned_transactions_count:
          type: integer
          format: int32
          nullable: true
        ach_returned_transactions_total_amount:
          type: number
          format: double
          nullable: true
        ach_returned_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_fraud_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_fraud_transactions_total_amount:
          type: number
          format: double
          nullable: true
        card_fraud_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_disputed_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_disputed_transactions_total_amount:
          type: number
          format: double
          nullable: true
        card_disputed_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_stopped_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_stopped_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        accounts_count:
          type: integer
          format: int32
          nullable: true
        accounts_active_count:
          type: integer
          format: int32
          nullable: true
        accounts_closed_count:
          type: integer
          format: int32
          nullable: true
        accounts_closed_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        accounts_fraud_count:
          type: integer
          format: int32
          nullable: true
        accounts_fraud_loss_total_amount:
          type: number
          format: double
          nullable: true
        accounts_fraud_labeled_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        applications_count:
          type: integer
          format: int32
          nullable: true
        applications_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        applications_approved_count:
          type: integer
          format: int32
          nullable: true
        applications_declined_count:
          type: integer
          format: int32
          nullable: true
        applications_fraud_count:
          type: integer
          format: int32
          nullable: true
        user_institution_count:
          type: integer
          format: int32
          nullable: true
        user_dob_count:
          type: integer
          format: int32
          nullable: true
        user_mobile_count:
          type: integer
          format: int32
          nullable: true
        user_email_count:
          type: integer
          format: int32
          nullable: true
        user_address_count:
          type: integer
          format: int32
          nullable: true
        user_active_profile_count:
          type: integer
          format: int32
          nullable: true
        user_closed_profile_count:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    IdentityVerificationReputationV1:
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/IdentityDecisionV1'
        codes:
          type: array
          items:
            type: string
          description: Specific codes related to the Straddle reputation screening results.
          nullable: true
        risk_score:
          type: number
          format: double
          nullable: true
        insights:
          $ref: '#/components/schemas/IdentityVerificationReputationInsightsV1'
      additionalProperties: false
    ChargeUnmaskedV1:
      required:
        - amount
        - config
        - consent_type
        - created_at
        - currency
        - description
        - device
        - external_id
        - funding_ids
        - id
        - paykey
        - payment_date
        - status
        - status_details
        - status_history
        - updated_at
        - trace_ids
        - has_refund
        - has_resubmit
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        description:
          type: string
          description: Description.
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailV1'
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
        amount:
          type: integer
          description: Amount.
          format: int32
        currency:
          type: string
          description: Currency.
        payment_date:
          type: string
          description: Payment date.
          format: date
        consent_type:
          $ref: '#/components/schemas/ConsentTypeV1'
        device:
          $ref: '#/components/schemas/DeviceInfoUnmaskedV1'
        external_id:
          type: string
          description: External id.
        config:
          $ref: '#/components/schemas/ChargeConfigurationV1'
        created_at:
          type: string
          description: Created at.
          format: date-time
        updated_at:
          type: string
          description: Updated at.
          format: date-time
        processed_at:
          type: string
          description: Processed at.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: Effective at.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV11'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryV1'
          description: Status history.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids
        paykey:
          type: string
          description: Paykey.
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentV1'
          description: Related payments.
          nullable: true
        has_refund:
          type: boolean
          description: Has the charge been refunded by an associated payout.
        is_resubmit:
          type: boolean
          description: Is the charge a resubmit of an original charge.
        has_resubmit:
          type: boolean
          description: Has the charge been resubmitted.
      additionalProperties: false
    ChargeUnmaskedV1ItemResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/ChargeUnmaskedV1'
      additionalProperties: false
    DeviceInfoUnmaskedV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          type: string
          description: Ip address.
          format: '**.**.**.**'
      additionalProperties: false
    PayoutUnmaskedV1:
      required:
        - amount
        - config
        - currency
        - description
        - device
        - external_id
        - funding_ids
        - id
        - paykey
        - payment_date
        - status
        - status_details
        - status_history
        - trace_ids
        - has_resubmit
        - is_refund
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        description:
          type: string
          description: Description.
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailV1'
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
        amount:
          type: integer
          description: Amount.
          format: int32
        currency:
          type: string
          description: Currency.
        payment_date:
          type: string
          description: Payment date.
          format: date
        device:
          $ref: '#/components/schemas/DeviceInfoUnmaskedV1'
        external_id:
          type: string
          description: External id.
        config:
          $ref: '#/components/schemas/PayoutConfigurationV1'
        created_at:
          type: string
          description: Created at.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: Updated at.
          format: date-time
          nullable: true
        processed_at:
          type: string
          description: Processed at.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: Effective at.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV11'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryV1'
          description: Status history.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids
        paykey:
          type: string
          description: Paykey.
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentV1'
          description: Related payments.
          nullable: true
        is_refund:
          type: boolean
          description: Is the payout a refund of an original charge.
        is_resubmit:
          type: boolean
          description: Is the payout a resubmit of an original payout.
        has_resubmit:
          type: boolean
          description: Has the payout been resubmitted.
      additionalProperties: false
    PayoutUnmaskedV1ItemResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/PayoutUnmaskedV1'
      additionalProperties: false
    CancelPaykeyV1Request:
      type: object
      properties:
        reason:
          type: string
          nullable: true
      additionalProperties: false
    IdentityVerificationReputationInightsV1:
      type: object
      properties:
        ach_fraud_transactions_count:
          type: integer
          format: int32
          nullable: true
        ach_fraud_transactions_total_amount:
          type: number
          format: double
          nullable: true
        ach_fraud_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        ach_returned_transactions_count:
          type: integer
          format: int32
          nullable: true
        ach_returned_transactions_total_amount:
          type: number
          format: double
          nullable: true
        ach_returned_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_fraud_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_fraud_transactions_total_amount:
          type: number
          format: double
          nullable: true
        card_fraud_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_disputed_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_disputed_transactions_total_amount:
          type: number
          format: double
          nullable: true
        card_disputed_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        card_stopped_transactions_count:
          type: integer
          format: int32
          nullable: true
        card_stopped_transactions_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        accounts_count:
          type: integer
          format: int32
          nullable: true
        accounts_active_count:
          type: integer
          format: int32
          nullable: true
        accounts_closed_count:
          type: integer
          format: int32
          nullable: true
        accounts_closed_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        accounts_fraud_count:
          type: integer
          format: int32
          nullable: true
        accounts_fraud_loss_total_amount:
          type: number
          format: double
          nullable: true
        accounts_fraud_labeled_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        applications_count:
          type: integer
          format: int32
          nullable: true
        applications_dates:
          type: array
          items:
            type: string
            format: date
          nullable: true
        applications_approved_count:
          type: integer
          format: int32
          nullable: true
        applications_declined_count:
          type: integer
          format: int32
          nullable: true
        applications_fraud_count:
          type: integer
          format: int32
          nullable: true
        user_institution_count:
          type: integer
          format: int32
          nullable: true
        user_dob_count:
          type: integer
          format: int32
          nullable: true
        user_mobile_count:
          type: integer
          format: int32
          nullable: true
        user_email_count:
          type: integer
          format: int32
          nullable: true
        user_address_count:
          type: integer
          format: int32
          nullable: true
        user_active_profile_count:
          type: integer
          format: int32
          nullable: true
        user_closed_profile_count:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    AccountTypeEventV1:
      enum:
        - checking
        - savings
      type: string
    AddressEventV1:
      required:
        - address1
        - city
        - state
        - zip
      type: object
      properties:
        address1:
          type: string
          description: Primary address line (e.g., street, PO Box).
        address2:
          type: string
          description: Secondary address line (e.g., apartment, suite, unit, or building).
          nullable: true
        city:
          type: string
          description: City, district, suburb, town, or village.
        state:
          type: string
          description: Two-letter state code.
        zip:
          type: string
          description: Zip or postal code.
      additionalProperties: false
    ComplianceProfileEventV1:
      type: object
      properties:
        dob:
          type: string
          description: >-
            Date of birth for individual customers in ISO 8601 format
            (YYYY-MM-DD). This data is required to trigger Patriot Act compliant
            Know Your Customer (KYC) verification. Required if SSN is provided.
            Only valid where customer type is 'individual'.
          format: '****-**-**'
          nullable: true
        ssn:
          type: string
          description: >-
            Full 9-digit Social Security Number or government identifier for
            individuals. This data is required to trigger Patriot Act compliant
            KYC verification. Required if DOB is provided. Only valid where
            customer type is 'individual'.
          format: '***-**-****'
          nullable: true
        ein:
          type: string
          description: >-
            Full 9-digit Employer Identification Number for businesses. This
            data is required to trigger Patriot Act compliant Know Your Business
            (KYB) verification. Only valid where customer type is 'business'.
          format: '**-*******'
          nullable: true
        legal_business_name:
          type: string
          description: >-
            The official name of the business. This name should be correlated
            with the ein value. Only valid where customer type is 'business'.
          nullable: true
        website:
          type: string
          description: >-
            URL of the company's official website. Only valid where customer
            type is 'business'.
          nullable: true
      additionalProperties: false
    CustomerEventV1:
      required:
        - created_at
        - device
        - email
        - id
        - name
        - phone
        - status
        - type
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the customer.
          format: uuid
        address:
          $ref: '#/components/schemas/AddressEventV1'
        compliance_profile:
          $ref: '#/components/schemas/ComplianceProfileEventV1'
        device:
          $ref: '#/components/schemas/DeviceEventV1'
        name:
          type: string
          description: Full name of the individual or business name.
        type:
          $ref: '#/components/schemas/CustomerTypeEventV1'
        email:
          type: string
          description: The customer's email address.
        phone:
          type: string
          description: The customer's phone number in E.164 format.
        external_id:
          type: string
          description: >-
            Unique identifier for the customer in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
        status:
          $ref: '#/components/schemas/CustomerStatusEventV1'
        created_at:
          type: string
          description: Timestamp of when the customer record was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the customer record.
          format: date-time
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the customer in a structured format.
          nullable: true
      additionalProperties: false
    CustomerStatusEventV1:
      enum:
        - pending
        - review
        - verified
        - inactive
        - rejected
      type: string
    CustomerTypeEventV1:
      enum:
        - individual
        - business
      type: string
    DeviceEventV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          minLength: 1
          type: string
          description: >-
            The customer's IP address at the time of profile creation. Use
            '0.0.0.0' to represent an offline customer registration.
      additionalProperties: false
    PaykeyBankDetailsEventV1:
      required:
        - account_number
        - account_type
        - routing_number
      type: object
      properties:
        routing_number:
          type: string
          description: Bank routing number.
        account_number:
          type: string
          description: >-
            Bank account number. This value is masked by default for security
            reasons. Use the /unmask endpoint to access the unmasked value.
        account_type:
          $ref: '#/components/schemas/AccountTypeEventV1'
      additionalProperties: false
    PaykeyEventV1:
      required:
        - created_at
        - id
        - label
        - paykey
        - source
        - status
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the paykey.
          format: uuid
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
          nullable: true
        label:
          type: string
          description: Human-readable label used to represent this paykey in a UI.
        source:
          $ref: '#/components/schemas/PaykeySourceEventV1'
        institution_name:
          type: string
          description: Name of the financial institution.
          nullable: true
        status:
          $ref: '#/components/schemas/PaykeyStatusEventV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsEventV1'
        expires_at:
          type: string
          description: Expiration date and time of the paykey, if applicable.
          format: date-time
          nullable: true
        created_at:
          type: string
          description: Timestamp of when the paykey was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the paykey.
          format: date-time
        paykey:
          type: string
          description: >-
            The tokenized paykey value. This value is used to create payments
            and should be stored securely.
        bank_data:
          $ref: '#/components/schemas/PaykeyBankDetailsEventV1'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        balance:
          $ref: '#/components/schemas/PaykeyBalanceDetailsEventV1'
      additionalProperties: false
    PaykeySourceEventV1:
      enum:
        - bank_account
        - straddle
        - mx
        - plaid
        - tan
        - quiltt
      type: string
    PaykeyStatusEventV1:
      enum:
        - pending
        - active
        - inactive
        - rejected
        - review
        - blocked
      type: string
    StatusDetailsEventV1:
      required:
        - message
        - reason
        - source
        - changed_at
        - code
      type: object
      properties:
        message:
          type: string
          description: A human-readable description of the current status.
        reason:
          $ref: '#/components/schemas/StatusReasonEventV1'
        source:
          $ref: '#/components/schemas/StatusSourceEventV1'
        code:
          type: string
          description: The status code if applicable.
          nullable: true
        changed_at:
          type: string
          description: The time the status change occurred.
          format: date-time
      additionalProperties: false
    BalanceCheckOptionsEventV1:
      enum:
        - required
        - enabled
        - disabled
      type: string
    ChargeConfigurationEventV1:
      required:
        - balance_check
      type: object
      properties:
        balance_check:
          $ref: '#/components/schemas/BalanceCheckOptionsEventV1'
      additionalProperties: false
    ChargeEventV1:
      required:
        - amount
        - config
        - consent_type
        - currency
        - description
        - device
        - id
        - paykey
        - payment_date
        - status
        - status_details
        - status_history
        - funding_ids
        - has_refund
        - has_resubmit
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        paykey:
          type: string
          description: Paykey.
        description:
          type: string
          description: Description.
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailEventV1'
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsEventV1'
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsEventV1'
        amount:
          type: integer
          description: Amount.
          format: int32
        currency:
          type: string
          description: Currency.
        payment_date:
          type: string
          description: Payment date.
          format: date
        consent_type:
          $ref: '#/components/schemas/ConsentTypeEventV1'
        device:
          $ref: '#/components/schemas/DeviceInfoEventV1'
        external_id:
          type: string
          description: External id.
          nullable: true
        config:
          $ref: '#/components/schemas/ChargeConfigurationEventV1'
        created_at:
          type: string
          description: Created at.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: Updated at.
          format: date-time
          nullable: true
        processed_at:
          type: string
          description: Processed at.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: Effective at.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusEventV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsEventV1'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryEventV1'
          description: Status history.
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentEventV1'
          description: Related payments.
          nullable: true
          example:
            - id: 019e1bab-2ab4-751d-be80-f51c82c2ea64
              relationship: original
              payment_type: charge
        is_resubmit:
          type: boolean
          description: Is the charge a resubmit of an original charge.
        has_resubmit:
          type: boolean
          description: Has the charge been resubmitted.
        has_refund:
          type: boolean
          description: Has the charge been refunded by an associated payout.
      additionalProperties: false
    ConsentTypeEventV1:
      enum:
        - internet
        - signed
      type: string
    CustomerDetailsEventV1:
      required:
        - customer_type
        - email
        - id
        - name
        - phone
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        name:
          type: string
          description: Name.
        email:
          type: string
          description: Email.
        phone:
          type: string
          description: Phone.
        customer_type:
          $ref: '#/components/schemas/CustomerTypeEventV1'
      additionalProperties: false
    DeviceInfoEventV1:
      required:
        - ip_address
      type: object
      properties:
        ip_address:
          type: string
          description: Ip address.
      additionalProperties: false
    PaykeyDetailsEventV1:
      required:
        - customer_id
        - id
        - label
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        customer_id:
          type: string
          description: Customer id.
          format: uuid
        label:
          type: string
          description: Label.
        balance:
          type: integer
          description: Balance.
          format: int32
          nullable: true
      additionalProperties: false
    PaymentRailEventV1:
      enum:
        - ach
      type: string
    PaymentStatusEventV1:
      enum:
        - created
        - scheduled
        - failed
        - cancelled
        - on_hold
        - pending
        - paid
        - reversed
      type: string
    PayoutConfigurationEventV1:
      type: object
      additionalProperties: false
    PayoutEventV1:
      required:
        - amount
        - config
        - consent_type
        - currency
        - description
        - device
        - id
        - paykey
        - payment_date
        - status
        - status_details
        - status_history
        - funding_ids
        - has_resubmit
        - is_refund
        - is_resubmit
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        paykey:
          type: string
          description: Paykey.
        description:
          type: string
          description: Description.
          nullable: true
        payment_rail:
          $ref: '#/components/schemas/PaymentRailEventV1'
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsEventV1'
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsEventV1'
        amount:
          type: integer
          description: Amount.
          format: int32
        currency:
          type: string
          description: Currency.
        payment_date:
          type: string
          description: Payment date.
          format: date
        consent_type:
          $ref: '#/components/schemas/ConsentTypeEventV1'
        device:
          $ref: '#/components/schemas/DeviceInfoEventV1'
        external_id:
          type: string
          description: External id.
          nullable: true
        config:
          $ref: '#/components/schemas/PayoutConfigurationEventV1'
        created_at:
          type: string
          description: Created at.
          format: date-time
          nullable: true
        updated_at:
          type: string
          description: Updated at.
          format: date-time
          nullable: true
        processed_at:
          type: string
          description: Processed at.
          format: date-time
          nullable: true
        effective_at:
          type: string
          description: Effective at.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatusEventV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsEventV1'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryEventV1'
          description: Status history.
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata.
          nullable: true
        funding_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Funding Ids.
        related_payments:
          type: array
          items:
            $ref: '#/components/schemas/RelatedPaymentEventV1'
          description: Related payments.
          nullable: true
          example:
            - id: 019e1bab-2ab4-751d-be80-f51c82c2ea64
              relationship: original
              payment_type: charge
        is_resubmit:
          type: boolean
          description: Is the payout a resubmit of an original payout.
        has_resubmit:
          type: boolean
          description: Has the payout been resubmitted.
        is_refund:
          type: boolean
          description: Is the payout a refund of an original charge.
      additionalProperties: false
    StatusHistoryEventV1:
      required:
        - changed_at
        - message
        - reason
        - source
        - status
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/StatusReasonEventV1'
        source:
          $ref: '#/components/schemas/StatusSourceEventV1'
        message:
          type: string
          description: A human-readable description of the status.
        code:
          type: string
          description: The status code if applicable.
          nullable: true
        changed_at:
          type: string
          description: The time the status change occurred.
          format: date-time
        status:
          $ref: '#/components/schemas/PaymentStatusEventV1'
      additionalProperties: false
    StatusReasonEventV1:
      enum:
        - insufficient_funds
        - closed_bank_account
        - invalid_bank_account
        - invalid_routing
        - disputed
        - payment_stopped
        - owner_deceased
        - frozen_bank_account
        - risk_review
        - fraudulent
        - duplicate_entry
        - invalid_paykey
        - payment_blocked
        - amount_too_large
        - too_many_attempts
        - internal_system_error
        - user_request
        - ok
        - other_network_return
        - payout_refused
        - validating
        - auto_hold
      type: string
    StatusSourceEventV1:
      enum:
        - watchtower
        - bank_decline
        - customer_dispute
        - user_action
        - system
      type: string
    BalanceRefreshStatusV1:
      enum:
        - pending
        - completed
        - failed
      type: string
    CreateQuilttPaykeyV1Request:
      required:
        - customer_id
        - quiltt_token
      type: object
      properties:
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
        quiltt_token:
          type: string
          description: >-
            Quiltt processor token generated by your application for use with
            the Straddle API.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    CustomerConfigurationV1:
      type: object
      properties:
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxCustomerOutcomeV1'
        processing_method:
          $ref: '#/components/schemas/ConfigurationProcessingV1'
      additionalProperties: false
    PaykeyBalanceDetailsV1:
      required:
        - status
      type: object
      properties:
        account_balance:
          type: integer
          description: Account Balance when last retrieved
          format: int32
          nullable: true
        updated_at:
          type: string
          description: Last time account balance was updated.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/BalanceRefreshStatusV1'
      additionalProperties: false
    PaykeyConfigurationV1:
      type: object
      properties:
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxPaykeyOutcomeV1'
        processing_method:
          $ref: '#/components/schemas/ConfigurationProcessingV1'
      additionalProperties: false
    SandboxCustomerOutcomeV1:
      enum:
        - standard
        - verified
        - rejected
        - review
      type: string
    SandboxPaykeyOutcomeV1:
      enum:
        - standard
        - active
        - rejected
        - review
      type: string
    UpdatePaykeyReviewStatusV1:
      enum:
        - active
        - rejected
      type: string
    SandboxPaymentOutcomeV1:
      enum:
        - standard
        - paid
        - on_hold_daily_limit
        - cancelled_for_fraud_risk
        - cancelled_for_balance_check
        - failed_insufficient_funds
        - reversed_insufficient_funds
        - failed_customer_dispute
        - reversed_customer_dispute
        - failed_closed_bank_account
        - reversed_closed_bank_account
      type: string
      description: Payment will simulate processing if not Standard.
    ConfigurationProcessingV1:
      enum:
        - inline
        - background
        - skip
      type: string
    PatchPaykeyReviewV1Request:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/UpdatePaykeyReviewStatusV1'
      additionalProperties: false
    Address:
      type: object
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
      additionalProperties: false
    BusinessProfile:
      required:
        - name
        - website
      type: object
      properties:
        name:
          type: string
        website:
          type: string
        legal_name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        use_case:
          type: string
          nullable: true
        tax_id:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
        industry:
          $ref: '#/components/schemas/Industry'
        support_channels:
          $ref: '#/components/schemas/SupportChannels'
      additionalProperties: false
    Industry:
      type: object
      properties:
        mcc:
          type: string
          nullable: true
        sector:
          type: string
          nullable: true
        category:
          type: string
          nullable: true
      additionalProperties: false
    PlatformV1:
      required:
        - id
        - status
        - status_detail
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          enum:
            - created
            - onboarding
            - active
            - rejected
            - inactive
          type: string
        status_detail:
          $ref: '#/components/schemas/StatusDetailOfPlatformStatusDetailEnum'
        business_profile:
          $ref: '#/components/schemas/BusinessProfile'
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          nullable: true
        external_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    StatusDetailOfPlatformStatusDetailEnum:
      required:
        - code
        - message
        - reason
        - source
      type: object
      properties:
        reason:
          enum:
            - unverified
            - new
            - in_review
            - pending
            - stuck
            - verified
            - failed_verification
            - disabled
            - terminated
          type: string
        source:
          enum:
            - watchtower
          type: string
        code:
          type: string
        message:
          type: string
      additionalProperties: false
    SupportChannels:
      type: object
      properties:
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        url:
          type: string
          nullable: true
      additionalProperties: false
    UserV1:
      required:
        - created_at
        - email
        - first_name
        - id
        - last_name
        - level
        - roles
        - status
        - updated_at
        - memberships
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the user.
          format: uuid
        organization_id:
          type: string
          description: The unique identifier of the organization this user belongs to.
          format: uuid
          nullable: true
        platform_id:
          type: string
          description: The unique identifier of the organization this user belongs to.
          format: uuid
          nullable: true
        authenticator_id:
          type: string
          description: The unique identifier used for authentication purposes.
          nullable: true
        status:
          enum:
            - invited
            - active
            - onboarding
            - inactive
          type: string
          description: The current status of the user.
        first_name:
          type: string
          description: The first name of the user.
        last_name:
          type: string
          description: The last name of the user.
        email:
          type: string
          description: The email address of the user.
        level:
          enum:
            - none
            - onboarding
            - straddle
            - platform
            - organization
          type: string
          description: The current status of the user.
        roles:
          type: array
          items:
            enum:
              - none
              - member
              - developer
              - admin
            type: string
          description: >-
            The role assigned to the user, determining their permissions within
            the system.
        created_at:
          type: string
          description: Timestamp of when the user was created.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the user.
          format: date-time
        memberships:
          type: array
          items:
            $ref: '#/components/schemas/UserMembershipV1'
      additionalProperties: false
    AccountBalanceStatusEventV1:
      enum:
        - pending
        - completed
        - failed
      type: string
    AccountNameMatchDetailsV1:
      required:
        - codes
        - decision
      type: object
      properties:
        names_on_account:
          type: array
          items:
            type: string
          nullable: true
        matched_name:
          type: string
          nullable: true
        customer_name:
          type: string
          nullable: true
        correlation_score:
          type: number
          format: double
          nullable: true
        decision:
          $ref: '#/components/schemas/PaykeyVerificationDecisionV1'
        reason:
          type: string
          nullable: true
        codes:
          type: array
          items:
            type: string
      additionalProperties: false
    AccountValidationDetailsV1:
      required:
        - codes
        - decision
      type: object
      properties:
        decision:
          $ref: '#/components/schemas/PaykeyVerificationDecisionV1'
        reason:
          type: string
          nullable: true
        codes:
          type: array
          items:
            type: string
      additionalProperties: false
    CreateSpeedchexPaykeyV1Request:
      required:
        - customer_id
        - speedchex_token
      type: object
      properties:
        customer_id:
          type: string
          description: Unique identifier of the related customer object.
          format: uuid
        speedchex_token:
          type: string
          description: >-
            Speedchex token generated by your application for use with the
            Straddle API.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Up to 20 additional user-defined key-value pairs. Useful for storing
            additional information about the paykey in a structured format.
          nullable: true
        config:
          $ref: '#/components/schemas/PaykeyConfigurationV1'
        external_id:
          type: string
          description: >-
            Unique identifier for the paykey in your database, used for
            cross-referencing between Straddle and your systems.
          nullable: true
      additionalProperties: false
    PaykeyBalanceDetailsEventV1:
      required:
        - status
      type: object
      properties:
        account_balance:
          type: number
          description: Account Balance when last retrieved
          format: double
          nullable: true
        updated_at:
          type: string
          description: Last time account balance was updated.
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/AccountBalanceStatusEventV1'
      additionalProperties: false
    PaykeyReviewV1:
      required:
        - paykey_details
      type: object
      properties:
        paykey_details:
          $ref: '#/components/schemas/PaykeyV1'
        verification_details:
          $ref: '#/components/schemas/PaykeyVerificationDetailsV1'
      additionalProperties: false
    PaykeyReviewV1ItemResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/PaykeyReviewV1'
      additionalProperties: false
    PaykeyVerificationBreakdownV1:
      type: object
      properties:
        name_match:
          $ref: '#/components/schemas/AccountNameMatchDetailsV1'
        account_validation:
          $ref: '#/components/schemas/AccountValidationDetailsV1'
      additionalProperties: false
    PaykeyVerificationDecisionV1:
      enum:
        - accept
        - reject
        - review
      type: string
    PaykeyVerificationDetailsV1:
      required:
        - breakdown
        - created_at
        - decision
        - id
        - messages
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the verification details.
          format: uuid
        decision:
          $ref: '#/components/schemas/PaykeyVerificationDecisionV1'
        messages:
          type: object
          additionalProperties:
            type: string
          description: Dictionary of all messages from the paykey verification process.
        breakdown:
          $ref: '#/components/schemas/PaykeyVerificationBreakdownV1'
        created_at:
          type: string
          description: Timestamp of when the verification was initiated.
          format: date-time
        updated_at:
          type: string
          description: Timestamp of the most recent update to the verification details.
          format: date-time
      additionalProperties: false
    FundingEventTransferDirectionV1:
      enum:
        - deposit
        - withdrawal
      type: string
    FundingEventV1:
      required:
        - amount
        - created_at
        - direction
        - event_type
        - id
        - payment_count
        - trace_numbers
        - transfer_date
        - updated_at
        - status_history
        - trace_ids
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        amount:
          type: integer
          description: Amount.
          format: int32
        direction:
          $ref: '#/components/schemas/FundingEventTransferDirectionV1'
        event_type:
          $ref: '#/components/schemas/FundingEventTypeV1'
        trace_numbers:
          type: array
          items:
            type: string
          description: Trace number.
        payment_count:
          type: integer
          description: Payment count.
          format: int32
        transfer_date:
          type: string
          description: Transfer date.
          format: date
        created_at:
          type: string
          description: Created at.
          format: date-time
        updated_at:
          type: string
          description: Updated at.
          format: date-time
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsV1'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryV1'
          description: Status history.
        config:
          $ref: '#/components/schemas/FundingEventConfigurationV1'
        linked_bank_account_details:
          $ref: '#/components/schemas/LinkedBankAccountDetailsV1'
      additionalProperties: false
    CreateFundingEventV1Request:
      required:
        - funding_event_job_type
      type: object
      properties:
        funding_event_job_type:
          $ref: '#/components/schemas/FundingEventJobTypeV1'
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxPaymentOutcomeV1'
      additionalProperties: false
    CreateFundingEventV1Response:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: ID of the created funding event.
          format: uuid
      additionalProperties: false
    CreateFundingEventV1ResponseItemResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/CreateFundingEventV1Response'
      additionalProperties: false
    FundingEventConfigurationV1:
      type: object
      properties:
        sandbox_outcome:
          $ref: '#/components/schemas/SandboxPaymentOutcomeV1'
      additionalProperties: false
    FundingEventEventV1:
      required:
        - amount
        - created_at
        - direction
        - event_type
        - id
        - payment_count
        - status_history
        - trace_ids
        - transfer_date
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        amount:
          type: integer
          description: Amount.
          format: int32
        direction:
          $ref: '#/components/schemas/FundingEventTransferDirectionV1'
        event_type:
          $ref: '#/components/schemas/FundingEventTypeV1'
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: Trace Ids.
        payment_count:
          type: integer
          description: Payment count.
          format: int32
        transfer_date:
          type: string
          description: Transfer date.
          format: date
        created_at:
          type: string
          description: Created at.
          format: date-time
        updated_at:
          type: string
          description: Updated at.
          format: date-time
        status:
          $ref: '#/components/schemas/PaymentStatusEventV1'
        status_details:
          $ref: '#/components/schemas/StatusDetailsEventV1'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryEventV1'
          description: Status history.
      additionalProperties: false
    FundingEventJobTypeV1:
      enum:
        - charges
        - payouts
      type: string
      description: Supported job types are Charges and Payouts
    FundingEventV1ItemResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          $ref: '#/components/schemas/FundingEventV1'
      additionalProperties: false
    LinkedBankAccountDetailsV1:
      required:
        - account_holder
        - account_number
        - institution_name
        - routing_number
      type: object
      properties:
        institution_name:
          type: string
        account_holder:
          type: string
        routing_number:
          type: string
        account_number:
          type: string
      additionalProperties: false
    UnblockPaykeyV1Request:
      type: object
      properties:
        message:
          type: string
          description: Optional message describing the reason for unblocking.
          nullable: true
      additionalProperties: false
    AccountSettingsV1:
      required:
        - charges
        - configuration
        - consent_types
        - customer_types
        - payment_types
        - payouts
        - statement_settings
      type: object
      properties:
        charges:
          $ref: '#/components/schemas/ChargesSettingsV1'
        payouts:
          $ref: '#/components/schemas/PayoutsSettingsV1'
        statement_settings:
          $ref: '#/components/schemas/StatementSettingsV1'
        payment_types:
          $ref: '#/components/schemas/PaymentTypesSettingsV1'
        customer_types:
          $ref: '#/components/schemas/CustomerTypesSettingsV1'
        consent_types:
          $ref: '#/components/schemas/ConsentTypesSettingsV1'
        configuration:
          $ref: '#/components/schemas/ConfigurationSettingsV1'
      additionalProperties: false
    ChargesSettingsV1:
      required:
        - daily_amount
        - max_amount
        - monthly_amount
        - monthly_count
      type: object
      properties:
        max_amount:
          type: integer
          format: int64
        monthly_amount:
          type: integer
          format: int64
        daily_amount:
          type: integer
          format: int64
        monthly_count:
          type: integer
          format: int64
        funding_time:
          type: string
          nullable: true
        linked_bank_account_id:
          type: string
          nullable: true
      additionalProperties: false
    ConfigurationSettingsV1:
      required:
        - allow_customer_identity_skip
        - allow_data_unmask
        - allow_duplicate_email
        - allow_paykey_verification_skip
      type: object
      properties:
        allow_data_unmask:
          type: boolean
        allow_duplicate_email:
          type: boolean
        allow_customer_identity_skip:
          type: boolean
        allow_paykey_verification_skip:
          type: boolean
      additionalProperties: false
    ConsentTypesSettingsV1:
      required:
        - internet
        - signed_agreement
      type: object
      properties:
        internet:
          enum:
            - active
            - inactive
          type: string
        signed_agreement:
          enum:
            - active
            - inactive
          type: string
      additionalProperties: false
    CustomerTypesSettingsV1:
      required:
        - businesses
        - individuals
      type: object
      properties:
        individuals:
          enum:
            - active
            - inactive
          type: string
        businesses:
          enum:
            - active
            - inactive
          type: string
      additionalProperties: false
    ItemResponseOfAccountSettingsV1:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMetadata'
        response_type:
          enum:
            - object
            - array
            - error
            - none
          type: string
          description: Indicates the type of data returned.
        data:
          $ref: '#/components/schemas/AccountSettingsV1'
      additionalProperties: false
    PaymentTypesSettingsV1:
      required:
        - charges
        - payouts
      type: object
      properties:
        charges:
          enum:
            - active
            - inactive
          type: string
        payouts:
          enum:
            - active
            - inactive
          type: string
      additionalProperties: false
    PayoutsSettingsV1:
      required:
        - daily_amount
        - max_amount
        - monthly_amount
        - monthly_count
      type: object
      properties:
        max_amount:
          type: integer
          format: int64
        monthly_amount:
          type: integer
          format: int64
        daily_amount:
          type: integer
          format: int64
        monthly_count:
          type: integer
          format: int64
        funding_time:
          type: string
          nullable: true
        linked_bank_account_id:
          type: string
          nullable: true
      additionalProperties: false
    StatementSettingsV1:
      type: object
      properties:
        company_name:
          type: string
          nullable: true
        company_id:
          type: string
          nullable: true
        default_descriptor:
          type: string
          nullable: true
      additionalProperties: false
    UserMembershipV1:
      required:
        - authenticator_organization_id
        - entity_name
        - level
        - roles
      type: object
      properties:
        level:
          enum:
            - none
            - onboarding
            - account
            - organization
            - platform
            - straddle
          type: string
        entity_id:
          type: string
          format: uuid
          nullable: true
        entity_name:
          type: string
        roles:
          type: array
          items:
            enum:
              - none
              - member
              - developer
              - admin
            type: string
        authenticator_organization_id:
          type: string
      additionalProperties: false
    FundingEventPaymentReasonV1:
      enum:
        - credit
        - debit
        - reversal
        - failed
      type: string
    FundingEventPaymentSortByV1:
      enum:
        - created_at
        - payment_date
        - effective_at
        - id
      type: string
    FundingEventPaymentV1:
      required:
        - currency
        - external_id
        - funding_amount
        - id
        - payment_amount
        - payment_date
        - payment_type
        - reason
        - status
        - trace_ids
      type: object
      properties:
        id:
          type: string
          description: Id.
          format: uuid
        payment_type:
          $ref: '#/components/schemas/PaymentTypeV1'
        payment_date:
          type: string
          description: Payment date.
          format: date
        currency:
          type: string
          description: Currency.
        funding_amount:
          type: integer
          description: Amount included in Funding Event.
          format: int32
        reason:
          $ref: '#/components/schemas/FundingEventPaymentReasonV1'
        payment_amount:
          type: integer
          description: Payment Amount.
          format: int32
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsV1'
        paykey_details:
          $ref: '#/components/schemas/PaykeyDetailsV1'
        status:
          $ref: '#/components/schemas/PaymentStatusV1'
        external_id:
          type: string
          description: External id.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata for payment - only included if requested.
          nullable: true
        trace_ids:
          type: object
          additionalProperties:
            type: string
          description: >-
            Network-level trace identifiers assigned during processing. Keys
            vary by payment rail.
      additionalProperties: false
    FundingEventPaymentV1PagedResponse:
      required:
        - data
        - meta
        - response_type
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/PagedResponseMetadata'
        response_type:
          $ref: '#/components/schemas/ResponseTypeEnum'
        data:
          type: array
          items:
            $ref: '#/components/schemas/FundingEventPaymentV1'
      additionalProperties: false
    RefundChargeV1Request:
      required:
        - amount
      type: object
      properties:
        amount:
          type: integer
          description: >-
            The refund amount in cents. Must be greater than 0 and no more than
            the original charge amount.
          format: int32
          example: 5000
          nullable: true
        description:
          type: string
          description: >-
            Optional reason recorded on the refund payout. Appended to the
            system-generated description `Refund for Charge ID: {id}`.
          nullable: true
        external_id:
          type: string
          description: >-
            Optional unique identifier for this refund, used to correlate with
            your internal records. Defaults to a new value if not specified.
          nullable: true
        payment_date:
          type: string
          description: >-
            The date on which to submit the refund for processing. Defaults to
            today if not specified.
          format: date
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional key-value pairs for storing additional structured data.
            Keys and values must be strings.
          nullable: true
      additionalProperties: false
    RelatedPaymentEventTypeV1:
      enum:
        - original
        - resubmit
        - refund
      type: string
    RelatedPaymentEventV1:
      required:
        - id
        - relationship
        - payment_type
      type: object
      properties:
        id:
          type: string
          description: The ID of the related payment.
          format: uuid
        relationship:
          $ref: '#/components/schemas/RelatedPaymentEventTypeV1'
        payment_type:
          $ref: '#/components/schemas/PaymentTypeV1'
      additionalProperties: false
    RelatedPaymentTypeV1:
      enum:
        - original
        - resubmit
        - refund
      type: string
    RelatedPaymentV1:
      required:
        - id
        - relationship
        - payment_type
      type: object
      properties:
        id:
          type: string
          description: The ID of the related payment.
          format: uuid
        relationship:
          $ref: '#/components/schemas/RelatedPaymentTypeV1'
        payment_type:
          $ref: '#/components/schemas/PaymentTypeV1'
      additionalProperties: false
    ResubmitChargeV1Request:
      type: object
      properties:
        description:
          type: string
          description: Description.
          nullable: true
        payment_date:
          type: string
          description: Payment date.
          format: date
          nullable: true
        external_id:
          type: string
          description: External id.
          nullable: true
      additionalProperties: false
    ResubmitPayoutV1Request:
      type: object
      properties:
        description:
          type: string
          description: Description.
          nullable: true
        payment_date:
          type: string
          description: Payment date.
          format: date
          nullable: true
        external_id:
          type: string
          description: External id.
          nullable: true
      additionalProperties: false
    PaymentTypeEventV1:
      enum:
        - charge
        - payout
      type: string
    RelatedPaymentsEventV1:
      required:
        - id
        - payment_type
        - relationship
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the related payment.
          format: uuid
        relationship:
          $ref: '#/components/schemas/RelatedPaymentEventTypeV1'
        payment_type:
          $ref: '#/components/schemas/PaymentTypeEventV1'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use your Straddle API Key in the Authorization header as Bearer <token>
        to authorize API requests.
      scheme: bearer
      bearerFormat: JWT
webhooks:
  account.created.v1:
    post:
      operationId: account.created.v1
      description: >-
        Fired when a platform creates a new embedded merchant account. This
        event contains the account details including business profile
        information, capabilities, and account status.
      summary: 'Webhook event: account.created.v1'
      x-svix-group-name: Accounts
      requestBody:
        description: Webhook payload for account.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: account.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/AccountV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  account.event.v1:
    post:
      operationId: account.event.v1
      description: >-
        Triggered when any significant change occurs to a platform-created
        embedded account's status or configuration. This includes updates to
        account settings, changes in verification status, or modifications to
        account limits and capabilities.
      summary: 'Webhook event: account.event.v1'
      x-svix-group-name: Accounts
      requestBody:
        description: Webhook payload for account.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: account.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/AccountV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  representative.event.v1:
    post:
      operationId: representative.event.v1
      description: >-
        Triggered when any significant change occurs to a platform-created
        embedded account's representatives. This includes updates to the
        representative status or values.
      summary: 'Webhook event: representative.event.v1'
      x-svix-group-name: Representatives
      requestBody:
        description: Webhook payload for representative.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: representative.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/RepresentativeV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  representative.created.v1:
    post:
      operationId: representative.created.v1
      description: >-
        Fired when a platform creates a new embedded merchant account's
        representative. This event contains the representative details.
      summary: 'Webhook event: representative.created.v1'
      x-svix-group-name: Representatives
      requestBody:
        description: Webhook payload for representative.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: representative.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/RepresentativeV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  linked_bank_account.event.v1:
    post:
      operationId: linked_bank_account.event.v1
      description: >-
        Triggered when any significant change occurs to a platform-created
        embedded account's linked bank account. This includes updates to the
        linked bank account status or values.
      summary: 'Webhook event: linked_bank_account.event.v1'
      x-svix-group-name: LinkedBankAccounts
      requestBody:
        description: Webhook payload for linked_bank_account.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: linked_bank_account.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/LinkedBankAccountV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  linked_bank_account.created.v1:
    post:
      operationId: linked_bank_account.created.v1
      description: >-
        Fired when a platform creates a new embedded merchant account's
        LinkedBankAccount. This event contains the LinkedBankAccount details.
      summary: 'Webhook event: linked_bank_account.created.v1'
      x-svix-group-name: LinkedBankAccounts
      requestBody:
        description: Webhook payload for linked_bank_account.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: linked_bank_account.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/LinkedBankAccountV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  capability_request.event.v1:
    post:
      operationId: capability_request.event.v1
      description: >-
        Triggered when any significant change occurs to a platform-created
        embedded account's capability request. This includes updates to the
        capability request status or values.
      summary: 'Webhook event: capability_request.event.v1'
      x-svix-group-name: CapabilityRequests
      requestBody:
        description: Webhook payload for capability_request.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: capability_request.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/CapabilityRequestV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  capability_request.created.v1:
    post:
      operationId: capability_request.created.v1
      description: >-
        Fired when a platform creates a new embedded merchant account's
        CapabilityRequest. This event contains the CapabilityRequest details.
      summary: 'Webhook event: capability_request.created.v1'
      x-svix-group-name: CapabilityRequests
      requestBody:
        description: Webhook payload for capability_request.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: capability_request.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/CapabilityRequestV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
      x-svix-feature-flags:
        - platform
  customer.event.v1:
    post:
      operationId: customer.event.v1
      description: >-
        Triggered when there are important updates to a customer's profile or
        status. This includes changes in verification status, updated compliance
        checks, modified risk ratings, or changes to customer information.
      summary: 'Webhook event: customer.event.v1'
      x-svix-group-name: Customers
      requestBody:
        description: Webhook payload for customer.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: customer.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/CustomerEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  customer.created.v1:
    post:
      operationId: customer.created.v1
      description: >-
        Fired when a new customer is created in the system. The event includes
        customer profile details, verification status, and initial compliance
        screening outcome.
      summary: 'Webhook event: customer.created.v1'
      x-svix-group-name: Customers
      requestBody:
        description: Webhook payload for customer.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: customer.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/CustomerEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  paykey.event.v1:
    post:
      operationId: paykey.event.v1
      description: >-
        Triggered when there are important updates to a Paykey's status or
        associated bank account. This includes verification status changes,
        fraud detection alerts, or modifications to usage permissions.
      summary: 'Webhook event: paykey.event.v1'
      x-svix-group-name: Customers
      requestBody:
        description: Webhook payload for paykey.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: paykey.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PaykeyEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  paykey.created.v1:
    post:
      operationId: paykey.created.v1
      description: >-
        Fired when a new Paykey is generated linking a customer to their bank
        account. The event includes tokenized bank account details, verification
        status, and initial fraud screening results.
      summary: 'Webhook event: paykey.created.v1'
      x-svix-group-name: Customers
      requestBody:
        description: Webhook payload for paykey.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: paykey.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PaykeyEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  charge.created.v1:
    post:
      operationId: charge.created.v1
      description: >-
        Fired when a new charge is initiated against a customer's bank account.
        The event includes details about the charge object, the associated
        Paykey and bank account, and initial payment status.
      summary: 'Webhook event: charge.created.v1'
      x-svix-group-name: Payments
      requestBody:
        description: Webhook payload for charge.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: charge.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/ChargeEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  charge.event.v1:
    post:
      operationId: charge.event.v1
      description: >-
        Triggered throughout the charge lifecycle to indicate status changes and
        important events. This includes successful processing, failed attempts,
        balance check results, fraud detection alerts, and final settlement
        status.
      summary: 'Webhook event: charge.event.v1'
      x-svix-group-name: Payments
      requestBody:
        description: Webhook payload for charge.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: charge.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/ChargeEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  payout.created.v1:
    post:
      operationId: payout.created.v1
      description: >-
        Fired when a new payout is initiated to transfer funds to a customer's
        bank account. The event includes payout amount, destination bank
        details, selected payment rail, and initial processing status.
      summary: 'Webhook event: payout.created.v1'
      x-svix-group-name: Payments
      requestBody:
        description: Webhook payload for payout.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: payout.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PayoutEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  payout.event.v1:
    post:
      operationId: payout.event.v1
      description: >-
        Triggered throughout the payout lifecycle to indicate status changes and
        important events. This includes successful processing, failed attempts,
        rail selection optimization, and final settlement status.
      summary: 'Webhook event: payout.event.v1'
      x-svix-group-name: Payments
      requestBody:
        description: Webhook payload for payout.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: payout.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PayoutEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  platform.event.v1:
    post:
      operationId: platform.event.v1
      description: >-
        Fired when a platform is created. This webhook is only supposed to be
        consumed by Straddle.
      summary: 'Webhook event: platform.event.v1'
      x-svix-feature-flags:
        - internal
      x-svix-group-name: Platforms
      requestBody:
        description: Webhook payload for platform.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: platform.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PlatformV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  platform.created.v1:
    post:
      operationId: platform.created.v1
      description: >-
        Triggered when any significant change occurs to a platform. This webhook
        is only supposed to be consumed by Straddle.
      summary: 'Webhook event: platform.created.v1'
      x-svix-feature-flags:
        - internal
      x-svix-group-name: Platforms
      requestBody:
        description: Webhook payload for platform.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: platform.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/PlatformV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  user.event.v1:
    post:
      operationId: user.event.v1
      description: >-
        Fired when a user is created. This webhook is only supposed to be
        consumed by Straddle.
      summary: 'Webhook event: user.event.v1'
      x-svix-feature-flags:
        - internal
      x-svix-group-name: Users
      requestBody:
        description: Webhook payload for user.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: user.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/UserV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  user.created.v1:
    post:
      operationId: user.created.v1
      description: >-
        Triggered when any significant change occurs to a user. This webhook is
        only supposed to be consumed by Straddle.
      summary: 'Webhook event: user.created.v1'
      x-svix-feature-flags:
        - internal
      x-svix-group-name: Users
      requestBody:
        description: Webhook payload for user.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: user.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/UserV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  funding_event.created.v1:
    post:
      operationId: funding_event.created.v1
      description: >-
        Fired when a new funding event has been initiated to transfer funds to
        or from your bank account. The event includes funding events amount and
        initial processing status.
      summary: 'Webhook event: funding_event.created.v1'
      x-svix-group-name: FundingEvents
      requestBody:
        description: Webhook payload for funding_event.created.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: funding_event.created.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/FundingEventEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
  funding_event.event.v1:
    post:
      operationId: funding_event.event.v1
      description: >-
        Triggered throughout the funding events lifecycle to indicate status
        changes and important events. This includes successful processing,
        failed attempts, and final settlement status.
      summary: 'Webhook event: funding_event.event.v1'
      x-svix-group-name: FundingEvents
      requestBody:
        description: Webhook payload for funding_event.event.v1
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  description: Type of the event
                  example: funding_event.event.v1
                event_id:
                  type: string
                  format: uuid
                  description: UUID of the event
                  example: 85df84c7-a298-44bc-8040-7bd2ae372cbf
                account_id:
                  type: string
                  format: uuid
                  description: UUID of the account associated with this event
                  example: 857c679a-8e80-47f1-9334-39dd08ea801f
                data:
                  $ref: '#/components/schemas/FundingEventEventV1'
              required:
                - event_type
                - event_id
                - account_id
                - data
      responses:
        '200':
          description: Webhook processed successfully
