openapi: 3.1.1
servers:
  - url: https://api.solidgate.com/v2
    description: Solidgate API
info:
  license:
    url: https://solidgate.com/legal/terms-of-use/
    name: Terms and policies
  version: 2.0.0
  title: Solidgate API Reference
  description: >
    Solidgate API v2 simplifies payment integration with consistent REST
    conventions.


    <br>

    <p><strong>OpenAPI specification</strong></p>

    <p>Full schema for programmatic integration: endpoint paths,
    request/response shapes, and field definitions.</p>


    <div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;">

      <a href="/_bundle/api/@v2/index.yaml?download" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <rect x="1" y="1" width="12" height="12" rx="1.5" stroke="#fff" stroke-width="0.9" fill="none"/>
          <text x="7" y="6.5" fill="#fff" font-family="Arial,sans-serif" font-size="4" font-weight="bold" text-anchor="middle">YA</text>
          <text x="7" y="11" fill="#fff" font-family="Arial,sans-serif" font-size="4" font-weight="bold" text-anchor="middle">ML</text>
        </svg>
        YAML
      </a>

      <a href="/_bundle/api/@v2/index.json?download" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M5.5 2C4.3 2 3.8 2.5 3.8 3.8V5.2C3.8 6.2 3.3 6.5 2.3 6.7V7.3C3.3 7.5 3.8 7.8 3.8 8.8V10.2C3.8 11.5 4.3 12 5.5 12" stroke="#fff" stroke-width="1" stroke-linecap="round" fill="none"/>
          <path d="M8.5 2C9.7 2 10.2 2.5 10.2 3.8V5.2C10.2 6.2 10.7 6.5 11.7 6.7V7.3C10.7 7.5 10.2 7.8 10.2 8.8V10.2C10.2 11.5 9.7 12 8.5 12" stroke="#fff" stroke-width="1" stroke-linecap="round" fill="none"/>
        </svg>
        JSON
      </a>

    </div>


    <br>

    <p><strong>Frontend SDK</strong></p>

    <p>These are the primary frontend libraries. Use them to embed payment forms
    directly in your client-side application</p>


    <div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;">

      <a href="https://github.com/solidgate-tech/react-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <circle cx="7" cy="7" r="1.2" fill="#fff"/>
          <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none"/>
          <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none" transform="rotate(60,7,7)"/>
          <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none" transform="rotate(120,7,7)"/>
        </svg>
        React
      </a>

      <a href="https://github.com/solidgate-tech/vue-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M1 2L7 12.5L13 2H10.5L7 8L3.5 2Z" fill="#fff"/>
          <path d="M3.5 2L7 8L10.5 2H8.5L7 5L5.5 2Z" fill="#000"/>
        </svg>
        Vue
      </a>

      <a href="https://github.com/solidgate-tech/angular-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M7 1L1.5 3L2.5 10.5L7 13.5L11.5 10.5L12.5 3Z" fill="#fff"/>
          <path d="M7 3.5L4.5 10H5.8L6.4 8.5H7.6L8.2 10H9.5L7 3.5ZM7 5.5L7.3 7.5H6.7Z" fill="#000"/>
        </svg>
        Angular
      </a>

    </div>


    <br>


    <p><strong>Backend SDK</strong></p>

    <p>Multiple backend libraries to manage server-side processing, advanced
    integrations, form resign flows, and reconciling orders.</p>


    <div style="display:flex;flex-wrap:wrap;gap:8px;">

      <a href="https://github.com/solidgate-tech/php-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <ellipse cx="7" cy="7" rx="6" ry="3.5" stroke="#fff" stroke-width="0.9"/>
          <text x="7" y="8.5" fill="#fff" font-family="Arial,sans-serif" font-size="3.5" font-weight="bold" text-anchor="middle">php</text>
        </svg>
        PHP
      </a>

      <a href="https://github.com/solidgate-tech/nodejs-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M7 1L13 4.5V9.5L7 13L1 9.5V4.5Z" stroke="#fff" stroke-width="0.9"/>
          <text x="7" y="8.5" fill="#fff" font-family="Arial,sans-serif" font-size="3.5" font-weight="bold" text-anchor="middle">JS</text>
        </svg>
        Node.js
      </a>

      <a href="https://github.com/solidgate-tech/go-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M6.5 4C4 4 2.5 5.5 2.5 7C2.5 8.5 4 10 6.5 10V7H4.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" stroke-linejoin="round"/>
          <ellipse cx="10.5" cy="7" rx="2" ry="3" stroke="#fff" stroke-width="0.9"/>
        </svg>
        Go
      </a>

      <a href="https://github.com/solidgate-tech/kotlin-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M2 2H12L2 12Z" fill="#fff"/>
          <path d="M2 12L7 7L12 12Z" fill="#fff"/>
        </svg>
        Kotlin
      </a>

      <a href="https://github.com/solidgate-tech/python-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
          <path d="M7 1C4.5 1 3.5 2 3.5 4V6H7V6.5H4C2.5 6.5 1.5 7.5 1.5 9.5V10.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" fill="none"/>
          <path d="M7 13C9.5 13 10.5 12 10.5 10V8H7V7.5H10C11.5 7.5 12.5 6.5 12.5 4.5V3.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" fill="none"/>
          <circle cx="5.5" cy="3.5" r="0.6" fill="#fff"/>
          <circle cx="8.5" cy="10.5" r="0.6" fill="#fff"/>
        </svg>
        Python
      </a>

    </div>


    <div style="display:flex; flex-wrap:wrap; gap:8px; margin-top: 20px;">
        <p>Enhance understanding with our <a href="https://docs.solidgate.com/payments/" target="_blank">payment guide</a>. <br>
        For help, write to <a href="https://solidgate.com/support/" target="_blank">support@solidgate.com.</a></p>
    </div>
x-tagGroups:
  - name: Integration
    tags:
      - API keys
      - Channels
      - Webhooks
  - name: Customers
    tags:
      - Customers
      - Payment instruments
  - name: Billing
    tags:
      - Invoices
  - name: Risks
    tags:
      - Antifraud lists
tags:
  - name: API keys
    description: >-
      Create, list, retrieve, and rotate API keys so you can securely
      authenticate requests and control access to the API.
  - name: Channels
    description: >-
      List the channels available to your account so you can use them in API
      operations, such as configuring API keys.
  - name: Customers
    description: >-
      Create, update, and retrieve customer records to keep data consistent
      across payments and billing.
  - name: Payment instruments
    description: >-
      List, retrieve, and revoke customer payment instruments and receive events
      when payment instruments change.
  - name: Invoices
    description: >-
      Create, update, finalize, void, pay using a saved payment instrument, and
      retrieve invoices to issue and track billing for your customers.
  - name: Antifraud lists
    description: >-
      Manage lists and items to allow or block transactions and reduce
      chargebacks and fraud.
  - name: Webhooks
    description: >-
      Create, list, patch, delete, and retrieve webhook endpoints, manage secret
      keys, and receive events when customer or invoice records change.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: SECRET
      description: >-
        Secret value sent in the `Authorization` header using the `Bearer`
        scheme.
    signatureAuth:
      type: apiKey
      in: header
      name: Signature
      description: >-
        Base64-encoded HMAC-SHA256 of the raw request body, computed with the
        webhook endpoint's secret key.
  schemas:
    CreateWebhookRequest:
      title: CreateWebhookRequest
      type: object
      required:
        - name
        - url
        - event_types
      properties:
        name:
          type: string
          description: Webhook endpoint name.
          minLength: 1
          maxLength: 255
          example: Billing webhook endpoint
        description:
          type: string
          description: Webhook endpoint description.
          maxLength: 1000
          example: Receives billing events for integration
        url:
          type: string
          description: URL where the webhook events are sent.
          minLength: 1
          maxLength: 2048
          example: https://mycompany.com/solidgate/webhook
        event_types:
          type: array
          description: List of event types the webhook subscribes to.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - INVOICE_CREATED
            - CUSTOMER_UPDATED
          minItems: 1
          maxItems: 1000
          uniqueItems: true
        included_channel_ids:
          type: array
          description: |
            List of channel IDs to include in the webhook events.
            Cannot be used together with `excluded_channel_ids`.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
          minItems: 1
          maxItems: 1000
          uniqueItems: true
        excluded_channel_ids:
          type: array
          description: |
            List of channel IDs to exclude from the webhook events.
            Cannot be used together with `included_channel_ids`.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
          minItems: 1
          maxItems: 1000
          uniqueItems: true
    CreateWebhookResponse:
      title: CreateWebhookResponse
      type: object
      description: Contains webhook endpoint details and the signing secret.
      required:
        - id
        - url
        - event_types
        - status
        - secret
        - created_at
        - updated_at
        - name
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
        url:
          type: string
          description: URL where the webhook events are sent.
          example: https://mycompany.com/solidgate/webhook
        event_types:
          type: array
          description: List of event types the webhook subscribes to.
          items:
            type: string
          example:
            - INVOICE_CREATED
            - CUSTOMER_UPDATED
        status:
          type: string
          description: Webhook endpoint status.
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        secret:
          type: string
          description: >-
            Secret value used to sign webhook payloads. Copy and store this
            value securely, as it is provided only once.
          example: wsec_********************
        created_at:
          type: string
          description: Date and time when the webhook endpoint was created.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the webhook endpoint was last updated.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
        name:
          type: string
          description: Webhook endpoint name.
          example: Billing webhook endpoint
        description:
          type: string
          description: Webhook endpoint description.
          example: Receives billing events for integration
        included_channel_ids:
          type: array
          description: |
            List of channel IDs to include in the webhook events.
            Cannot be used together with `excluded_channel_ids`.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        excluded_channel_ids:
          type: array
          description: |
            List of channel IDs to exclude from the webhook events.
            Cannot be used together with `included_channel_ids`.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      description: Error response returned when one or more request fields fail validation.
      required:
        - code
        - message
        - context
      properties:
        code:
          type: string
          description: Code identifying the error type.
          enum:
            - VALIDATION
          example: VALIDATION
        message:
          type: string
          description: Message describing the error.
          example: One or more fields failed validation due to constraints
        context:
          type: object
          description: >-
            Additional context about the validation error, including specific
            constraints.
          example:
            constraints:
              email:
                type: TYPE
                message: The 'email' field must be a valid email address
              age:
                type: MIN
                message: The 'age' field must be a number greater than or equal to 18
          required:
            - constraints
          properties:
            constraints:
              type: object
              description: Failed constraints keyed by the field name.
              additionalProperties:
                type: object
                description: Details about the constraint that failed for the field.
                required:
                  - type
                  - message
                properties:
                  type:
                    type: string
                    description: Type identifying the constraint violation.
                    example: MIN
                  message:
                    type: string
                    description: Message describing the constraint violation.
                    example: The 'email' field must be a valid email address
    UnauthenticatedErrorResponse:
      title: UnauthenticatedErrorResponse
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Code identifying the error type.
          enum:
            - UNAUTHENTICATED
          example: UNAUTHENTICATED
        message:
          type: string
          description: Message describing the error.
          example: Credentials are invalid or missing
    UnauthorizedErrorResponse:
      title: UnauthorizedErrorResponse
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Code identifying the error type.
          enum:
            - PERMISSION_DENIED
          example: PERMISSION_DENIED
        message:
          type: string
          description: Message describing the error.
          example: Permission denied
    StateErrorResponse:
      title: StateErrorResponse
      type: object
      description: >-
        Error response returned when the request conflicts with current business
        or system state.
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Code identifying the error type.
          example: INCOMPATIBLE_STATUS
        message:
          type: string
          description: Message describing the error.
          example: The request conflicts with the current state
        context:
          type: object
          description: Additional error context.
          additionalProperties:
            description: Additional context property.
    PaginationInfo:
      title: PaginationInfo
      type: object
      description: Contains pagination information.
      properties:
        pagination:
          type: object
          description: Pagination details.
          required:
            - page_size
          properties:
            page_size:
              type: integer
              description: Number of items returned in this response.
              format: int32
              default: 20
              minimum: 1
              maximum: 100
              example: 20
            next_page_token:
              type: string
              description: >-
                Token to retrieve the next page of results. It is empty on the
                last page.
              minLength: 1
              maxLength: 1000
              example: >-
                eyJMYXN0SUQiOiIxYTYyYjQ0Ni01ZDM0LTRiYTQtOGRlZS02NTM5NTU0NjY2MTQifQ==
    ListWebhookRequest:
      title: ListWebhookRequest
      type: object
      allOf:
        - $ref: '#/components/schemas/PaginationInfo'
    WebhookDomainModel:
      title: WebhookDomainModel
      type: object
      description: Webhook endpoint.
      required:
        - id
        - url
        - event_types
        - status
        - created_at
        - updated_at
        - name
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
        url:
          type: string
          description: URL where the webhook events are sent.
          example: https://mycompany.com/solidgate/webhook
        event_types:
          type: array
          description: List of event types the webhook subscribes to.
          items:
            type: string
          example:
            - INVOICE_CREATED
            - CUSTOMER_UPDATED
        status:
          type: string
          description: Webhook endpoint status.
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        created_at:
          type: string
          description: Date and time when the webhook endpoint was created.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the webhook endpoint was last updated.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
        name:
          type: string
          description: Webhook endpoint name.
          example: Billing webhook endpoint
        description:
          type: string
          description: Webhook endpoint description.
          example: Receives billing events for integration
        included_channel_ids:
          type: array
          description: |
            List of channel IDs to include in the webhook events.
            Cannot be used together with `excluded_channel_ids`.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        excluded_channel_ids:
          type: array
          description: |
            List of channel IDs to exclude from the webhook events.
            Cannot be used together with `included_channel_ids`.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        rotate_at:
          type: string
          description: >-
            Date and time when the previous secret expires, and the new secret
            becomes the only valid secret. Present while a secret rotation is in
            progress.
          format: date-time
          example: '2026-04-08T12:11:10.877301Z'
    ListWebhookResponse:
      title: ListWebhookResponse
      type: object
      description: Webhook list response.
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of webhook endpoints for the current page.
              items:
                $ref: '#/components/schemas/WebhookDomainModel'
              example:
                - id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                  name: Billing webhook endpoint
                  description: Receives billing events for integration
                  url: https://mycompany.com/solidgate/webhook
                  event_types:
                    - INVOICE_CREATED
                    - CUSTOMER_UPDATED
                  status: ACTIVE
                  included_channel_ids:
                    - '12345'
                    - '67890'
                  created_at: '2024-01-01T10:00:00.000000Z'
                  updated_at: '2024-01-02T15:00:00.000000Z'
        - $ref: '#/components/schemas/PaginationInfo'
    GetWebhookRequest:
      title: GetWebhookRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          minLength: 1
          maxLength: 100
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
    NotFoundErrorResponse:
      title: NotFoundErrorResponse
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Code identifying the error type.
          enum:
            - NOT_FOUND
          example: NOT_FOUND
        message:
          type: string
          description: Message describing the error. The entity varies by endpoint.
          example: The requested resource could not be found
    PatchWebhookRequest:
      title: PatchWebhookRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          minLength: 1
          maxLength: 100
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
        name:
          type: string
          description: Webhook endpoint name.
          minLength: 1
          maxLength: 255
          example: Billing webhook endpoint
        description:
          type: string
          description: Webhook endpoint description.
          maxLength: 1000
          example: Receives billing events for integration
        url:
          type: string
          description: URL where the webhook events are sent.
          minLength: 1
          maxLength: 2048
          example: https://mycompany.com/solidgate/webhook
        event_types:
          type: array
          description: List of event types the webhook subscribes to.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - INVOICE_CREATED
            - CUSTOMER_UPDATED
          minItems: 1
          maxItems: 1000
          uniqueItems: true
        status:
          type: string
          description: Webhook endpoint status.
          enum:
            - ACTIVE
            - INACTIVE
          maxLength: 50
          example: ACTIVE
        included_channel_ids:
          type: array
          description: |
            List of channel IDs to include in the webhook events.
            Cannot be used together with `excluded_channel_ids`.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
          minItems: 0
          maxItems: 1000
          uniqueItems: true
        excluded_channel_ids:
          type: array
          description: |
            List of channel IDs to exclude from the webhook events.
            Cannot be used together with `included_channel_ids`.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
          minItems: 0
          maxItems: 1000
          uniqueItems: true
    DeleteWebhookRequest:
      title: DeleteWebhookRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          minLength: 1
          maxLength: 100
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
    RotateWebhookKeyRequest:
      title: RotateWebhookKeyRequest
      type: object
      required:
        - id
        - period_seconds
      properties:
        id:
          type: string
          description: Unique webhook endpoint identifier.
          minLength: 1
          maxLength: 100
          example: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
        period_seconds:
          type: integer
          description: >-
            Duration of the rotation period in seconds during which both the new
            and previous secrets remain valid.
          minimum: 3600
          maximum: 604800
          example: 86400
    RotateWebhookKeyResponse:
      title: RotateWebhookKeyResponse
      type: object
      description: >-
        Contains details of the rotated webhook endpoint and the new secret. The
        previous secret remains valid until the date and time returned in
        `rotate_at`.
      allOf:
        - $ref: '#/components/schemas/WebhookDomainModel'
        - type: object
          required:
            - rotate_secret
            - rotate_at
          properties:
            rotate_secret:
              type: string
              description: >-
                New secret value used for signing webhook payloads. Copy and
                store this value securely, as it is provided only once.
              example: wsec_********************
    CreateApiKeyRequest:
      title: CreateApiKeyRequest
      type: object
      required:
        - name
        - permissions
      properties:
        name:
          type: string
          description: API key name.
          minLength: 1
          maxLength: 255
          example: Production API Key
        description:
          type: string
          description: API key description.
          maxLength: 1000
          example: Used for production environment
        channel_ids:
          type: array
          description: List of channel IDs that restrict API key access.
          items:
            type: string
            minLength: 1
            maxLength: 100
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
          minItems: 0
          maxItems: 1000
        permissions:
          type: array
          description: Permissions granted to the API key.
          items:
            type: string
            maxLength: 100
          example:
            - payment:create
            - payment:read
          minItems: 1
          maxItems: 1000
    CreateApiKeyResponse:
      title: CreateApiKeyResponse
      type: object
      description: Contains API key details and the secret.
      required:
        - id
        - name
        - secret
        - permissions
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique API key identifier.
          example: akey_163f12ss514120a58gt851c5d338d072
        name:
          type: string
          description: API key name.
          example: Production API Key
        description:
          type: string
          description: API key description.
          example: Used for production environment
        secret:
          type: string
          description: >-
            Secret value used for authentication. Copy and store this value
            securely, as it is provided only once.
          example: asec_********************
        channel_ids:
          type: array
          description: Channel IDs that the API key has access to.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        permissions:
          type: array
          description: Permissions granted to the API key.
          items:
            type: string
          example:
            - payment:create
            - payment:read
        created_at:
          type: string
          description: Date and time of API key creation.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time of the last API key update.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
    ListApiKeyRequest:
      title: ListApiKeyRequest
      type: object
      allOf:
        - $ref: '#/components/schemas/PaginationInfo'
    ApiKeyDomainModel:
      title: ApiKeyDomainModel
      type: object
      description: API key for authentication and authorization.
      required:
        - id
        - name
        - permissions
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique API key identifier.
          example: akey_163f12ss514120a58gt851c5d338d072
        name:
          type: string
          description: API key name.
          example: Production API Key
        description:
          type: string
          description: API key description.
          example: Used for production environment
        rotate_at:
          type: string
          description: Date and time of the secret rotation.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        channel_ids:
          type: array
          description: Channel IDs that the API key has access to.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        permissions:
          type: array
          description: Permissions granted to the API key.
          items:
            type: string
          example:
            - payment:create
            - payment:read
        created_at:
          type: string
          description: Date and time of API key creation.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time of the last API key update.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
    ListApiKeyResponse:
      title: ListApiKeyResponse
      type: object
      description: API key list response.
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of API keys for the current page.
              items:
                $ref: '#/components/schemas/ApiKeyDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    GetApiKeyRequest:
      title: GetApiKeyRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique API key identifier.
          minLength: 1
          maxLength: 100
          example: akey_163f12ss514120a58gt851c5d338d072
    RotateApiKeyRequest:
      title: RotateApiKeyRequest
      type: object
      required:
        - id
        - period_seconds
      properties:
        id:
          type: string
          description: Unique API key identifier.
          minLength: 1
          maxLength: 100
          example: akey_163f12ss514120a58gt851c5d338d072
        period_seconds:
          type: integer
          description: >-
            Duration of the rotation period in seconds during which both the new
            and previous secrets remain valid.
          minimum: 3600
          maximum: 604800
          example: 86400
    RotateApiKeyResponse:
      title: RotateApiKeyResponse
      type: object
      description: >-
        Contains details of the rotated API key and the new secret. The previous
        secret remains valid until the date and time returned in `rotate_at`.
      required:
        - id
        - name
        - rotate_secret
        - rotate_at
        - permissions
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique API key identifier.
          example: akey_163f12ss514120a58gt851c5d338d072
        name:
          type: string
          description: API key name.
          example: Production API Key
        description:
          type: string
          description: API key description.
          example: Used for production environment
        rotate_secret:
          type: string
          description: New secret value used for authentication.
          example: asec_********************
        rotate_at:
          type: string
          description: >-
            Date and time when the previous secret expires and `rotate_secret`
            becomes the only valid secret.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        channel_ids:
          type: array
          description: Channel IDs that the API key has access to.
          items:
            type: string
          example:
            - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
            - chn_01KTXHKMEXBM5JMEQAHBCV6802
        permissions:
          type: array
          description: Permissions granted to the API key.
          items:
            type: string
          example:
            - payment:create
            - payment:read
        created_at:
          type: string
          description: Date and time of API key creation.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time of the last API key update.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
    ListChannelRequest:
      title: ListChannelRequest
      type: object
      allOf:
        - $ref: '#/components/schemas/PaginationInfo'
    ChannelDomainModel:
      title: ChannelDomainModel
      type: object
      description: Payment channel configuration.
      required:
        - id
        - name
        - status
        - environment
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique channel identifier.
          minLength: 1
          maxLength: 100
          example: chn_01KTBNAWDRCQG7ZE1FKV6M3DAM
        name:
          type: string
          description: Channel name.
          example: Production Channel
        description:
          type: string
          description: Channel description.
          example: Main production payment channel
        status:
          type: string
          description: Channel status.
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        environment:
          type: string
          description: Channel environment.
          enum:
            - MERCHANT_SANDBOX
            - MERCHANT_LIVE
          example: MERCHANT_LIVE
        created_at:
          type: string
          description: Date and time when the channel was created.
          format: date-time
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the channel was updated.
          format: date-time
          example: '2024-01-02T15:00:00.000000Z'
    ListChannelResponse:
      title: ListChannelResponse
      type: object
      description: Channel list response.
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of channels for the current page.
              items:
                $ref: '#/components/schemas/ChannelDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    CustomerAddressRequest:
      title: CustomerAddressRequest
      description: Customer address.
      type: object
      minProperties: 1
      properties:
        city:
          type: string
          description: City name.
          minLength: 1
          maxLength: 100
          example: Anytown
        country:
          type: string
          description: Country according to the ISO-3166 alpha-3 country code.
          minLength: 3
          maxLength: 3
          example: USA
        line1:
          type: string
          description: Address line 1.
          minLength: 1
          maxLength: 100
          example: 123 Main St
        line2:
          type: string
          description: Address line 2.
          minLength: 1
          maxLength: 100
          example: Suite 456
        state:
          type: string
          description: State or province.
          minLength: 1
          maxLength: 10
          example: CA
        postal_code:
          type: string
          description: Postal or ZIP code.
          minLength: 2
          maxLength: 10
          example: '12345'
      example:
        city: Anytown
        country: USA
        line1: 123 Main St
        line2: Suite 456
        state: CA
        postal_code: '12345'
    TaxRegistrationValidation:
      title: TaxRegistrationValidation
      type: object
      description: Validation result for tax registration.
      required:
        - status
        - validated_at
        - source
      properties:
        status:
          type: string
          description: Validation status.
          enum:
            - UNVERIFIED
            - VERIFIED
          maxLength: 10
          example: VERIFIED
        validated_at:
          type: string
          description: Timestamp when validation was performed.
          format: date-time
          maxLength: 50
          example: '2024-01-15T10:30:00Z'
        source:
          type: string
          description: Method or external system used for validation.
          enum:
            - VIES
            - MANUAL
          maxLength: 6
          example: VIES
    TaxRegistration:
      title: TaxRegistration
      type: object
      description: Tax registration entry for customer.
      required:
        - scheme
        - id
        - country
      properties:
        scheme:
          type: string
          description: Tax registration scheme.
          enum:
            - VAT
          maxLength: 3
          example: VAT
        id:
          type: string
          description: Tax registration number for the specified scheme.
          minLength: 1
          maxLength: 100
          example: DE123456789
        country:
          type: string
          description: ISO 3166-1 alpha-3 country code.
          minLength: 3
          maxLength: 3
          example: DEU
        validation:
          $ref: '#/components/schemas/TaxRegistrationValidation'
    Configuration:
      title: Configuration
      type: object
      description: Customer-level configuration settings.
      minProperties: 1
      properties:
        default_billing_currency:
          type: string
          description: ISO 4217 currency code used as default for billing.
          minLength: 3
          maxLength: 3
          example: USD
        default_payment_instrument_id:
          type: string
          description: >-
            Unique identifier of the default <a
            href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
            target="_blank">payment instrument</a> for this customer.
          maxLength: 100
          example: pi_01J1Z2X3Y4W5V6U7T8S9R0
        preferred_locales:
          type: array
          description: Ordered list of preferred locales as BCP 47 tags.
          items:
            type: string
            description: BCP 47 locale tag.
            maxLength: 35
            example: en-US
          example:
            - en-US
            - de-DE
          maxItems: 10
    BusinessDetails:
      title: BusinessDetails
      type: object
      description: Business-specific details for a customer profile.
      minProperties: 1
      properties:
        name:
          type: string
          description: Legal business name.
          minLength: 1
          maxLength: 255
          example: Acme Corporation
        legal_address:
          type: object
          description: Registered legal address of the business.
          oneOf:
            - title: Address with state
              allOf:
                - $ref: '#/components/schemas/CustomerAddressRequest'
                - type: object
                  required:
                    - city
                    - country
                    - line1
                    - postal_code
                    - state
                  properties:
                    country:
                      type: string
                      description: Country according to the ISO-3166 alpha-3 country code.
                      enum:
                        - AUS
                        - BRA
                        - CAN
                        - CHN
                        - IND
                        - KOR
                        - MEX
                        - MYS
                        - NZL
                        - USA
                      minLength: 3
                      maxLength: 3
                      example: USA
            - title: Address
              allOf:
                - $ref: '#/components/schemas/CustomerAddressRequest'
                - type: object
                  required:
                    - city
                    - country
                    - line1
                    - postal_code
                  properties:
                    country:
                      type: string
                      description: Country according to the ISO-3166 alpha-3 country code.
                      minLength: 3
                      maxLength: 3
                      example: DEU
                      not:
                        enum:
                          - AUS
                          - BRA
                          - CAN
                          - CHN
                          - IND
                          - KOR
                          - MEX
                          - MYS
                          - NZL
                          - USA
    CreateCustomerRequest:
      title: CreateCustomerRequest
      allOf:
        - type: object
          required:
            - email
          properties:
            merchant_customer_id:
              type: string
              description: Merchant's identifier for the customer.
              minLength: 1
              maxLength: 100
              example: '12345'
            email:
              type: string
              description: Customer email.
              format: email
              minLength: 1
              maxLength: 100
              example: customer@example.com
            first_name:
              type: string
              description: Customer first name.
              minLength: 1
              maxLength: 100
              example: John
            last_name:
              type: string
              description: Customer last name.
              minLength: 1
              maxLength: 100
              example: Doe
            phone:
              type: string
              description: Customer phone number.
              minLength: 1
              maxLength: 18
              example: '+1234567890'
            address:
              $ref: '#/components/schemas/CustomerAddressRequest'
            tax:
              type: object
              description: >-
                Provides customer <a
                href="https://docs.solidgate.com/billing/taxes/"
                target="_blank">tax</a> information.
              minProperties: 1
              properties:
                taxability:
                  type: string
                  description: >-
                    Indicates if the customer is subject to <a
                    href="https://docs.solidgate.com/billing/taxes/"
                    target="_blank">tax</a>.
                  enum:
                    - EXEMPT
                    - TAXABLE
                  default: TAXABLE
                  maxLength: 50
                  example: TAXABLE
                registrations:
                  type: array
                  description: >-
                    Tax <a
                    href="https://docs.solidgate.com/billing/taxes/manage-taxes/"
                    target="_blank">registrations</a> associated with the
                    customer.
                  items:
                    $ref: '#/components/schemas/TaxRegistration'
                  example:
                    - scheme: VAT
                      id: DE123456789
                      country: DEU
                  maxItems: 20
            configuration:
              $ref: '#/components/schemas/Configuration'
            metadata:
              type: object
              description: Arbitrary key-value metadata set by merchant.
              example:
                internal_ref: cust-123
              minProperties: 1
              maxProperties: 12
              propertyNames:
                maxLength: 256
              additionalProperties:
                type: string
                maxLength: 256
        - oneOf:
            - title: Individual
              type: object
              properties:
                type:
                  type: string
                  description: Customer type. Immutable after creation.
                  minLength: 10
                  maxLength: 10
                  example: INDIVIDUAL
                  const: INDIVIDUAL
              not:
                required:
                  - business_details
            - title: Business
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  description: Customer type. Immutable after creation.
                  minLength: 8
                  maxLength: 8
                  example: BUSINESS
                  const: BUSINESS
                business_details:
                  $ref: '#/components/schemas/BusinessDetails'
    CustomerAddress:
      title: CustomerAddress
      type: object
      description: Customer address.
      minProperties: 1
      properties:
        city:
          type: string
          description: City name.
          maxLength: 100
          example: Anytown
        country:
          type: string
          description: Country according to the ISO-3166 alpha-3 country code.
          maxLength: 3
          example: USA
        line1:
          type: string
          description: Address line 1.
          maxLength: 100
          example: 123 Main St
        line2:
          type: string
          description: Address line 2.
          maxLength: 100
          example: Suite 456
        state:
          type: string
          description: State or province.
          maxLength: 10
          example: CA
        postal_code:
          type: string
          description: Postal or ZIP code.
          maxLength: 10
          example: '12345'
    CustomerDomainModel:
      title: CustomerDomainModel
      type: object
      description: >-
        Represents a <a
        href="https://docs.solidgate.com/billing/manage-customers/customers/"
        target="_blank">customer</a> profile.
      allOf:
        - type: object
          required:
            - id
            - created_at
            - updated_at
            - email
            - tax
            - status
          properties:
            id:
              type: string
              description: Unique customer identifier.
              maxLength: 100
              example: cust_01KMG2ABYPF6XS5DMJQ817C429
            email:
              type: string
              description: Customer email.
              format: email
              maxLength: 100
              example: customer@example.com
            first_name:
              type: string
              description: Customer first name.
              maxLength: 100
              example: John
            last_name:
              type: string
              description: Customer last name.
              maxLength: 100
              example: Doe
            phone:
              type: string
              description: Customer phone number.
              maxLength: 18
              example: '+1234567890'
            merchant_customer_id:
              type: string
              description: Merchant's identifier for the customer.
              maxLength: 100
              example: '12345'
            address:
              $ref: '#/components/schemas/CustomerAddress'
            tax:
              type: object
              description: >-
                Provides customer <a
                href="https://docs.solidgate.com/billing/taxes/"
                target="_blank">tax</a> information.
              required:
                - taxability
              properties:
                taxability:
                  type: string
                  description: >-
                    Indicates if the customer is subject to <a
                    href="https://docs.solidgate.com/billing/taxes/"
                    target="_blank">tax</a>.
                  enum:
                    - EXEMPT
                    - TAXABLE
                  default: TAXABLE
                  maxLength: 50
                  example: TAXABLE
                registrations:
                  type: array
                  description: >-
                    Tax <a
                    href="https://docs.solidgate.com/billing/taxes/manage-taxes/"
                    target="_blank">registrations</a> associated with the
                    customer.
                  items:
                    $ref: '#/components/schemas/TaxRegistration'
                  example:
                    - scheme: VAT
                      id: DE123456789
                      country: DEU
                  maxItems: 20
            status:
              type: string
              description: Customer status.
              enum:
                - ACTIVE
                - INACTIVE
              maxLength: 8
              example: ACTIVE
            configuration:
              $ref: '#/components/schemas/Configuration'
            metadata:
              type: object
              description: Arbitrary key-value metadata set by merchant.
              example:
                internal_ref: cust-123
                segment: enterprise
              minProperties: 1
              additionalProperties:
                type: string
                maxLength: 256
            created_at:
              type: string
              description: Date and time when the customer was created.
              format: date-time
              maxLength: 30
              example: '2024-01-01T10:00:00.000000Z'
            updated_at:
              type: string
              description: Date and time when the customer was updated.
              format: date-time
              maxLength: 30
              example: '2024-01-02T15:00:00.000000Z'
        - oneOf:
            - title: Individual
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  description: Customer type.
                  minLength: 10
                  maxLength: 10
                  example: INDIVIDUAL
                  const: INDIVIDUAL
              not:
                required:
                  - business_details
            - title: Business
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  description: Customer type.
                  minLength: 8
                  maxLength: 8
                  example: BUSINESS
                  const: BUSINESS
                business_details:
                  $ref: '#/components/schemas/BusinessDetails'
    TooManyRequestsErrorResponse:
      title: TooManyRequestsErrorResponse
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Code identifying the error type.
          enum:
            - RATE_LIMIT
          example: RATE_LIMIT
        message:
          type: string
          description: Message describing the error.
          example: Rate limit exhausted
        context:
          type: object
          description: Additional context about the error.
          properties:
            next_try_at:
              type: string
              description: Timestamp indicating when to retry the request.
              format: date-time
              example: '2024-12-31T23:59:59.000000Z'
    PatchCustomerRequest:
      title: PatchCustomerRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique customer identifier.
          minLength: 1
          maxLength: 100
          example: cust_01KMG2ABYPF6XS5DMJQ817C429
        merchant_customer_id:
          type:
            - string
            - 'null'
          description: Merchant's identifier for the customer.
          minLength: 1
          maxLength: 100
          example: '12345'
        email:
          type: string
          description: Customer email.
          format: email
          minLength: 1
          maxLength: 100
          example: customer@example.com
        first_name:
          type:
            - string
            - 'null'
          description: Customer first name.
          minLength: 1
          maxLength: 100
          example: John
        last_name:
          type:
            - string
            - 'null'
          description: Customer last name.
          minLength: 1
          maxLength: 100
          example: Doe
        phone:
          type:
            - string
            - 'null'
          description: Customer phone number.
          minLength: 1
          maxLength: 18
          example: '+1234567890'
        address:
          type:
            - object
            - 'null'
          $ref: '#/components/schemas/CustomerAddressRequest'
        tax:
          type: object
          description: >-
            Provides customer <a
            href="https://docs.solidgate.com/billing/taxes/"
            target="_blank">tax</a> information.
          required:
            - taxability
          properties:
            taxability:
              type: string
              description: >-
                Indicates if the customer is subject to <a
                href="https://docs.solidgate.com/billing/taxes/"
                target="_blank">tax</a>.
              enum:
                - EXEMPT
                - TAXABLE
              maxLength: 50
              example: TAXABLE
            registrations:
              type:
                - array
                - 'null'
              description: >-
                List of <a
                href="https://docs.solidgate.com/billing/taxes/manage-taxes/"
                target="_blank">tax registrations</a>.
              items:
                $ref: '#/components/schemas/TaxRegistration'
              example:
                - scheme: VAT
                  id: DE123456789
                  country: DEU
              maxItems: 20
        status:
          type: string
          description: Customer status.
          enum:
            - ACTIVE
            - INACTIVE
          maxLength: 8
          example: ACTIVE
        business_details:
          type:
            - object
            - 'null'
          $ref: '#/components/schemas/BusinessDetails'
        configuration:
          type:
            - object
            - 'null'
          $ref: '#/components/schemas/Configuration'
        metadata:
          type:
            - object
            - 'null'
          description: Arbitrary key-value metadata set by merchant.
          example:
            internal_ref: cust-123
          minProperties: 1
          maxProperties: 12
          propertyNames:
            maxLength: 256
          additionalProperties:
            type: string
            maxLength: 256
    GetCustomerRequest:
      title: GetCustomerRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique customer identifier.
          minLength: 1
          maxLength: 100
          example: cust_01KMG2ABYPF6XS5DMJQ817C429
    ListCustomersRequest:
      title: ListCustomersRequest
      type: object
      allOf:
        - type: object
          properties:
            filters:
              type: object
              description: Filters for customers.
              minProperties: 1
              properties:
                type:
                  type: object
                  description: Operator and value for customer type filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 250
                      example: EQ
                    value:
                      type: string
                      description: Customer type value to filter by.
                      enum:
                        - INDIVIDUAL
                        - BUSINESS
                      maxLength: 10
                      example: INDIVIDUAL
                status:
                  type: object
                  description: Operator and value for customer status filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 250
                      example: EQ
                    value:
                      type: string
                      description: Customer status value to filter by.
                      enum:
                        - ACTIVE
                        - INACTIVE
                      maxLength: 8
                      example: ACTIVE
                email:
                  type: object
                  description: Operator and value for customer email filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: >-
                        Comparison operator. `CONTAINS` performs
                        case-insensitive substring search.
                      enum:
                        - CONTAINS
                      maxLength: 250
                      example: CONTAINS
                    value:
                      type: string
                      description: Customer email value to filter by.
                      minLength: 1
                      maxLength: 100
                      example: customer@example.com
                merchant_customer_id:
                  type: object
                  description: Operator and value for merchant customer identifier filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: >-
                        Comparison operator. Use `EQ` for a single value or `IN`
                        for multiple values.
                      enum:
                        - EQ
                        - IN
                      maxLength: 250
                      example: EQ
                    value:
                      type: string
                      description: >-
                        Single merchant customer identifier for `EQ`, or a
                        comma-separated list of identifiers for `IN`.
                      minLength: 1
                      maxLength: 1000
                      examples:
                        - '12345'
                        - 12345,67890,11111
        - $ref: '#/components/schemas/PaginationInfo'
    ListCustomersResponse:
      title: ListCustomersResponse
      type: object
      description: Response containing a paginated list of customers.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of customers for the current page.
              items:
                $ref: '#/components/schemas/CustomerDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    GetPaymentInstrumentRequest:
      title: GetPaymentInstrumentRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique payment instrument identifier.
          minLength: 1
          maxLength: 100
          example: pi_01J1Z2X3Y4W5V6U7T8S9R0
    CardDetails:
      title: CardDetails
      type: object
      description: Card details for a payment instrument.
      required:
        - last_four
        - bin
        - brand
        - type
        - bank
        - expiry_month
        - expiry_year
      properties:
        last_four:
          type: string
          description: Last four digits of the card number.
          minLength: 4
          maxLength: 4
          example: '4242'
        bin:
          type: string
          description: Bank identification number of the card.
          minLength: 6
          maxLength: 8
          example: '424242'
        brand:
          type: string
          description: Card brand.
          maxLength: 50
          example: VISA
        type:
          type: string
          description: Card type.
          maxLength: 50
          example: DEBIT
        bank:
          type: string
          description: Issuing bank name.
          maxLength: 100
          example: Chase Bank
        expiry_month:
          type: string
          description: Card expiration month in MM format.
          minLength: 2
          maxLength: 2
          example: '12'
        expiry_year:
          type: string
          description: Card expiration year in YYYY format.
          minLength: 4
          maxLength: 4
          example: '2030'
    PaypalDetails:
      title: PaypalDetails
      type: object
      description: PayPal details for a payment instrument.
      required:
        - email
      properties:
        email:
          type: string
          description: PayPal account email.
          format: email
          maxLength: 100
          example: customer@example.com
    PaymentInstrumentDomainModel:
      title: PaymentInstrumentDomainModel
      type: object
      description: >-
        Represents a <a
        href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
        target="_blank">payment instrument</a> stored for the customer.
      allOf:
        - type: object
          required:
            - id
            - customer_id
            - status
            - recurring_token
            - created_at
            - updated_at
          properties:
            id:
              type: string
              description: Unique payment instrument identifier.
              maxLength: 100
              example: pi_01J1Z2X3Y4W5V6U7T8S9R0
            customer_id:
              type: string
              description: >-
                Identifier of the <a
                href="https://docs.solidgate.com/billing/manage-customers/customers/"
                target="_blank">customer</a> who owns the payment instrument.
              maxLength: 100
              example: cust_01KMG2ABYPF6XS5DMJQ817C429
            status:
              type: string
              description: Payment instrument status.
              enum:
                - ACTIVE
                - REVOKED
                - EXPIRED
              maxLength: 8
              example: ACTIVE
            recurring_token:
              type: string
              description: >-
                Token used to charge the payment instrument for recurring
                payments.
              maxLength: 100
              example: >-
                baf2ff5c5a125aeabb4b80d7b983f66f3abf5dbb8d939df48b40755674eddceee78084eab5fa9c15a339c94f1ad2b30cf299
            expired_at:
              type: string
              description: Date and time when the payment instrument expired.
              format: date-time
              maxLength: 30
              example: '2027-01-01T10:00:00.000000Z'
            revocation_reason:
              type: string
              description: Reason why the payment instrument was revoked.
              enum:
                - MERCHANT_INITIATED
                - SYSTEM_INITIATED
              maxLength: 18
              example: MERCHANT_INITIATED
            created_at:
              type: string
              description: Date and time when the payment instrument was created.
              format: date-time
              maxLength: 30
              example: '2024-01-01T10:00:00.000000Z'
            updated_at:
              type: string
              description: Date and time when the payment instrument was updated.
              format: date-time
              maxLength: 30
              example: '2024-01-02T15:00:00.000000Z'
        - oneOf:
            - title: Card payment
              type: object
              required:
                - payment_method
                - card_details
              properties:
                payment_method:
                  type: string
                  description: Payment method.
                  minLength: 4
                  maxLength: 4
                  example: CARD
                  const: CARD
                card_details:
                  $ref: '#/components/schemas/CardDetails'
              not:
                required:
                  - paypal_details
            - title: Alternative payment method
              type: object
              required:
                - payment_method
                - paypal_details
              properties:
                payment_method:
                  type: string
                  description: Payment method.
                  minLength: 6
                  maxLength: 6
                  example: PAYPAL
                  const: PAYPAL
                paypal_details:
                  $ref: '#/components/schemas/PaypalDetails'
              not:
                required:
                  - card_details
    ListPaymentInstrumentsRequest:
      title: ListPaymentInstrumentsRequest
      type: object
      required:
        - customer_id
      allOf:
        - type: object
          properties:
            customer_id:
              type: string
              description: >-
                Identifier of the <a
                href="https://docs.solidgate.com/billing/manage-customers/customers/"
                target="_blank">customer</a> who owns the payment instruments.
              minLength: 1
              maxLength: 100
              example: cust_01KMG2ABYPF6XS5DMJQ817C429
            filters:
              type: object
              description: Filters for payment instruments.
              minProperties: 1
              properties:
                status:
                  type: object
                  description: Operator and value for payment instrument status filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 250
                      example: EQ
                    value:
                      type: string
                      description: Payment instrument status value to filter by.
                      enum:
                        - ACTIVE
                        - REVOKED
                        - EXPIRED
                      maxLength: 8
                      example: ACTIVE
        - $ref: '#/components/schemas/PaginationInfo'
    ListPaymentInstrumentsResponse:
      title: ListPaymentInstrumentsResponse
      type: object
      description: Response containing a paginated list of payment instruments.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of payment instruments for the current page.
              items:
                $ref: '#/components/schemas/PaymentInstrumentDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    RevokePaymentInstrumentRequest:
      title: RevokePaymentInstrumentRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique payment instrument identifier.
          minLength: 1
          maxLength: 100
          example: pi_01J1Z2X3Y4W5V6U7T8S9R0
    AntifraudFieldEnum:
      title: AntifraudFieldEnum
      type: string
      description: Field for antifraud list.
      enum:
        - IP_ADDRESS
        - CUSTOMER_EMAIL
        - CUSTOMER_ID
        - CARDHOLDER
        - CARD_ID
      maxLength: 250
      example: IP_ADDRESS
    CreateAntifraudListRequest:
      title: CreateAntifraudListRequest
      type: object
      required:
        - name
        - field
      properties:
        name:
          type: string
          description: Name of the antifraud list.
          minLength: 1
          maxLength: 250
          pattern: ^.*\S.*$
          example: Trusted emails
        field:
          $ref: '#/components/schemas/AntifraudFieldEnum'
    AntifraudListDomainModel:
      title: AntifraudListDomainModel
      type: object
      description: Represents a typed antifraud list.
      required:
        - id
        - name
        - field
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique antifraud list identifier.
          minLength: 1
          maxLength: 250
          example: 01KBPMZVN946M2HRV0D8BBBBBB
        name:
          type: string
          description: Name of the antifraud list.
          minLength: 1
          maxLength: 250
          example: Trusted emails
        field:
          $ref: '#/components/schemas/AntifraudFieldEnum'
        created_at:
          type: string
          description: Date and time when the antifraud list was created.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the antifraud list was updated.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-02T15:00:00.000000Z'
    UpdateAntifraudListRequest:
      title: UpdateAntifraudListRequest
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Unique antifraud list identifier.
          minLength: 1
          maxLength: 250
          example: 01KBPMZVN946M2HRV0D8BBBBBB
        name:
          type: string
          description: Name of the antifraud list.
          minLength: 1
          maxLength: 250
          pattern: ^.*\S.*$
          example: Trusted emails
    ListAntifraudListsRequest:
      title: ListAntifraudListsRequest
      type: object
      required:
        - pagination
      allOf:
        - type: object
          properties:
            filters:
              type: object
              description: Filters for antifraud lists.
              properties:
                field:
                  type: object
                  description: Operator and value for field filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 250
                      example: EQ
                    value:
                      $ref: '#/components/schemas/AntifraudFieldEnum'
        - $ref: '#/components/schemas/PaginationInfo'
    ListAntifraudListsResponse:
      title: ListAntifraudListsResponse
      type: object
      description: Response containing a paginated list of antifraud lists.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of antifraud lists for the current page.
              items:
                $ref: '#/components/schemas/AntifraudListDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    GetAntifraudListRequest:
      title: GetAntifraudListRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique antifraud list identifier.
          minLength: 1
          maxLength: 250
          example: 01KBPMZVN946M2HRV0D8BBBBBB
    CreateAntifraudListItemRequest:
      title: CreateAntifraudListItemRequest
      type: object
      required:
        - list_id
        - field_value
      properties:
        list_id:
          type: string
          description: ID of the antifraud list.
          minLength: 1
          maxLength: 250
          pattern: ^.*\S.*$
          example: 01KBPMZVN946M2HRV0D8BBBBBB
        field_value:
          type: string
          description: |-
            Field value.
            <blockquote>
              <p>Validated against the list field.</p>
            </blockquote>
          minLength: 1
          maxLength: 150
          pattern: ^.*\S.*$
          example: example@example.com
        expired_at:
          type: string
          description: Date and time when the antifraud list item expires.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-02T15:00:00.000000Z'
        description:
          type: string
          description: Description of the antifraud list item.
          minLength: 1
          maxLength: 250
          pattern: ^.*\S.*$
          example: Trusted partner email
        created_by:
          type: string
          description: Email of the user who created the antifraud list item.
          format: email
          minLength: 1
          maxLength: 250
          example: user@example.com
    AntifraudListItemDomainModel:
      title: AntifraudListItemDomainModel
      type: object
      description: Represents an antifraud list item.
      required:
        - id
        - list_id
        - field_value
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique antifraud list item identifier.
          minLength: 1
          maxLength: 250
          example: '1263815'
        list_id:
          type: string
          description: Unique antifraud list identifier.
          minLength: 1
          maxLength: 250
          example: 01KBPMZVN946M2HRV0D8BBBBBB
        field_value:
          type: string
          description: Field value.
          minLength: 1
          maxLength: 150
          example: example@example.com
        expired_at:
          type: string
          description: Date and time when the antifraud list item expires.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-02T15:00:00.000000Z'
        description:
          type: string
          description: Description of the antifraud list item.
          minLength: 1
          maxLength: 250
          example: Trusted partner email
        created_by:
          type: string
          description: Email of the user who created the antifraud list item.
          format: email
          minLength: 1
          maxLength: 250
          example: user@example.com
        created_at:
          type: string
          description: Date and time when the antifraud list item was created.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-01T10:00:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the antifraud list item was updated.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-02T15:00:00.000000Z'
    DeleteAntifraudListItemRequest:
      title: DeleteAntifraudListItemRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Unique antifraud list item identifier.
          minLength: 1
          maxLength: 250
          pattern: ^.*\S.*$
          example: '1263815'
    DateFilterRangeValue:
      title: DateFilterRangeValue
      type: object
      description: Inclusive range of dates.
      required:
        - from
        - to
      properties:
        from:
          type: string
          description: Date and time value.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-01T10:00:00.000000Z'
        to:
          type: string
          description: Date and time value.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-01T10:00:00.000000Z'
    AntifraudListItemDateFilterRange:
      title: Date range
      type: object
      description: Date range filter.
      required:
        - operator
        - value
      properties:
        operator:
          type: string
          description: Comparison operator.
          enum:
            - RANGE
          maxLength: 250
          example: RANGE
        value:
          $ref: '#/components/schemas/DateFilterRangeValue'
    AntifraudListItemDateFilterSingleValue:
      title: Single value
      type: object
      description: Single value filter.
      required:
        - operator
        - value
      properties:
        operator:
          type: string
          description: Comparison operator.
          enum:
            - GTE
            - LTE
          maxLength: 250
          example: GTE
        value:
          type: string
          description: Date and time value.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2024-01-01T10:00:00.000000Z'
    ListAntifraudListItemsRequest:
      title: ListAntifraudListItemsRequest
      type: object
      required:
        - list_id
        - pagination
      allOf:
        - type: object
          properties:
            list_id:
              type: string
              description: Identifier of the antifraud list.
              minLength: 1
              maxLength: 250
              pattern: ^.*\S.*$
              example: 01KBPMZVN946M2HRV0D8BBBBBB
            filters:
              type: object
              description: Filters for antifraud list items.
              properties:
                field_value:
                  type: object
                  description: Operator and value for field value filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - CONTAINS
                      maxLength: 250
                      example: CONTAINS
                    value:
                      type: string
                      description: Value to filter by.
                      minLength: 1
                      maxLength: 150
                      pattern: ^.*\S.*$
                      example: example@example.com
                created_at:
                  type: object
                  description: Operator and value for created at filter.
                  oneOf:
                    - $ref: '#/components/schemas/AntifraudListItemDateFilterRange'
                    - $ref: >-
                        #/components/schemas/AntifraudListItemDateFilterSingleValue
                created_by:
                  type: object
                  description: Operator and value for created by filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 250
                      example: EQ
                    value:
                      type: string
                      description: Value to filter by.
                      format: email
                      minLength: 1
                      maxLength: 250
                      example: example@example.com
        - $ref: '#/components/schemas/PaginationInfo'
    ListAntifraudListItemsResponse:
      title: ListAntifraudListItemsResponse
      type: object
      description: Response containing a paginated list of antifraud list items.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of antifraud list items for the current page.
              items:
                $ref: '#/components/schemas/AntifraudListItemDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    CouponIdDiscount:
      title: Coupon ID
      type: object
      required:
        - coupon_id
      properties:
        coupon_id:
          type: string
          description: >-
            Unique <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupon</a> identifier.
          minLength: 1
          maxLength: 100
          pattern: ^.*\S.*$
          example: 0291b87b-deac-4eb4-8732-2a70d247a171
      example:
        coupon_id: 0291b87b-deac-4eb4-8732-2a70d247a171
    CouponCodeDiscount:
      title: Coupon code
      type: object
      required:
        - coupon_code
      properties:
        coupon_code:
          type: string
          description: >-
            Code of the associated <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupon</a>.
          minLength: 2
          maxLength: 25
          pattern: ^[a-zA-Z0-9]+$
          example: WINTER25
      example:
        coupon_code: WINTER25
    CreateInvoiceRequest:
      title: CreateInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - customer_id
        - line_items
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        customer_id:
          type: string
          description: >-
            Unique <a
            href="https://docs.solidgate.com/billing/manage-customers/customers/"
            target="_blank">customer</a> identifier.
          minLength: 6
          maxLength: 100
          pattern: ^.*\S.*$
          example: cust_01KMG2ABYPF6XS5DMJQ817C429
        line_items:
          type: array
          description: Line items applied to the invoice.
          items:
            type: object
            required:
              - product_price_id
              - quantity
            properties:
              product_price_id:
                type: string
                description: >-
                  Unique <a
                  href="https://docs.solidgate.com/billing/manage-products/prices/"
                  target="_blank">product price</a> identifier.
                minLength: 1
                maxLength: 100
                pattern: ^.*\S.*$
                example: '12345'
              quantity:
                type: integer
                description: Number of product units.
                minimum: 1
                example: 1
                exclusiveMaximum: 1000000
              description:
                type: string
                description: Line item description.
                maxLength: 255
                example: Great product
          example:
            - product_price_id: e6f26db1-f633-4723-ab08-50ddee7bc648
              quantity: 1
              description: Great product
          minItems: 1
          maxItems: 1
        discounts:
          type: array
          description: >-
            Discounts applied to the invoice using <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupons</a>.
          items:
            oneOf:
              - $ref: '#/components/schemas/CouponIdDiscount'
              - $ref: '#/components/schemas/CouponCodeDiscount'
          example:
            - coupon_code: WINTER25
          maxItems: 1
        due_at:
          type: string
          description: >-
            Date and time when the invoice is due, truncated to whole seconds.
            Must be in the future and no more than 1 year from now.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2026-01-24T11:45:00.000000Z'
        notes:
          type: string
          description: Additional notes for the invoice.
          maxLength: 255
          example: Base pack
    AmountDetailsModel:
      title: AmountDetailsModel
      type: object
      description: Represents invoice amount details.
      required:
        - subtotal
        - discount
      properties:
        subtotal:
          type: integer
          description: Subtotal amount in minor units before discounts and taxes.
          example: 1000
        discount:
          type: integer
          description: Discount amount in minor units.
          example: 100
        taxable:
          type: integer
          description: Taxable amount in minor units.
          example: 900
        tax:
          type: integer
          description: Tax amount in minor units.
          example: 90
      example:
        subtotal: 1000
        discount: 100
        taxable: 900
        tax: 90
    LineItemModel:
      title: LineItemModel
      type: object
      description: Represents an invoice line item.
      required:
        - amount
        - currency
        - amount_details
        - quantity
      properties:
        product_price_id:
          type: string
          description: >-
            Identifier of the associated <a
            href="https://docs.solidgate.com/billing/manage-products/prices/"
            target="_blank">product price</a>.
          maxLength: 100
          example: '12345'
        description:
          type: string
          description: Line item description.
          maxLength: 255
          example: Great product
        amount:
          type: integer
          description: Line item amount in minor units.
          example: 1000
        currency:
          type: string
          description: Three-letter ISO-4217 currency code.
          maxLength: 3
          example: USD
        amount_details:
          $ref: '#/components/schemas/AmountDetailsModel'
        quantity:
          type: integer
          description: Number of product units.
          example: 1
        tax:
          type: object
          description: Tax details for the line item.
          properties:
            category_id:
              type: string
              description: >-
                Identifier of the <a
                href="https://docs.solidgate.com/billing/taxes/tax-insights/"
                target="_blank">tax category</a>.
              maxLength: 100
              example: taxc_01JJVD830C789HBQVTVCWJ6AK2
            mode:
              type: string
              description: >-
                Tax calculation <a
                href="https://docs.solidgate.com/billing/taxes/manage-taxes/"
                target="_blank">mode</a>.
              enum:
                - EXCLUSIVE
                - INCLUSIVE
              maxLength: 10
              example: EXCLUSIVE
            rate:
              type: number
              description: Tax rate as a percentage.
              format: float
              example: 10
      example:
        product_price_id: e6f26db1-f633-4723-ab08-50ddee7bc648
        description: Great product
        amount: 990
        currency: USD
        amount_details:
          subtotal: 1000
          discount: 100
          taxable: 900
          tax: 90
        quantity: 1
        tax:
          category_id: taxc_01JJVD830C789HBQVTVCWJ6AK2
          mode: EXCLUSIVE
          rate: 10
    CustomerModel:
      title: CustomerModel
      type: object
      description: Represents customer snapshot details for invoice.
      required:
        - id
        - tax
      properties:
        id:
          type: string
          description: Unique customer identifier.
          maxLength: 100
          example: cust_01KMG2ABYPF6XS5DMJQ817C429
        first_name:
          type: string
          description: Customer first name.
          maxLength: 100
          example: John
        last_name:
          type: string
          description: Customer last name.
          maxLength: 100
          example: Doe
        email:
          type: string
          description: Customer email.
          format: email
          maxLength: 100
          example: customer@example.com
        phone:
          type: string
          description: Customer phone number.
          maxLength: 18
          example: '+1234567890'
        address:
          $ref: '#/components/schemas/CustomerAddress'
        tax:
          type: object
          description: Provides customer tax information.
          required:
            - taxability
          properties:
            taxability:
              type: string
              description: Indicates if the customer is subject to tax.
              enum:
                - EXEMPT
                - TAXABLE
              default: TAXABLE
              maxLength: 50
              example: TAXABLE
      example:
        id: cust_01KMG2ABYPF6XS5DMJQ817C429
        first_name: John
        last_name: Doe
        email: customer@example.com
        phone: '+1234567890'
        address:
          city: Anytown
          country: USA
          line1: 123 Main St
          line2: Suite 456
          state: CA
          postal_code: '12345'
        tax:
          taxability: TAXABLE
    DiscountDetailsModel:
      title: DiscountDetailsModel
      type: object
      description: Represents invoice discount details.
      properties:
        coupon_id:
          type: string
          description: >-
            Unique identifier of the associated <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupon</a>.
          maxLength: 100
          example: 0291b87b-deac-4eb4-8732-2a70d247a171
        coupon_code:
          type: string
          description: >-
            Code of the associated <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupon</a>.
          maxLength: 25
          example: WINTER25
      example:
        coupon_id: 0291b87b-deac-4eb4-8732-2a70d247a171
        coupon_code: WINTER25
    InvoiceDomainModel:
      title: InvoiceDomainModel
      type: object
      description: >-
        Represents <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a> data.
      required:
        - id
        - created_at
        - updated_at
        - status
        - total_amount
        - currency
        - line_items
        - customer
        - amount_details
      properties:
        id:
          type: string
          description: Unique invoice identifier.
          maxLength: 100
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        created_at:
          type: string
          description: Date and time when the invoice was created.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the invoice was updated.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:47:00.000000Z'
        status:
          type: string
          description: Current invoice status.
          enum:
            - DRAFT
            - OPEN
            - PAID
            - VOIDED
          maxLength: 10
          example: OPEN
        total_amount:
          type: integer
          description: Total invoice amount in minor units.
          example: 1000
        currency:
          type: string
          description: Three-letter ISO-4217 currency code.
          maxLength: 3
          example: USD
        line_items:
          type: array
          description: Line items applied to the invoice.
          items:
            $ref: '#/components/schemas/LineItemModel'
          example:
            - product_price_id: e6f26db1-f633-4723-ab08-50ddee7bc648
              description: Great product
              amount: 990
              currency: USD
              amount_details:
                subtotal: 1000
                discount: 100
                taxable: 900
                tax: 90
              quantity: 1
              tax:
                category_id: taxc_01JJVD830C789HBQVTVCWJ6AK2
                mode: EXCLUSIVE
                rate: 10
          maxItems: 100
        customer:
          $ref: '#/components/schemas/CustomerModel'
        due_at:
          type: string
          description: Date and time when the invoice is due.
          format: date-time
          maxLength: 30
          example: '2026-01-24T11:45:00.000000Z'
        amount_details:
          $ref: '#/components/schemas/AmountDetailsModel'
        discounts:
          type: array
          description: Discounts applied to the invoice.
          items:
            $ref: '#/components/schemas/DiscountDetailsModel'
          example:
            - coupon_id: 0291b87b-deac-4eb4-8732-2a70d247a171
              coupon_code: WINTER25
          maxItems: 1
        notes:
          type: string
          description: Additional notes for the invoice.
          maxLength: 255
          example: Base pack
      example:
        id: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        created_at: '2025-12-24T11:45:00.000000Z'
        updated_at: '2025-12-24T11:47:00.000000Z'
        status: OPEN
        total_amount: 990
        currency: USD
        line_items:
          - product_price_id: e6f26db1-f633-4723-ab08-50ddee7bc648
            description: Great product
            amount: 990
            currency: USD
            amount_details:
              subtotal: 1000
              discount: 100
              taxable: 900
              tax: 90
            quantity: 1
            tax:
              category_id: taxc_01JJVD830C789HBQVTVCWJ6AK2
              mode: EXCLUSIVE
              rate: 10
        customer:
          id: cust_01KMG2ABYPF6XS5DMJQ817C429
          first_name: John
          last_name: Doe
          email: customer@example.com
          phone: '+1234567890'
          address:
            city: Anytown
            country: USA
            line1: 123 Main St
            line2: Suite 456
            state: CA
            postal_code: '12345'
          tax:
            taxability: TAXABLE
        due_at: '2026-01-24T11:45:00.000000Z'
        amount_details:
          subtotal: 1000
          discount: 100
          taxable: 900
          tax: 90
        discounts:
          - coupon_id: 0291b87b-deac-4eb4-8732-2a70d247a171
            coupon_code: WINTER25
        notes: Base pack
    PatchInvoiceRequest:
      title: PatchInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        line_items:
          type: array
          description: Line items applied to the invoice.
          items:
            type: object
            required:
              - product_price_id
              - quantity
            properties:
              product_price_id:
                type: string
                description: >-
                  Unique <a
                  href="https://docs.solidgate.com/billing/manage-products/prices/"
                  target="_blank">product price</a> identifier.
                minLength: 1
                maxLength: 100
                pattern: ^.*\S.*$
                example: '12345'
              quantity:
                type: integer
                description: Number of product units.
                minimum: 1
                example: 1
                exclusiveMaximum: 1000000
              description:
                type: string
                description: Line item description.
                maxLength: 255
                example: Great product
          example:
            - product_price_id: e6f26db1-f633-4723-ab08-50ddee7bc648
              quantity: 1
              description: Great product
          minItems: 1
          maxItems: 1
        discounts:
          type:
            - array
            - 'null'
          description: >-
            Discounts applied to the invoice using <a
            href="https://docs.solidgate.com/billing/manage-products/coupons/"
            target="_blank">coupons</a>.
          items:
            oneOf:
              - $ref: '#/components/schemas/CouponIdDiscount'
              - $ref: '#/components/schemas/CouponCodeDiscount'
          example:
            - coupon_code: WINTER25
          minItems: 1
          maxItems: 1
        notes:
          type:
            - string
            - 'null'
          description: Additional notes for the invoice.
          minLength: 1
          maxLength: 255
          example: Base pack
        due_at:
          type:
            - string
            - 'null'
          description: >-
            Date and time when the invoice is due, truncated to whole seconds.
            Must be in the future and no more than 1 year from now.
          format: date-time
          minLength: 1
          maxLength: 250
          example: '2026-01-24T11:45:00.000000Z'
        customer:
          type: object
          description: Customer details for the invoice.
          required:
            - email
          properties:
            email:
              type: string
              description: Customer email.
              format: email
              minLength: 1
              maxLength: 100
              example: customer@example.com
            first_name:
              type: string
              description: Customer first name.
              minLength: 1
              maxLength: 100
              example: John
            last_name:
              type: string
              description: Customer last name.
              minLength: 1
              maxLength: 100
              example: Doe
            phone:
              type: string
              description: Customer phone number.
              minLength: 1
              maxLength: 18
              example: '+1234567890'
            address:
              type:
                - object
                - 'null'
              $ref: '#/components/schemas/CustomerAddressRequest'
    FinalizeInvoiceRequest:
      title: FinalizeInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
    VoidInvoiceRequest:
      title: VoidInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
    DeleteInvoiceRequest:
      title: DeleteInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
    GetInvoiceRequest:
      title: GetInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
    ListInvoicesRequest:
      title: ListInvoicesRequest
      type: object
      x-channel-bound: true
      allOf:
        - type: object
          properties:
            filters:
              type: object
              description: Filters for invoices.
              minProperties: 1
              properties:
                customer_id:
                  type: object
                  description: Operator and value for customer identifier filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 100
                      example: EQ
                    value:
                      type: string
                      description: >-
                        Identifier of the <a
                        href="https://docs.solidgate.com/billing/manage-customers/customers/"
                        target="_blank">customer</a> who owns the invoices.
                      minLength: 6
                      maxLength: 100
                      example: cust_01KMG2ABYPF6XS5DMJQ817C429
                status:
                  type: object
                  description: Operator and value for invoice status filter.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - IN
                      maxLength: 100
                      example: IN
                    value:
                      type: string
                      description: >-
                        Comma-separated list of invoice statuses to filter by.
                        Allowed values - `DRAFT`, `OPEN`, `PAID`, `VOIDED`.
                      minLength: 1
                      maxLength: 100
                      example: OPEN,PAID
        - $ref: '#/components/schemas/PaginationInfo'
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
    ListInvoicesResponse:
      title: ListInvoicesResponse
      type: object
      description: Response containing a paginated list of invoices.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of invoices for the current page.
              items:
                $ref: '#/components/schemas/InvoiceDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
    PayInvoiceRequest:
      title: PayInvoiceRequest
      type: object
      x-channel-bound: true
      required:
        - id
        - payment_instrument_id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique invoice identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        payment_instrument_id:
          type: string
          description: >-
            Unique <a
            href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
            target="_blank">payment instrument</a> identifier used to pay the
            invoice.
          minLength: 1
          maxLength: 100
          pattern: ^.*\S.*$
          example: pi_01J1Z2X3Y4W5V6U7T8S9R0
    GetSubscriptionRequest:
      title: GetSubscriptionRequest
      type: object
      x-channel-bound: true
      required:
        - id
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique subscription identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: subs_01HYDYBRKN16B8X3BR9WP78ZR7
    IntervalModel:
      title: IntervalModel
      type: object
      description: Represents time interval with inclusive start and optional end.
      required:
        - start_at
      properties:
        start_at:
          type: string
          description: Date and time when the interval starts.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        end_at:
          type: string
          description: >-
            Date and time when the interval ends. Not present when the interval
            is open-ended and continues indefinitely.
          format: date-time
          maxLength: 30
          example: '2026-01-24T11:45:00.000000Z'
      example:
        start_at: '2025-12-24T11:45:00.000000Z'
        end_at: '2026-01-24T11:45:00.000000Z'
    PeriodConfigModel:
      title: PeriodConfigModel
      type: object
      description: Period expressed as a numeric value and a time unit.
      required:
        - value
        - unit
      properties:
        value:
          type: integer
          description: Number of units in the period.
          example: 1
        unit:
          type: string
          description: Time unit for the period.
          enum:
            - DAY
            - WEEK
            - MONTH
            - QUARTER
            - YEAR
          maxLength: 10
          example: MONTH
      example:
        value: 1
        unit: MONTH
    SubscriptionLineItemModel:
      title: SubscriptionLineItemModel
      type: object
      description: Represents a subscription line item.
      required:
        - id
        - product_id
        - product_price_id
        - billing_type
        - currency
        - amount
        - quantity
        - product_info
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique line item identifier.
          maxLength: 100
          example: slit_01KPWT0K1PQWEYYRT7J1H3NC85
        billing_type:
          type: string
          description: Billing type of the line item.
          enum:
            - RECURRING
            - ONE_TIME
          maxLength: 10
          example: RECURRING
        currency:
          type: string
          description: Three-letter ISO-4217 currency code.
          maxLength: 3
          example: USD
        amount:
          type: integer
          description: Line item amount in minor units.
          example: 1000
        quantity:
          type: integer
          description: Number of product units.
          example: 1
        started_at:
          type: string
          description: Date and time when the line item started.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        period:
          type: object
          description: Billing period interval for the line item.
          allOf:
            - $ref: '#/components/schemas/IntervalModel'
            - required:
                - start_at
                - end_at
        billing_period_config:
          type: object
          description: Recurring calendar interval at which the line item is billed.
          allOf:
            - $ref: '#/components/schemas/PeriodConfigModel'
        product_info:
          type: object
          description: Snapshot of product details for the line item.
          required:
            - name
          properties:
            name:
              type: string
              description: Product name.
              maxLength: 255
              example: Great product
            description:
              type: string
              description: Product description.
              maxLength: 255
              example: Annual subscription for a great product
        created_at:
          type: string
          description: Date and time when the line item was created.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the line item was updated.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:47:00.000000Z'
        product_id:
          type: string
          description: Identifier of the associated product.
          maxLength: 100
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
        product_price_id:
          type: string
          description: Identifier of the associated price.
          maxLength: 100
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      example:
        id: slit_01KPWT0K1PQWEYYRT7J1H3NC85
        billing_type: RECURRING
        currency: USD
        amount: 1000
        quantity: 1
        started_at: '2025-12-24T11:45:00.000000Z'
        period:
          start_at: '2025-12-24T11:45:00.000000Z'
          end_at: '2026-01-24T11:45:00.000000Z'
        billing_period_config:
          value: 1
          unit: MONTH
        product_info:
          name: Great product
          description: Annual subscription for a great product
        created_at: '2025-12-24T11:45:00.000000Z'
        updated_at: '2025-12-24T11:47:00.000000Z'
        product_id: 7c9e6679-7425-40de-944b-e07fc1f90ae7
        product_price_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
    SubscriptionDomainModel:
      title: SubscriptionDomainModel
      type: object
      description: Represents subscription data.
      required:
        - id
        - customer_id
        - status
        - currency
        - line_items
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique subscription identifier.
          maxLength: 100
          example: subs_01HYDYBRKN16B8X3BR9WP78ZR7
        status:
          type: string
          description: Current subscription status.
          enum:
            - CREATED
            - PENDING
            - TRIALING
            - ACTIVE
            - REDEMPTION
            - UNPAID
            - CANCELLED
            - EXPIRED
          maxLength: 15
          example: ACTIVE
        currency:
          type: string
          description: Three-letter ISO-4217 currency code.
          maxLength: 3
          example: USD
        line_items:
          type: array
          description: Line items applied to the subscription.
          items:
            $ref: '#/components/schemas/SubscriptionLineItemModel'
          example:
            - id: slit_01KPWT0K1PQWEYYRT7J1H3NC85
              billing_type: RECURRING
              currency: USD
              amount: 1000
              quantity: 1
              started_at: '2025-12-24T11:45:00.000000Z'
              period:
                start_at: '2025-12-24T11:45:00.000000Z'
                end_at: '2026-01-24T11:45:00.000000Z'
              billing_period_config:
                value: 1
                unit: MONTH
              product_info:
                name: Great product
                description: Annual subscription for a great product
              created_at: '2025-12-24T11:45:00.000000Z'
              updated_at: '2025-12-24T11:47:00.000000Z'
              product_id: 7c9e6679-7425-40de-944b-e07fc1f90ae7
              product_price_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
          minItems: 1
          maxItems: 100
        created_at:
          type: string
          description: Date and time when the subscription was created.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the subscription was updated.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:47:00.000000Z'
        started_at:
          type: string
          description: Date and time when the subscription started.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        next_billing_at:
          type: string
          description: Date and time when the next billing occurs.
          format: date-time
          maxLength: 30
          example: '2026-01-24T11:45:00.000000Z'
        anchor_at:
          type: string
          description: Date and time used to anchor billing cycles.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        trial_info:
          type: object
          description: Trial details for the subscription.
          required:
            - type
            - amount
          properties:
            type:
              type: string
              description: Trial type.
              enum:
                - FREE
                - PAID
              maxLength: 4
              example: FREE
            period:
              type: object
              description: Trial period interval.
              allOf:
                - $ref: '#/components/schemas/IntervalModel'
                - required:
                    - start_at
                    - end_at
            amount:
              type: integer
              description: Trial amount in minor units.
              example: 0
            period_config:
              $ref: '#/components/schemas/PeriodConfigModel'
        cancellation_info:
          type: object
          description: >-
            Cancellation details for the subscription. Present when the
            subscription is scheduled for cancellation or already cancelled.
          required:
            - cancel_at
            - requested_at
            - reason
          properties:
            cancel_at:
              type: string
              description: >-
                Date and time when the subscription is scheduled to be cancelled
                or was cancelled.
              format: date-time
              maxLength: 30
              example: '2026-03-24T11:45:00.000000Z'
            requested_at:
              type: string
              description: Date and time when cancellation was requested.
              format: date-time
              maxLength: 30
              example: '2026-02-24T11:45:00.000000Z'
            reason:
              type: string
              description: Reason for the cancellation.
              enum:
                - DUNNING_EXHAUSTED
                - CANCELLATION_REQUESTED
              maxLength: 30
              example: CANCELLATION_REQUESTED
            comment:
              type: string
              description: Additional cancellation comment.
              maxLength: 500
              example: Customer requested cancellation
        discount_info:
          type: object
          description: Discount details applied to the subscription.
          required:
            - coupon_id
          properties:
            coupon_code:
              type: string
              description: Code of the associated coupon.
              maxLength: 25
              example: WINTER25
            coupon_id:
              type: string
              description: Unique identifier of the associated coupon.
              maxLength: 100
              example: 0291b87b-deac-4eb4-8732-2a70d247a171
        metadata:
          type: object
          description: Set of key-value pairs attached to the subscription.
          example:
            order_id: '12345'
          minProperties: 1
          maxProperties: 10
          propertyNames:
            type: string
            minLength: 1
            maxLength: 256
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 256
        description:
          type: string
          description: Additional description for the subscription.
          maxLength: 255
          example: Premium plan subscription
        customer_id:
          type: string
          description: Unique customer identifier.
          maxLength: 100
          example: cust_01KMG2ABYPF6XS5DMJQ817C429
        payment_instrument_id:
          type: string
          description: Identifier of the payment instrument used for billing.
          maxLength: 100
          example: pi_01J1Z2X3Y4W5V6U7T8S9R0
        latest_invoice_id:
          type: string
          description: Identifier of the most recent invoice.
          maxLength: 100
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
      example:
        id: subs_01HYDYBRKN16B8X3BR9WP78ZR7
        status: ACTIVE
        currency: USD
        line_items:
          - id: slit_01KPWT0K1PQWEYYRT7J1H3NC85
            billing_type: RECURRING
            currency: USD
            amount: 1000
            quantity: 1
            started_at: '2025-12-24T11:45:00.000000Z'
            period:
              start_at: '2025-12-24T11:45:00.000000Z'
              end_at: '2026-01-24T11:45:00.000000Z'
            billing_period_config:
              value: 1
              unit: MONTH
            product_info:
              name: Great product
              description: Annual subscription for a great product
            created_at: '2025-12-24T11:45:00.000000Z'
            updated_at: '2025-12-24T11:47:00.000000Z'
            product_id: 7c9e6679-7425-40de-944b-e07fc1f90ae7
            product_price_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
        created_at: '2025-12-24T11:45:00.000000Z'
        updated_at: '2025-12-24T11:47:00.000000Z'
        started_at: '2025-12-24T11:45:00.000000Z'
        next_billing_at: '2026-01-24T11:45:00.000000Z'
        anchor_at: '2025-12-24T11:45:00.000000Z'
        trial_info:
          type: FREE
          period:
            start_at: '2025-12-24T11:45:00.000000Z'
            end_at: '2025-12-31T11:45:00.000000Z'
          amount: 0
          period_config:
            value: 7
            unit: DAY
        cancellation_info:
          cancel_at: '2026-03-24T11:45:00.000000Z'
          requested_at: '2026-02-24T11:45:00.000000Z'
          reason: CANCELLATION_REQUESTED
          comment: Customer requested cancellation
        discount_info:
          coupon_code: WINTER25
          coupon_id: 0291b87b-deac-4eb4-8732-2a70d247a171
        metadata:
          order_id: '12345'
        description: Premium plan subscription
        customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
        payment_instrument_id: pi_01J1Z2X3Y4W5V6U7T8S9R0
        latest_invoice_id: inv_01KPWT0K1PQWEYYRT7J1H3NC85
    ListSubscriptionsRequest:
      title: ListSubscriptionsRequest
      type: object
      x-channel-bound: true
      allOf:
        - type: object
          properties:
            filters:
              type: object
              description: Filters for subscriptions.
              minProperties: 1
              properties:
                customer_id:
                  type: object
                  description: Filter by customer identifier.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - EQ
                      maxLength: 100
                      example: EQ
                    value:
                      type: string
                      description: >-
                        Identifier of the <a
                        href="https://docs.solidgate.com/billing/manage-customers/customers/"
                        target="_blank">customer</a> who owns the subscriptions.
                      minLength: 6
                      maxLength: 100
                      example: cust_01KMG2ABYPF6XS5DMJQ817C429
                created_at:
                  type: object
                  description: >-
                    Filter by the date and time when the subscription was
                    created.
                  required:
                    - operator
                    - value
                  properties:
                    operator:
                      type: string
                      description: Comparison operator.
                      enum:
                        - GTE
                        - LTE
                      maxLength: 100
                      example: GTE
                    value:
                      type: string
                      description: Date and time value to filter by.
                      format: date-time
                      minLength: 1
                      maxLength: 30
                      example: '2024-01-01T10:00:00.000000Z'
        - $ref: '#/components/schemas/PaginationInfo'
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
    ListSubscriptionsResponse:
      title: ListSubscriptionsResponse
      type: object
      description: Response containing a paginated list of subscriptions.
      required:
        - items
        - pagination
      allOf:
        - type: object
          properties:
            items:
              type: array
              description: List of subscriptions for the current page.
              items:
                $ref: '#/components/schemas/SubscriptionDomainModel'
        - $ref: '#/components/schemas/PaginationInfo'
      example:
        items:
          - id: subs_01HYDYBRKN16B8X3BR9WP78ZR7
            status: ACTIVE
            currency: USD
            line_items:
              - id: slit_01KPWT0K1PQWEYYRT7J1H3NC85
                billing_type: RECURRING
                currency: USD
                amount: 1000
                quantity: 1
                started_at: '2025-12-24T11:45:00.000000Z'
                period:
                  start_at: '2025-12-24T11:45:00.000000Z'
                  end_at: '2026-01-24T11:45:00.000000Z'
                billing_period_config:
                  value: 1
                  unit: MONTH
                product_info:
                  name: Great product
                  description: Annual subscription for a great product
                created_at: '2025-12-24T11:45:00.000000Z'
                updated_at: '2025-12-24T11:47:00.000000Z'
                product_id: 7c9e6679-7425-40de-944b-e07fc1f90ae7
                product_price_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
            created_at: '2025-12-24T11:45:00.000000Z'
            updated_at: '2025-12-24T11:47:00.000000Z'
            started_at: '2025-12-24T11:45:00.000000Z'
            next_billing_at: '2026-01-24T11:45:00.000000Z'
            anchor_at: '2025-12-24T11:45:00.000000Z'
            customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
            payment_instrument_id: pi_01J1Z2X3Y4W5V6U7T8S9R0
            latest_invoice_id: inv_01KPWT0K1PQWEYYRT7J1H3NC85
            description: Premium plan subscription
        pagination:
          page_size: 20
          next_page_token: eyJMYXN0SUQiOiIxYTYyYjQ0Ni01ZDM0LTRiYTQtOGRlZS02NTM5NTU0NjY2MTQifQ==
    CancelSubscriptionRequest:
      title: CancelSubscriptionRequest
      type: object
      x-channel-bound: true
      required:
        - id
        - mode
      properties:
        channel_id:
          type: string
          description: >-
            Unique channel identifier. Required when using multi-channel API
            keys.
          minLength: 1
          maxLength: 100
          example: chn_01JYWX6Z5A8P32B6NVH1G9876A
        id:
          type: string
          description: Unique subscription identifier.
          minLength: 5
          maxLength: 100
          pattern: ^.*\S.*$
          example: subs_01HYDYBRKN16B8X3BR9WP78ZR7
        mode:
          type: string
          description: >-
            Defines when the subscription is cancelled. Use `NOW` to cancel
            immediately or `PERIOD_END` to cancel at the end of the current
            billing period.
          enum:
            - NOW
            - PERIOD_END
          maxLength: 11
          example: NOW
        comment:
          type: string
          description: Free-form reason for the cancellation.
          maxLength: 500
          pattern: ^.*\S.*$
          example: Customer requested cancellation
    InvoicePaymentDomainModel:
      title: InvoicePaymentDomainModel
      type: object
      description: >-
        Represents <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a> payment data.
      required:
        - id
        - invoice_id
        - status
        - amount
        - currency
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique payment identifier.
          maxLength: 100
          example: inp_01KQ7FFRGJ5X0CKSHZ0ZJRQ4VW
        invoice_id:
          type: string
          description: Associated invoice identifier.
          maxLength: 100
          example: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        status:
          type: string
          description: Current payment status.
          enum:
            - OPEN
            - PAID
            - VOIDED
          maxLength: 10
          example: OPEN
        amount:
          type: integer
          description: Payment amount in minor units.
          example: 1000
        currency:
          type: string
          description: Three-letter ISO-4217 currency code.
          maxLength: 3
          example: USD
        created_at:
          type: string
          description: Date and time when the payment was created.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:45:00.000000Z'
        updated_at:
          type: string
          description: Date and time when the payment was updated.
          format: date-time
          maxLength: 30
          example: '2025-12-24T11:47:00.000000Z'
      example:
        id: inp_01KQ7FFRGJ5X0CKSHZ0ZJRQ4VW
        invoice_id: inv_01KPWT0K1PQWEYYRT7J1H3NC85
        status: OPEN
        amount: 1000
        currency: USD
        created_at: '2025-12-24T11:45:00.000000Z'
        updated_at: '2025-12-24T11:47:00.000000Z'
  examples:
    AntifraudDisables:
      summary: Antifraud disabled error example
      value:
        message: Fraud prevention is not enabled for this merchant account
        code: ERROR_FRAUD_PREVENTION_IS_NOT_ENABLED
paths:
  /webhooks/create:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-webhook
      summary: Create webhook
      description: >-
        Creates a new webhook endpoint to receive payment and order events.
        Webhook endpoints are inactive until activated by calling the patch
        endpoint with the status set to ACTIVE.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
            examples:
              includeChannels:
                summary: Include specific channels
                value:
                  name: Billing webhook endpoint
                  description: Receives billing events for integration
                  url: https://mycompany.com/solidgate/webhook
                  event_types:
                    - INVOICE_CREATED
                    - CUSTOMER_UPDATED
                  included_channel_ids:
                    - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                    - chn_01KTXHKMEXBM5JMEQAHBCV6802
              excludeChannels:
                summary: Exclude specific channels
                value:
                  name: Billing webhook endpoint
                  description: Receives billing events for integration
                  url: https://mycompany.com/solidgate/webhook
                  event_types:
                    - INVOICE_CREATED
                    - CUSTOMER_UPDATED
                  excluded_channel_ids:
                    - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                    - chn_01KTXHKMEXBM5JMEQAHBCV6802
              allChannels:
                summary: All channels
                value:
                  name: Billing webhook endpoint
                  description: Receives billing events for integration
                  url: https://mycompany.com/solidgate/webhook
                  event_types:
                    - INVOICE_CREATED
                    - CUSTOMER_UPDATED
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebhookResponse'
              examples:
                includeChannels:
                  summary: Include specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: INACTIVE
                    included_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    secret: wsec_********************
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-01T10:00:00.000000Z'
                excludeChannels:
                  summary: Exclude specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: INACTIVE
                    excluded_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    secret: wsec_********************
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-01T10:00:00.000000Z'
                allChannels:
                  summary: All channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: INACTIVE
                    secret: wsec_********************
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-01T10:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - ENDPOINT_ALREADY_EXISTS
                          - EVENT_TYPES_NOT_FOUND
                        example: ENDPOINT_ALREADY_EXISTS
                      message:
                        type: string
                        description: Message describing the error.
                        example: A webhook endpoint with this URL already exists
              examples:
                endpointAlreadyExists:
                  value:
                    code: ENDPOINT_ALREADY_EXISTS
                    message: A webhook endpoint with this URL already exists
                eventTypesNotFound:
                  value:
                    code: EVENT_TYPES_NOT_FOUND
                    message: Some event types not found
  /webhooks/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-webhook
      summary: List webhooks
      description: Retrieves a paginated list of webhook endpoints.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListWebhookRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListWebhookResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
  /webhooks/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-webhook
      summary: Get webhook
      description: Retrieves webhook endpoint details by ID.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetWebhookRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDomainModel'
              examples:
                includeChannels:
                  summary: Include specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    included_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                excludeChannels:
                  summary: Exclude specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    excluded_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                allChannels:
                  summary: All channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                rotating:
                  summary: Rotation in progress
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    rotate_at: '2026-04-08T12:11:10.877301Z'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Webhook not found
  /webhooks/patch:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: patch-webhook
      summary: Patch webhook
      description: Updates an existing webhook endpoint configuration.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchWebhookRequest'
            examples:
              includeChannels:
                summary: Include specific channels
                value:
                  id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                  included_channel_ids:
                    - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                    - chn_01KTXHKMEXBM5JMEQAHBCV6802
              excludeChannels:
                summary: Exclude specific channels
                value:
                  id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                  excluded_channel_ids:
                    - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                    - chn_01KTXHKMEXBM5JMEQAHBCV6802
              allChannels:
                summary: All channels
                value:
                  id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                  url: https://mycompany.com/solidgate/webhook
                  event_types:
                    - INVOICE_CREATED
                    - CUSTOMER_UPDATED
                  status: ACTIVE
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDomainModel'
              examples:
                includeChannels:
                  summary: Include specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    included_channel_ids:
                      - '12345'
                      - '67890'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                excludeChannels:
                  summary: Exclude specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    excluded_channel_ids:
                      - '54321'
                      - '09876'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                allChannels:
                  summary: All channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                rotating:
                  summary: Rotation in progress
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    rotate_at: '2026-04-08T12:11:10.877301Z'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                webhookNotFound:
                  value:
                    code: NOT_FOUND
                    message: Webhook not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - ENDPOINT_ALREADY_EXISTS
                          - EVENT_TYPES_NOT_FOUND
                        example: ENDPOINT_ALREADY_EXISTS
                      message:
                        type: string
                        description: Message describing the error.
                        example: A webhook endpoint with this URL already exists
              examples:
                endpointAlreadyExists:
                  value:
                    code: ENDPOINT_ALREADY_EXISTS
                    message: A webhook endpoint with this URL already exists
                eventTypesNotFound:
                  value:
                    code: EVENT_TYPES_NOT_FOUND
                    message: Some event types not found
  /webhooks/delete:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: delete-webhook
      summary: Delete webhook
      description: Deletes a webhook endpoint.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteWebhookRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Webhook not found
  /webhooks/rotate-key:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: rotate-webhook-key
      summary: Rotate webhook key
      description: >-
        Rotates the secret for the specified webhook key. Returns a new secret
        in the `rotate_secret` field, which becomes valid within a few seconds.
        The previous secret remains valid during the rotation period and expires
        once the period ends.
      tags:
        - Webhooks
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotateWebhookKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RotateWebhookKeyResponse'
              examples:
                includeChannels:
                  summary: Include specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    included_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    rotate_secret: wsec_********************
                    rotate_at: '2026-04-08T12:11:10.877301Z'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                excludeChannels:
                  summary: Exclude specific channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    excluded_channel_ids:
                      - chn_01ARZ3NDEKTSV4RRFFQ69G5FAV
                      - chn_01KTXHKMEXBM5JMEQAHBCV6802
                    rotate_secret: wsec_********************
                    rotate_at: '2026-04-08T12:11:10.877301Z'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                allChannels:
                  summary: All channels
                  value:
                    id: wep_e2ab41b4-ffa6-490b-9cff-bd3288425aa0
                    name: Billing webhook endpoint
                    description: Receives billing events for integration
                    url: https://mycompany.com/solidgate/webhook
                    event_types:
                      - INVOICE_CREATED
                      - CUSTOMER_UPDATED
                    status: ACTIVE
                    rotate_secret: wsec_********************
                    rotate_at: '2026-04-08T12:11:10.877301Z'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Webhook not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - KEY_IN_ROTATION
                        example: KEY_IN_ROTATION
                      message:
                        type: string
                        description: Message describing the error.
                        example: A key is already in rotation
  /api-keys/create:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-api-key
      summary: Create API key
      description: >-
        Creates a new API key for authentication and authorization. This
        endpoint requires an account-level API key.
      tags:
        - API keys
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApiKeyResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - PERMISSION_NOT_FOUND
                          - CHANNEL_NOT_FOUND
                        example: PERMISSION_NOT_FOUND
                      message:
                        type: string
                        description: Message describing the error.
                        example: The specified permission does not exist
              examples:
                permissionNotFound:
                  value:
                    code: PERMISSION_NOT_FOUND
                    message: The specified permission does not exist
                channelNotFound:
                  value:
                    code: CHANNEL_NOT_FOUND
                    message: The specified channel does not exist
  /api-keys/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-api-key
      summary: List API keys
      description: >-
        Retrieves a paginated list of API keys for the specified account. This
        endpoint requires an account-level API key.
      tags:
        - API keys
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApiKeyResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
  /api-keys/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-api-key
      summary: Get API key
      description: >-
        Returns details and permissions for the specified API key. This endpoint
        requires an account-level API key.
      tags:
        - API keys
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: API key not found
  /api-keys/rotate:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: rotate-api-key
      summary: Rotate API key
      description: >-
        Rotates the secret key for the specified API key. Returns a new secret
        in the `rotate_secret` field, which becomes valid within a few seconds.
        The previous secret remains valid during the rotation period and expires
        once the period ends. This endpoint requires an account-level API key.
      tags:
        - API keys
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotateApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RotateApiKeyResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - KEY_IN_ROTATION
                        example: KEY_IN_ROTATION
  /channels/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-channel
      summary: List channels
      description: >-
        Retrieves a paginated list of channels for the specified account. This
        endpoint requires an account-level API key.
      tags:
        - Channels
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListChannelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListChannelResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
  /customers/create:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-customer
      summary: Create customer
      description: >-
        Creates a new <a
        href="https://docs.solidgate.com/billing/manage-customers/customers/"
        target="_blank">customer</a>.
      tags:
        - Customers
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerRequest'
            examples:
              individualCustomer:
                summary: Individual
                value:
                  merchant_customer_id: '12345'
                  email: customer@example.com
                  first_name: John
                  last_name: Doe
                  phone: '+1234567890'
                  type: INDIVIDUAL
              businessCustomer:
                summary: Business
                value:
                  merchant_customer_id: '12345'
                  email: customer@example.com
                  first_name: John
                  last_name: Doe
                  phone: '+1234567890'
                  type: BUSINESS
                  business_details:
                    name: Acme Corporation
                    legal_address:
                      city: Anytown
                      country: USA
                      line1: 123 Main St
                      postal_code: '12345'
                      state: CA
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDomainModel'
              examples:
                individualCustomer:
                  summary: Individual
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    first_name: John
                    last_name: Doe
                    phone: '+1234567890'
                    type: INDIVIDUAL
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                businessCustomer:
                  summary: Business
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    type: BUSINESS
                    business_details:
                      name: Acme Corporation
                      legal_address:
                        city: Anytown
                        country: USA
                        line1: 123 Main St
                        postal_code: '12345'
                        state: CA
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INVALID_DEFAULT_PAYMENT_INSTRUMENT
                          - INVALID_TAX_REGISTRATION_VALIDATION_SOURCE
                        example: INVALID_DEFAULT_PAYMENT_INSTRUMENT
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /customers/patch:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: patch-customer
      summary: Update customer
      description: >-
        Updates specified <a
        href="https://docs.solidgate.com/billing/manage-customers/customers/"
        target="_blank">customer</a> fields.
      tags:
        - Customers
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchCustomerRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDomainModel'
              examples:
                individualCustomer:
                  summary: Individual
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    first_name: John
                    last_name: Doe
                    phone: '+1234567890'
                    type: INDIVIDUAL
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                businessCustomer:
                  summary: Business
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    type: BUSINESS
                    business_details:
                      name: Acme Corporation
                      legal_address:
                        city: Anytown
                        country: USA
                        line1: 123 Main St
                        postal_code: '12345'
                        state: CA
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Customer not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INVALID_DEFAULT_PAYMENT_INSTRUMENT
                          - INVALID_TAX_REGISTRATION_VALIDATION_SOURCE
                          - INVALID_TAX_REGISTRATION_VALIDATION_UPDATE
                        example: INVALID_DEFAULT_PAYMENT_INSTRUMENT
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /customers/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-customer
      summary: Get customer
      description: >-
        Returns the <a
        href="https://docs.solidgate.com/billing/manage-customers/customers/"
        target="_blank">customer</a> for the provided identifier.
      tags:
        - Customers
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetCustomerRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDomainModel'
              examples:
                individualCustomer:
                  summary: Individual
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    first_name: John
                    last_name: Doe
                    phone: '+1234567890'
                    type: INDIVIDUAL
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                businessCustomer:
                  summary: Business
                  value:
                    id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    merchant_customer_id: '12345'
                    email: customer@example.com
                    type: BUSINESS
                    business_details:
                      name: Acme Corporation
                      legal_address:
                        city: Anytown
                        country: USA
                        line1: 123 Main St
                        postal_code: '12345'
                        state: CA
                    status: ACTIVE
                    tax:
                      taxability: TAXABLE
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Customer not found
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /customers/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-customers
      summary: List customers
      description: >-
        Returns a paginated list of <a
        href="https://docs.solidgate.com/billing/manage-customers/customers/"
        target="_blank">customers</a>.
      tags:
        - Customers
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListCustomersRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomersResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /payment-instruments/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-payment-instrument
      summary: Get payment instrument
      description: >-
        Returns the <a
        href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
        target="_blank">payment instrument</a> for the provided identifier.
      tags:
        - Payment instruments
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPaymentInstrumentRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentInstrumentDomainModel'
              examples:
                cardPayment:
                  summary: Card payment
                  value:
                    id: pi_01J1Z2X3Y4W5V6U7T8S9R0
                    customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    status: ACTIVE
                    recurring_token: spt_01J1Z2X3Y4W5V6U7T8S9R0
                    payment_method: CARD
                    card_details:
                      last_four: '4242'
                      bin: '424242'
                      brand: VISA
                      type: DEBIT
                      bank: Chase Bank
                      expiry_month: '12'
                      expiry_year: '2030'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                alternativePayment:
                  summary: Alternative payment method
                  value:
                    id: pi_01J1Z2X3Y4W5V6U7T8S9R0
                    customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    status: ACTIVE
                    recurring_token: spt_01J1Z2X3Y4W5V6U7T8S9R0
                    payment_method: PAYPAL
                    paypal_details:
                      email: customer@example.com
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Payment instrument not found
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /payment-instruments/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-payment-instruments
      summary: List payment instruments
      description: >-
        Returns a paginated list of <a
        href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
        target="_blank">payment instruments</a> for the specified customer.
      tags:
        - Payment instruments
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPaymentInstrumentsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentInstrumentsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /payment-instruments/revoke:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: revoke-payment-instrument
      summary: Revoke payment instrument
      description: >-
        Revokes an active <a
        href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
        target="_blank">payment instrument</a> and prevents it from being used
        for future payments.
      tags:
        - Payment instruments
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokePaymentInstrumentRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentInstrumentDomainModel'
              examples:
                cardPayment:
                  summary: Card payment
                  value:
                    id: pi_01J1Z2X3Y4W5V6U7T8S9R0
                    customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    status: REVOKED
                    recurring_token: spt_01J1Z2X3Y4W5V6U7T8S9R0
                    revocation_reason: MERCHANT_INITIATED
                    payment_method: CARD
                    card_details:
                      last_four: '4242'
                      bin: '424242'
                      brand: VISA
                      type: DEBIT
                      bank: Chase Bank
                      expiry_month: '12'
                      expiry_year: '2030'
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
                alternativePayment:
                  summary: Alternative payment method
                  value:
                    id: pi_01J1Z2X3Y4W5V6U7T8S9R0
                    customer_id: cust_01KMG2ABYPF6XS5DMJQ817C429
                    status: REVOKED
                    recurring_token: spt_01J1Z2X3Y4W5V6U7T8S9R0
                    revocation_reason: MERCHANT_INITIATED
                    payment_method: PAYPAL
                    paypal_details:
                      email: customer@example.com
                    created_at: '2024-01-01T10:00:00.000000Z'
                    updated_at: '2024-01-02T15:00:00.000000Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Payment instrument not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /antifraud-lists/create:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-antifraud-list
      summary: Create antifraud list
      description: Creates a new antifraud list.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAntifraudListRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AntifraudListDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/update:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: update-antifraud-list
      summary: Update antifraud list
      description: Updates the antifraud list.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAntifraudListRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AntifraudListDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: List not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-antifraud-list
      summary: List antifraud lists
      description: Retrieves a paginated list of antifraud lists.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListAntifraudListsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAntifraudListsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-antifraud-list
      summary: Get antifraud list
      description: Returns the antifraud list for the provided identifier.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAntifraudListRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AntifraudListDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: List not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/create-item:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-item-antifraud-list
      summary: Create antifraud list item
      description: Creates a new antifraud list item.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAntifraudListItemRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AntifraudListItemDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - ERROR_FRAUD_PREVENTION_IS_NOT_ENABLED
                          - ERROR_LIST_ITEM_ALREADY_EXISTS
                          - ERROR_INVALID_VALUE_FOR_LIST_FIELD
                        example: ERROR_LIST_ITEM_ALREADY_EXISTS
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/delete-item:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: delete-item-antifraud-list
      summary: Delete antifraud list item
      description: Deletes the antifraud list item for the provided identifier.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteAntifraudListItemRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: List item not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /antifraud-lists/list-item:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-item-antifraud-list
      summary: List antifraud list items
      description: Retrieves a paginated list of antifraud list items.
      tags:
        - Antifraud lists
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListAntifraudListItemsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAntifraudListItemsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateErrorResponse'
              examples:
                antifraud-disabled:
                  $ref: '#/components/examples/AntifraudDisables'
  /invoices/create:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: create-invoice
      summary: Create invoice
      description: >-
        Creates a new <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - PRODUCT_NOT_FOUND
                          - PRICE_NOT_FOUND
                          - CUSTOMER_NOT_FOUND
                          - PRODUCT_NOT_ACTIVE
                          - PRICE_NOT_ACTIVE
                          - PRODUCT_NOT_ONE_TIME
                          - INCOMPATIBLE_CURRENCY
                          - COUPON_NOT_FOUND
                          - COUPON_NOT_ACTIVE
                          - COUPON_CODE_NOT_FOUND
                          - COUPON_CODE_NOT_ACTIVE
                        example: PRODUCT_NOT_FOUND
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/patch:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: patch-invoice
      summary: Patch invoice
      description: >-
        Updates specified fields of a draft <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchInvoiceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - PRODUCT_NOT_FOUND
                          - PRICE_NOT_FOUND
                          - PRODUCT_NOT_ACTIVE
                          - PRICE_NOT_ACTIVE
                          - PRODUCT_NOT_ONE_TIME
                          - INCOMPATIBLE_CURRENCY
                          - COUPON_NOT_FOUND
                          - COUPON_NOT_ACTIVE
                          - COUPON_CODE_NOT_FOUND
                          - COUPON_CODE_NOT_ACTIVE
                          - INCOMPATIBLE_STATUS
                        example: PRODUCT_NOT_FOUND
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/finalize:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: finalize-invoice
      summary: Finalize invoice
      description: >-
        Finalizes a draft <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinalizeInvoiceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                          - COUPON_NOT_ACTIVE
                          - COUPON_CODE_NOT_ACTIVE
                          - MISSING_POSTAL_CODE
                          - INVOICE_OVERDUE
                          - MISSING_CUSTOMER_IP_ADDRESS
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/void:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: void-invoice
      summary: Void invoice
      description: >-
        Voids an unpaid <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoidInvoiceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/delete:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: delete-invoice
      summary: Delete invoice
      description: >-
        Deletes a draft <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteInvoiceRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-invoice
      summary: Get invoice
      description: >-
        Returns the <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a> for the provided identifier.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetInvoiceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-invoices
      summary: List invoices
      description: >-
        Returns a paginated list of <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoices</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListInvoicesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvoicesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /invoices/pay:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: pay-invoice
      summary: Pay invoice
      description: >-
        Pays a finalized <a
        href="https://docs.solidgate.com/billing/invoicing/invoicing-overview/"
        target="_blank">invoice</a> using a saved <a
        href="https://docs.solidgate.com/billing/manage-customers/payment-instruments/"
        target="_blank">payment instrument</a>.
      tags:
        - Invoices
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayInvoiceRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Invoice not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                          - OPEN_PAYMENT_LIMIT_REACHED
                          - INVOICE_OVERDUE
                          - PAYMENT_INSTRUMENT_NOT_FOUND
                          - PAYMENT_INSTRUMENT_NOT_ACTIVE
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /subscriptions/get:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: get-subscription
      summary: Get subscription
      description: Returns the subscription for the provided identifier.
      tags:
        - Subscriptions
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetSubscriptionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Subscription not found
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /subscriptions/list:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: list-subscriptions
      summary: List subscriptions
      description: Returns a paginated list of subscriptions.
      tags:
        - Subscriptions
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListSubscriptionsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
  /subscriptions/cancel:
    servers:
      - url: https://api.solidgate.com/v2
        description: Solidgate API
    post:
      operationId: cancel-subscription
      summary: Cancel subscription
      description: >-
        Cancels the subscription immediately or schedules cancellation for the
        end of the current billing period.
      tags:
        - Subscriptions
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelSubscriptionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionDomainModel'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
              examples:
                notFound:
                  value:
                    code: NOT_FOUND
                    message: Subscription not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StateErrorResponse'
                  - type: object
                    properties:
                      code:
                        type: string
                        description: Code identifying the error type.
                        enum:
                          - INCOMPATIBLE_STATUS
                          - SCHEDULED_FOR_CANCELLATION
                        example: INCOMPATIBLE_STATUS
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
webhooks:
  CustomerCreated:
    post:
      operationId: on-customer-created
      summary: Customer created
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a new customer is created.
      tags:
        - Customers
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique identifier of the event.
                  maxLength: 36
                  example: 2c871666-c3a4-4a4e-89a8-fc8956e95731
                event_type:
                  type: string
                  description: Type of the event.
                  enum:
                    - CUSTOMER_CREATED
                  maxLength: 50
                  example: CUSTOMER_CREATED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:18:40.000000Z'
                data:
                  type: object
                  description: Event payload containing the affected customer record.
                  required:
                    - customer
                  properties:
                    customer:
                      $ref: '#/components/schemas/CustomerDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  CustomerUpdated:
    post:
      operationId: on-customer-updated
      summary: Customer updated
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a customer is updated.
      tags:
        - Customers
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique identifier of the event.
                  maxLength: 36
                  example: e607ccd9-db36-4b75-a589-70228aebcc38
                event_type:
                  type: string
                  description: Type of the event.
                  enum:
                    - CUSTOMER_UPDATED
                  maxLength: 50
                  example: CUSTOMER_UPDATED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:19:54.000000Z'
                data:
                  type: object
                  description: Event payload containing the affected customer record.
                  required:
                    - customer
                  properties:
                    customer:
                      $ref: '#/components/schemas/CustomerDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  PaymentInstrumentCreated:
    post:
      operationId: on-payment-instrument-created
      summary: Payment instrument created
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a new payment instrument is created.
      tags:
        - Payment instruments
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: 1f0d2eea-9e7f-4a3a-8f4c-2cd2a8e5d1a4
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - PAYMENT_INSTRUMENT_CREATED
                  maxLength: 50
                  example: PAYMENT_INSTRUMENT_CREATED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:18:40.000000Z'
                data:
                  type: object
                  description: >-
                    Event payload containing the affected payment instrument
                    record.
                  required:
                    - payment_instrument
                  properties:
                    payment_instrument:
                      $ref: '#/components/schemas/PaymentInstrumentDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  PaymentInstrumentRevoked:
    post:
      operationId: on-payment-instrument-revoked
      summary: Payment instrument revoked
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a payment instrument is revoked.
      tags:
        - Payment instruments
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: 3a8d6b84-7b21-4d2d-9c41-5f4ad3e9c8a2
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - PAYMENT_INSTRUMENT_REVOKED
                  maxLength: 50
                  example: PAYMENT_INSTRUMENT_REVOKED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:19:54.000000Z'
                data:
                  type: object
                  description: >-
                    Event payload containing the affected payment instrument
                    record.
                  required:
                    - payment_instrument
                  properties:
                    payment_instrument:
                      $ref: '#/components/schemas/PaymentInstrumentDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  PaymentInstrumentExpired:
    post:
      operationId: on-payment-instrument-expired
      summary: Payment instrument expired
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a payment instrument expires.
      tags:
        - Payment instruments
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: 9b40c5a1-3f7d-4e64-b8ee-21a10f9be7c5
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - PAYMENT_INSTRUMENT_EXPIRED
                  maxLength: 50
                  example: PAYMENT_INSTRUMENT_EXPIRED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:20:11.000000Z'
                data:
                  type: object
                  description: >-
                    Event payload containing the affected payment instrument
                    record.
                  required:
                    - payment_instrument
                  properties:
                    payment_instrument:
                      $ref: '#/components/schemas/PaymentInstrumentDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceCreated:
    post:
      operationId: on-invoice-created
      summary: Invoice created
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when a new invoice is created.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: dbd9ab96-7701-42c8-b26e-06a88598362f
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_CREATED
                  maxLength: 50
                  example: INVOICE_CREATED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:18:40.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceUpdated:
    post:
      operationId: on-invoice-updated
      summary: Invoice updated
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice is updated.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: e607ccd9-db36-4b75-a589-70228aebcc38
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_UPDATED
                  maxLength: 50
                  example: INVOICE_UPDATED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:19:54.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceFinalized:
    post:
      operationId: on-invoice-finalized
      summary: Invoice finalized
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice is finalized.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_FINALIZED
                  maxLength: 50
                  example: INVOICE_FINALIZED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:20:10.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceFinalizationFailed:
    post:
      operationId: on-invoice-finalization-failed
      summary: Invoice finalization failed
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice finalization fails.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: b2c3d4e5-f6a7-8901-bcde-f12345678901
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_FINALIZATION_FAILED
                  maxLength: 50
                  example: INVOICE_FINALIZATION_FAILED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:20:30.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoicePaid:
    post:
      operationId: on-invoice-paid
      summary: Invoice paid
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice is paid.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: c3d4e5f6-a7b8-9012-cdef-123456789012
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_PAID
                  maxLength: 50
                  example: INVOICE_PAID
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:21:00.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceVoided:
    post:
      operationId: on-invoice-voided
      summary: Invoice voided
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice is voided.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: d4e5f6a7-b8c9-0123-defa-234567890123
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_VOIDED
                  maxLength: 50
                  example: INVOICE_VOIDED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:21:30.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoiceDeleted:
    post:
      operationId: on-invoice-deleted
      summary: Invoice deleted
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice is deleted.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: e5f6a7b8-c9d0-1234-efab-345678901234
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_DELETED
                  maxLength: 50
                  example: INVOICE_DELETED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:22:00.000Z'
                data:
                  type: object
                  description: Event payload containing the affected invoice record.
                  required:
                    - invoice
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoicePaymentFailed:
    post:
      operationId: on-invoice-payment-failed
      summary: Invoice payment failed
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice payment fails.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: f6a7b8c9-d0e1-2345-fabc-456789012345
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_PAYMENT_FAILED
                  maxLength: 50
                  example: INVOICE_PAYMENT_FAILED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:22:30.000Z'
                data:
                  type: object
                  description: >-
                    Event payload containing the affected invoice and payment
                    records.
                  required:
                    - invoice
                    - invoice_payment
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
                    invoice_payment:
                      $ref: '#/components/schemas/InvoicePaymentDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
  InvoicePaymentRefunded:
    post:
      operationId: on-invoice-payment-refunded
      summary: Invoice payment refunded
      x-badges:
        - name: Event
          color: purple
      description: Webhook sent when an invoice payment is refunded.
      tags:
        - Invoices
      security:
        - signatureAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - event_type
                - occurred_at
                - data
              properties:
                event_id:
                  type: string
                  description: Unique event identifier.
                  maxLength: 36
                  example: a7b8c9d0-e1f2-3456-abcd-567890123456
                event_type:
                  type: string
                  description: Event type.
                  enum:
                    - INVOICE_PAYMENT_REFUNDED
                  maxLength: 50
                  example: INVOICE_PAYMENT_REFUNDED
                occurred_at:
                  type: string
                  description: Date and time when the event occurred.
                  format: date-time
                  maxLength: 40
                  example: '2026-04-03T16:23:00.000Z'
                data:
                  type: object
                  description: >-
                    Event payload containing the affected invoice and payment
                    records.
                  required:
                    - invoice
                    - invoice_payment
                  properties:
                    invoice:
                      $ref: '#/components/schemas/InvoiceDomainModel'
                    invoice_payment:
                      $ref: '#/components/schemas/InvoicePaymentDomainModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Empty acknowledgment returned when the webhook is accepted.
                additionalProperties: false
