{
  "openapi": "3.1.0",
  "info": {
    "title": "Peak Gateway API",
    "version": "1.0.0",
    "description": "REST API for Peak Gateway merchants, partners and agents. OAuth2 operations accept an access token from client credentials or API-key exchange. UserSession operations require a signed-in Peak Gateway dashboard user. CustomerSession operations require a customer Firebase ID token with App Check; account handoff alternatives require both the account credential and its bound checkout session token. Neither customer authentication path accepts integration OAuth tokens. Amounts are integer minor currency units.",
    "contact": {
      "name": "Peak Gateway support",
      "email": "support@peakgateway.co",
      "url": "https://docs.peakgateway.co"
    }
  },
  "paths": {
    "/api/v1/agents": {
      "get": {
        "operationId": "listAgents",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "rootsOnly",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseAgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createAgents",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/rate-card-templates": {
      "get": {
        "operationId": "listRateCardTemplates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RateCardGroupResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createRateCardTemplate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateCardTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/rate-card-templates/{groupId}/default": {
      "put": {
        "operationId": "setDefaultRateCardTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/rate-card-templates/{groupId}/versions": {
      "post": {
        "operationId": "appendRateCardTemplateVersion",
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRateCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/billing/processing-rate-snapshots": {
      "get": {
        "operationId": "getProcessingRateSnapshots",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProcessingRateSnapshotsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/billing/settlement-batches": {
      "get": {
        "operationId": "getSettlementBatches",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseAgentSettlementBatchResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/billing/summary": {
      "get": {
        "operationId": "getSummary",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "periodStart",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "periodEnd",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBillingSummaryResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/rate-cards/effective": {
      "get": {
        "operationId": "getEffectiveRateCards",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEffectiveRateCardsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/residual-statements": {
      "get": {
        "operationId": "listResidualStatements",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseAgentResidualStatementResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/residual-statements/{period}": {
      "get": {
        "operationId": "getResidualStatement",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "period",
            "required": true,
            "schema": {
              "pattern": "^\\d{4}-\\d{2}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResidualStatementResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{agentId}/residual-statements/{period}/export": {
      "get": {
        "operationId": "exportResidualStatement",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "period",
            "required": true,
            "schema": {
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AgentsBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}": {
      "get": {
        "operationId": "getAgents",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      },
      "patch": {
        "operationId": "updateAgents",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/apps/{appId}": {
      "get": {
        "operationId": "getAppGrant",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "appId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppAuthorizationGrantResponse",
                  "nullable": true
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "setAppGrant",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "appId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppAuthorizationGrantResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/buy-rate-assignment": {
      "put": {
        "operationId": "assignBuyRate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignAgentBuyRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/buy-rate-history-baseline": {
      "post": {
        "operationId": "attestBuyRateHistoryBaseline",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttestAgentBuyRateHistoryBaselineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBuyRateHistoryBaselineReceipt"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/default-rate-card-assignment": {
      "put": {
        "operationId": "assignDefaultRateCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignAgentDefaultRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardCatalogResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/oauth-client": {
      "get": {
        "operationId": "getOauthClient",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentOauthClientResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/oauth-client/reconcile-scopes": {
      "post": {
        "operationId": "reconcileOauthClientScopes",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentOauthClientScopeReconciliationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/organizations": {
      "get": {
        "operationId": "listOrganizations",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOrganization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "attachOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/rate-card-groups": {
      "get": {
        "operationId": "listRateCardGroups",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardCatalogResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createRateCardGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRateCardGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/rate-card-groups/{groupId}/clone": {
      "post": {
        "operationId": "cloneRateCardGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneRateCardGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/rate-card-groups/{groupId}/versions": {
      "post": {
        "operationId": "appendRateCardGroupVersion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRateCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateCardGroupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/rate-cards": {
      "get": {
        "operationId": "getRateCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardResponse",
                  "nullable": true
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "setRateCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRateCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/reactivate": {
      "post": {
        "operationId": "reactivate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/suspend": {
      "post": {
        "operationId": "suspend",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/tree": {
      "get": {
        "operationId": "tree",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTreeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/users": {
      "get": {
        "operationId": "listUsers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AgentUserResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentUserResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/agents/{id}/users/{userId}": {
      "patch": {
        "operationId": "updateUserRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentUserRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentUserResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deactivateUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/api-keys": {
      "get": {
        "description": "Lists active API keys for a merchant",
        "operationId": "listApiKeys",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKey"
                  },
                  "type": "array"
                }
              }
            },
            "description": "API keys retrieved successfully"
          }
        },
        "summary": "List API keys",
        "tags": [
          "ApiKeys"
        ],
        "security": [
          {
            "OAuth2": [
              "api-keys:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new API key for a merchant. The raw key is returned only once.",
        "operationId": "createApiKeys",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreateResponse"
                }
              }
            },
            "description": "API key created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create API key",
        "tags": [
          "ApiKeys"
        ],
        "security": [
          {
            "OAuth2": [
              "api-keys:write"
            ]
          }
        ]
      }
    },
    "/api/v1/api-keys/{keyId}": {
      "delete": {
        "description": "Revokes an existing API key",
        "operationId": "deleteApiKeys",
        "parameters": [
          {
            "in": "path",
            "name": "keyId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key revoked successfully"
          },
          "404": {
            "description": "API key not found"
          }
        },
        "summary": "Revoke API key",
        "tags": [
          "ApiKeys"
        ],
        "security": [
          {
            "OAuth2": [
              "api-keys:write"
            ]
          }
        ]
      }
    },
    "/api/v1/api-keys/{keyId}/rotate": {
      "post": {
        "description": "Revokes an existing API key and creates a new one",
        "operationId": "rotate",
        "parameters": [
          {
            "in": "path",
            "name": "keyId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreateResponse"
                }
              }
            },
            "description": "API key rotated successfully"
          },
          "404": {
            "description": "API key not found"
          }
        },
        "summary": "Rotate API key",
        "tags": [
          "ApiKeys"
        ],
        "security": [
          {
            "OAuth2": [
              "api-keys:write"
            ]
          }
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "operationId": "me",
        "parameters": [
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutMeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutAuth"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/card-intelligence/bin-lookup": {
      "post": {
        "description": "Accepts exactly 6 or 8 ASCII digits; ambiguous prefixes return all matching reference metadata",
        "operationId": "lookupBin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BinLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinLookupResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Look up BIN metadata",
        "tags": [
          "CardIntelligence"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "card-intelligence:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/auth": {
      "post": {
        "description": "Prompts the cardholder at the terminal without capturing",
        "operationId": "authorizeBolt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltAuthorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTransactionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Pre-authorize on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/auth-manual": {
      "post": {
        "description": "Prompts for manual card entry at the terminal",
        "operationId": "authorizeManual",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltManualAuthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTransactionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process a keyed-entry sale/auth on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/cancel": {
      "post": {
        "operationId": "cancelBolt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Cancel the in-flight operation on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/clear-display": {
      "post": {
        "operationId": "clearDisplay",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalOpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Reset a payment terminal's display",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/date-time": {
      "post": {
        "description": "Requires a terminal that supports clock updates.",
        "operationId": "dateTime",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalDateTimeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltDateTimeResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Set a terminal's system clock",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/display": {
      "post": {
        "operationId": "display",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltDisplayTextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Show a message on a payment terminal's display",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/intents/review": {
      "get": {
        "operationId": "listReviewIntents",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BoltReviewIntentSummary"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List Bolt intents held for operator reconciliation",
        "tags": [
          "BoltFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/intents/{externalReferenceId}/resolve": {
      "post": {
        "operationId": "resolveReviewIntent",
        "parameters": [
          {
            "in": "path",
            "name": "externalReferenceId",
            "required": true,
            "schema": {
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltIntentReviewResolutionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Resolve a Bolt intent after an operator has confirmed its provider outcome",
        "tags": [
          "BoltFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/print-receipt": {
      "post": {
        "operationId": "printReceipt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltPrintReceiptApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltPrintReceiptResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Reprint receipt(s) for a past transaction on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/read-card": {
      "post": {
        "description": "Tap/insert/swipe read without authorization",
        "operationId": "readCard",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltReadCardApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltReadCardResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Read (tokenize) a card at a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/read-confirmation": {
      "post": {
        "operationId": "readConfirmation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltReadConfirmationApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltReadConfirmationResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Prompt the user to confirm a question on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/read-input": {
      "post": {
        "operationId": "readInput",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltReadInputApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltReadInputResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Prompt for keyed user input on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/read-manual": {
      "post": {
        "description": "Manual keyed read without authorization",
        "operationId": "readManual",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltReadManualApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltReadCardResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Read (tokenize) keyed card entry at a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/read-signature": {
      "post": {
        "operationId": "readSignature",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltReadSignatureApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltReadSignatureResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Capture the cardholder's signature on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/sale": {
      "post": {
        "description": "Prompts the cardholder at the terminal and captures",
        "operationId": "saleBolt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltSaleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTransactionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process a sale on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/signature": {
      "post": {
        "description": "Prompts for a signature at the terminal, then attaches it using the transaction reference.",
        "operationId": "captureSignature",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltSignatureCaptureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltSignatureCaptureResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Capture a signature and attach it to a transaction",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminal-details": {
      "post": {
        "operationId": "terminalDetails",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalOpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTerminalDetailsResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Fetch hardware details for a bound payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals": {
      "get": {
        "operationId": "listTerminalsBolt",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BoltTerminalSummary"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List payment terminals bound to a merchant",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "bindTerminal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltBindTerminalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTerminalSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Bind a terminal to a location for in-person payments",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/vendor": {
      "get": {
        "description": "Returns available terminals with their current merchant binding status.",
        "operationId": "listVendorTerminals",
        "parameters": [
          {
            "in": "query",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltVendorTerminalsResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List payment terminals available for a credential profile",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/{hsn}": {
      "delete": {
        "description": "Removes the terminal binding so it can be enrolled again.",
        "operationId": "unbindTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Unbind a payment terminal (HSN) from its merchant",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/{hsn}/ping": {
      "post": {
        "description": "Checks the terminal connection. An unreachable terminal is reported in the response.",
        "operationId": "pingTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalLifecycleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltPingResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Check whether a bound terminal is reachable",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/{hsn}/reactivate": {
      "post": {
        "operationId": "reactivateTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalLifecycleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTerminalSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Reactivate a suspended payment terminal",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/{hsn}/repoint": {
      "post": {
        "operationId": "repointTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltRepointTerminalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTerminalSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move a terminal to another location for in-person payments",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/terminals/{hsn}/suspend": {
      "post": {
        "description": "Suspended terminals reject sale/auth/device operations until reactivated",
        "operationId": "suspendTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "hsn",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTerminalLifecycleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTerminalSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Suspend a bound payment terminal",
        "tags": [
          "Bolt"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/tip": {
      "post": {
        "operationId": "tip",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTipApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTipResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Prompt for a tip selection on a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/bolt/tokenize-card": {
      "post": {
        "description": "Reads a card at the terminal and returns only its canonical saved-payment-method ID",
        "operationId": "tokenizeCard",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoltTokenizeCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoltTokenizeCardResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Tokenize and save a card from a payment terminal",
        "tags": [
          "Bolt"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/cloud-terminals": {
      "get": {
        "operationId": "listTerminalsCloudTerminals",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CloudTerminalSummary"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CloudTerminals"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/cloud-terminals/attempt": {
      "get": {
        "operationId": "attemptStatus",
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CloudTerminalProvider"
            }
          },
          {
            "in": "query",
            "name": "externalReferenceId",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudTerminalAttemptResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CloudTerminals"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/cloud-terminals/authorize": {
      "post": {
        "operationId": "authorizeCloudTerminals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloudTerminalPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudTerminalTransactionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CloudTerminals"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/cloud-terminals/cancel": {
      "post": {
        "operationId": "cancelCloudTerminals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloudTerminalCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "CloudTerminals"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/cloud-terminals/sale": {
      "post": {
        "operationId": "saleCloudTerminals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloudTerminalPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudTerminalTransactionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CloudTerminals"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/transactions/auth": {
      "post": {
        "description": "Processes an in-person authorization transaction",
        "operationId": "authorizeTransactionSync",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardPresentAuthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Transaction processed successfully"
          }
        },
        "summary": "Process a card-present auth",
        "tags": [
          "TransactionSync"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/transactions/sale": {
      "post": {
        "description": "Processes an in-person sale transaction",
        "operationId": "saleTransactionSync",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardPresentSaleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Transaction processed successfully"
          }
        },
        "summary": "Process a card-present sale",
        "tags": [
          "TransactionSync"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/transactions/sync": {
      "post": {
        "operationId": "syncTransaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncTransactionResponse"
                }
              }
            },
            "description": "Transaction synced successfully"
          }
        },
        "summary": "Sync card-present transaction",
        "tags": [
          "TransactionSync"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/transactions/sync/refund": {
      "post": {
        "operationId": "syncRefund",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRefundRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncRefundResponse"
                }
              }
            },
            "description": "Refund synced successfully"
          }
        },
        "summary": "Sync card-present refund",
        "tags": [
          "TransactionSync"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/card-present/transactions/sync/reverse": {
      "post": {
        "operationId": "syncReverse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncReversalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncReversalResponse"
                }
              }
            },
            "description": "Reversal synced successfully"
          }
        },
        "summary": "Sync card-present reversal",
        "tags": [
          "TransactionSync"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co/card-present"
          },
          {
            "url": "https://staging-pay.peakgateway.co/card-present"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/catalog-categories": {
      "get": {
        "description": "Lists the organization's catalog categories",
        "operationId": "listCatalogCategories",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "updatedSince",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "afterId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CatalogCategory"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Categories retrieved successfully"
          }
        },
        "summary": "List catalog categories",
        "tags": [
          "CatalogCategories"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates an organization catalog category",
        "operationId": "createCatalogCategories",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCatalogCategoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogCategory"
                }
              }
            },
            "description": "Category created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create catalog category",
        "tags": [
          "CatalogCategories"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/catalog-categories/{categoryId}": {
      "get": {
        "description": "Retrieves a catalog category by ID",
        "operationId": "getCatalogCategories",
        "parameters": [
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogCategory"
                }
              }
            },
            "description": "Category retrieved successfully"
          },
          "404": {
            "description": "Category not found"
          }
        },
        "summary": "Get catalog category",
        "tags": [
          "CatalogCategories"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "patch": {
        "description": "Updates a catalog category",
        "operationId": "updateCatalogCategories",
        "parameters": [
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCatalogCategoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogCategory"
                }
              }
            },
            "description": "Category updated successfully"
          },
          "404": {
            "description": "Category not found"
          }
        },
        "summary": "Update catalog category",
        "tags": [
          "CatalogCategories"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/catalog-categories/{categoryId}/archive": {
      "post": {
        "description": "Archives a catalog category (soft delete)",
        "operationId": "archiveCatalogCategories",
        "parameters": [
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveCatalogCategoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogCategory"
                }
              }
            },
            "description": "Category archived successfully"
          },
          "404": {
            "description": "Category not found"
          }
        },
        "summary": "Archive catalog category",
        "tags": [
          "CatalogCategories"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions": {
      "post": {
        "description": "Creates a session with permanent request identity; identical retries return the original session and changed requests conflict",
        "operationId": "createCheckoutSessions",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Session created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create checkout session",
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write",
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/by-key": {
      "get": {
        "operationId": "getByKey",
        "parameters": [
          {
            "in": "query",
            "name": "idempotencyKey",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Find checkout session by permanent creation key",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/by-merchant-reference/{reference}": {
      "get": {
        "operationId": "getByMerchantReference",
        "parameters": [
          {
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "pattern": "[A-Za-z0-9_-]{16,64}",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read",
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/readiness": {
      "get": {
        "operationId": "readiness",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutReadinessResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write",
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}": {
      "get": {
        "description": "Retrieves a checkout session",
        "operationId": "getCheckoutSessions",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Session retrieved successfully"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ],
        "summary": "Get checkout session",
        "tags": [
          "CheckoutSessions"
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/account/credential": {
      "post": {
        "operationId": "issueCredential",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutAccountCredentialResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/address-autocomplete": {
      "post": {
        "operationId": "autocomplete",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressAutocompleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressAutocompleteResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/address-autocomplete/details": {
      "post": {
        "operationId": "details",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressAutocompleteDetailsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressAutocompleteDetailsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/apple-pay/pay": {
      "post": {
        "operationId": "payWithApplePay",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutApplePayPayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Process Apple Pay payment for checkout",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/apple-pay/validate": {
      "post": {
        "operationId": "validateApplePay",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutApplePayValidateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplePaySession"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Validate Apple Pay session for checkout",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/apply-promo-code": {
      "post": {
        "description": "Validates and applies a promo code to a checkout session",
        "operationId": "applyPromoCode",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyPromoCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Promo code applied successfully"
          },
          "400": {
            "description": "Invalid promo code or session state"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Apply promo code",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/cancel": {
      "post": {
        "description": "Cancels a checkout session",
        "operationId": "cancelCheckoutSessions",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Session cancelled successfully"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ],
        "summary": "Cancel checkout session",
        "tags": [
          "CheckoutSessions"
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/card-entry-session": {
      "post": {
        "description": "Creates a hosted card-entry attempt for the checkout session.",
        "operationId": "createCheckoutCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardEntrySessionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionCreateResponse"
                }
              }
            },
            "description": "Card-entry session created"
          },
          "400": {
            "description": "Checkout is not eligible for card entry"
          }
        },
        "summary": "Create hosted card-entry session",
        "tags": [
          "CheckoutCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/card-entry-session/{attemptId}": {
      "get": {
        "description": "Returns the status of the card-entry attempt.",
        "operationId": "getCheckoutCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionStatusResponse"
                }
              }
            },
            "description": "Card-entry status retrieved"
          }
        },
        "summary": "Get hosted card-entry session status",
        "tags": [
          "CheckoutCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/card-entry-session/{attemptId}/cancel": {
      "post": {
        "description": "Cancels the card-entry attempt.",
        "operationId": "cancelCheckoutCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card-entry session cancelled"
          }
        },
        "summary": "Cancel hosted card-entry session",
        "tags": [
          "CheckoutCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/customer-binding": {
      "get": {
        "operationId": "customerBinding",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutCustomerBindingResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Read merchant-bound checkout customer and saved-method evidence",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/customer-prefill": {
      "post": {
        "operationId": "hydrateCustomerPrefill",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutCustomerPrefill"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Hydrate missing advisory customer prefill for an existing checkout",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/gift-card/preview": {
      "post": {
        "description": "Resolves a gift card and previews how much of a checkout session it would cover",
        "operationId": "previewGiftCard",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftCardPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardPreviewResponse"
                }
              }
            },
            "description": "Gift card preview computed successfully"
          },
          "400": {
            "description": "Gift card not recognized or invalid session state"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Preview gift card",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/google-pay/config": {
      "get": {
        "operationId": "getGooglePayConfigCheckoutSessions",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutGooglePayConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Get Google Pay config for checkout",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/google-pay/pay": {
      "post": {
        "operationId": "payWithGooglePay",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutGooglePayPayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Process Google Pay payment for checkout",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/line-items/{lineItemId}": {
      "patch": {
        "description": "Updates the quantity for a checkout session line item",
        "operationId": "updateLineItemQuantity",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "lineItemId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLineItemQuantityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Line item quantity updated successfully"
          },
          "400": {
            "description": "Invalid request or session state"
          }
        },
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ],
        "summary": "Update checkout line item quantity",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/pay": {
      "post": {
        "description": "Processes payment for a checkout session",
        "operationId": "pay",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResult"
                }
              }
            },
            "description": "Payment processed successfully"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Process payment",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/promotion-codes/{promotionCodeId}": {
      "delete": {
        "description": "Removes a promotion code from a checkout session",
        "operationId": "removePromoCode",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "promotionCodeId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Promo code removed successfully"
          },
          "404": {
            "description": "Session or promo code not found"
          }
        },
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ],
        "summary": "Remove promo code",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/send-receipt": {
      "post": {
        "description": "Queues a receipt email for a completed checkout session",
        "operationId": "sendReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt email queued successfully"
          },
          "400": {
            "description": "Checkout session is not eligible for a receipt"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Send checkout receipt email",
        "tags": [
          "CheckoutSessions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/sessions/{sessionId}/shipping-rates": {
      "get": {
        "operationId": "getSessionRates",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShippingRate"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Shipping rates retrieved"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Get shipping rates for a checkout session",
        "tags": [
          "Shipping"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      },
      "post": {
        "operationId": "selectRate",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectShippingRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingRate"
                }
              }
            },
            "description": "Shipping rate selected"
          },
          "400": {
            "description": "Invalid shipping rate"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ],
        "summary": "Select a shipping rate for a checkout session",
        "tags": [
          "Shipping"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/checkout/shipping/config": {
      "get": {
        "description": "Gets shipping configuration for a merchant",
        "operationId": "getShippingConfig",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Shipping config retrieved successfully"
          }
        },
        "summary": "Get shipping config",
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates shipping configuration for a merchant",
        "operationId": "upsertShippingConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutShippingConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Shipping config updated successfully"
          }
        },
        "summary": "Update shipping config",
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Deletes shipping configuration for a merchant",
        "operationId": "deleteShippingConfig",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Shipping config deleted successfully"
          }
        },
        "summary": "Delete shipping config",
        "tags": [
          "CheckoutSessions"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      }
    },
    "/api/v1/coupons": {
      "get": {
        "description": "Lists coupons for a merchant with optional pagination",
        "operationId": "listCoupons",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Coupon"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Coupons retrieved successfully"
          }
        },
        "summary": "List coupons",
        "tags": [
          "Coupons"
        ],
        "security": [
          {
            "OAuth2": [
              "coupons:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new coupon for a merchant",
        "operationId": "createCoupons",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCouponRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coupon"
                }
              }
            },
            "description": "Coupon created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create coupon",
        "tags": [
          "Coupons"
        ],
        "security": [
          {
            "OAuth2": [
              "coupons:write"
            ]
          }
        ]
      }
    },
    "/api/v1/coupons/{couponId}": {
      "get": {
        "description": "Retrieves a specific coupon by ID",
        "operationId": "getCoupons",
        "parameters": [
          {
            "in": "path",
            "name": "couponId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coupon"
                }
              }
            },
            "description": "Coupon retrieved successfully"
          },
          "404": {
            "description": "Coupon not found"
          }
        },
        "summary": "Get coupon",
        "tags": [
          "Coupons"
        ],
        "security": [
          {
            "OAuth2": [
              "coupons:read"
            ]
          }
        ]
      }
    },
    "/api/v1/coupons/{couponId}/archive": {
      "post": {
        "description": "Archives a coupon (soft delete)",
        "operationId": "archiveCoupons",
        "parameters": [
          {
            "in": "path",
            "name": "couponId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coupon"
                }
              }
            },
            "description": "Coupon archived successfully"
          },
          "404": {
            "description": "Coupon not found"
          }
        },
        "summary": "Archive coupon",
        "tags": [
          "Coupons"
        ],
        "security": [
          {
            "OAuth2": [
              "coupons:write"
            ]
          }
        ]
      }
    },
    "/api/v1/credential-profiles/{credentialProfileId}/elavon-epg-validation": {
      "get": {
        "operationId": "validateElavonEpg",
        "parameters": [
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CredentialProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "external-capabilities:read"
            ]
          }
        ]
      }
    },
    "/api/v1/credit-notes": {
      "get": {
        "description": "Lists credit notes for a merchant, optionally filtered by customer",
        "operationId": "listCreditNotesGet",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CreditNote"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Credit notes retrieved successfully"
          }
        },
        "summary": "List credit notes",
        "tags": [
          "CreditNotes"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates and issues a credit note against the supplied payment id (or external invoice id)",
        "operationId": "createCreditNotes",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCreditNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            },
            "description": "Credit note created successfully"
          }
        },
        "summary": "Create credit note",
        "tags": [
          "CreditNotes"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/credit-notes/preview": {
      "post": {
        "description": "Computes credit note totals without persisting the credit note",
        "operationId": "preview",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCreditNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            },
            "description": "Credit note preview generated successfully"
          }
        },
        "summary": "Preview credit note",
        "tags": [
          "CreditNotes"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/credit-notes/{id}": {
      "get": {
        "description": "Retrieves a credit note by ID",
        "operationId": "getCreditNotes",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            },
            "description": "Credit note retrieved successfully"
          }
        },
        "summary": "Get credit note",
        "tags": [
          "CreditNotes"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/credit-notes/{id}/void": {
      "post": {
        "description": "Voids an issued credit note",
        "operationId": "void",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            },
            "description": "Credit note voided successfully"
          }
        },
        "summary": "Void credit note",
        "tags": [
          "CreditNotes"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customer-contacts": {
      "get": {
        "operationId": "listCustomerContacts",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerContact"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Customer contacts retrieved"
          }
        },
        "summary": "List customer contacts for an organization",
        "tags": [
          "CustomerContacts"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createCustomerContacts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerContact"
                }
              }
            },
            "description": "Customer contact saved"
          }
        },
        "summary": "Create or update a customer contact",
        "tags": [
          "CustomerContacts"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customer-contacts/invite": {
      "post": {
        "operationId": "invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCustomerContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerContact"
                }
              }
            },
            "description": "Invite dispatched"
          }
        },
        "summary": "Send an invite to a customer contact",
        "tags": [
          "CustomerContacts"
        ],
        "security": [
          {
            "OAuth2": [
              "customer-contacts:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customer-contacts/{contactId}/payment-request": {
      "post": {
        "operationId": "createPaymentRequest",
        "parameters": [
          {
            "in": "path",
            "name": "contactId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerContactPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerContactPaymentRequestResponse"
                }
              }
            },
            "description": "Customer contact payment request created"
          }
        },
        "summary": "Create a payment request checkout session for a customer contact",
        "tags": [
          "CustomerContacts"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customer-oauth-clients": {
      "get": {
        "description": "Lists OAuth clients owned by the caller's organizations",
        "operationId": "listCustomerOAuthClients",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OAuthClient"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Clients retrieved successfully"
          }
        },
        "summary": "List owned OAuth clients",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "OAuth2": [
              "customer-oauth-clients:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Registers an OAuth client bound to the caller's organizations",
        "operationId": "registerCustomerOAuthClients",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterOAuthClientRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterOAuthClientResponse"
                }
              }
            },
            "description": "Client registered successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Register owned OAuth client",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/customer-oauth-clients/{clientId}": {
      "get": {
        "description": "Retrieves one OAuth client owned by the caller's organizations",
        "operationId": "getCustomerOAuthClients",
        "parameters": [
          {
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthClient"
                }
              }
            },
            "description": "Client retrieved successfully"
          },
          "403": {
            "description": "Client is outside the caller's organization access"
          }
        },
        "summary": "Get owned OAuth client",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "OAuth2": [
              "customer-oauth-clients:read"
            ]
          }
        ]
      },
      "delete": {
        "description": "Revokes an OAuth client owned by the caller",
        "operationId": "revokeCustomerOAuthClients",
        "parameters": [
          {
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Client revoked successfully"
          }
        },
        "summary": "Revoke owned OAuth client",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/customer-oauth-clients/{clientId}/scopes": {
      "put": {
        "description": "Updates scopes for an owned OAuth client",
        "operationId": "updateScopes",
        "parameters": [
          {
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientScopesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthClient"
                }
              }
            },
            "description": "Scopes updated successfully"
          }
        },
        "summary": "Update owned OAuth client scopes",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/customer-oauth-clients/{clientId}/secret:rotate": {
      "post": {
        "description": "Rotates the client secret for an owned OAuth client",
        "operationId": "rotateSecret",
        "parameters": [
          {
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateOAuthClientSecretResponse"
                }
              }
            },
            "description": "Secret rotated successfully"
          }
        },
        "summary": "Rotate owned OAuth client secret",
        "tags": [
          "CustomerOAuthClients"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/customers": {
      "get": {
        "description": "Lists customers for a merchant",
        "operationId": "listCustomers",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "updatedSince",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "afterId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseCustomer"
                }
              }
            },
            "description": "Customers retrieved successfully"
          },
          "400": {
            "description": "Invalid request parameters"
          }
        },
        "summary": "List customers",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:read",
              "transactions:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a merchant-owned customer record without creating or attaching a Gateway user identity.",
        "operationId": "createCustomers",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer created"
          }
        },
        "summary": "Create merchant customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/get-or-create": {
      "post": {
        "description": "Resolves a merchant customer by email or phone, creating it only when no match exists.",
        "operationId": "getOrCreateCustomer",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Customer resolved or created"
          }
        },
        "summary": "Resolve or create customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/resolve-binding": {
      "post": {
        "description": "Resolves or creates an organization-scoped customer using an opaque external reference. Email is not used as a lookup key.",
        "operationId": "resolveCustomerBinding",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveCustomerBindingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer binding resolved"
          }
        },
        "summary": "Resolve POS customer binding",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}": {
      "get": {
        "description": "Retrieves details of a specific customer",
        "operationId": "getCustomers",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer retrieved successfully"
          },
          "404": {
            "description": "Customer not found"
          }
        },
        "summary": "Get customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:read",
              "transactions:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateCustomer",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostedCustomerUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            },
            "description": "Customer updated"
          }
        },
        "summary": "Update customer",
        "tags": [
          "Customers"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      },
      "patch": {
        "description": "Updates an existing customer",
        "operationId": "updateCustomers",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer updated successfully"
          },
          "404": {
            "description": "Customer not found"
          }
        },
        "summary": "Update customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/activity-references": {
      "get": {
        "description": "Lists the customer's activity references, newest first.",
        "operationId": "listActivityReferences",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerActivityReference"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Activity references retrieved"
          },
          "404": {
            "description": "Customer not found"
          }
        },
        "summary": "List customer activity references",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/activity-references/{sourceSystem}/{sourceTransactionId}": {
      "put": {
        "description": "Idempotently records a purchase another system of record made for the customer. Identical content returns the stored reference unchanged; different content updates it.",
        "operationId": "putActivityReference",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sourceSystem",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CustomerActivitySourceSystem"
            }
          },
          {
            "in": "path",
            "name": "sourceTransactionId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutCustomerActivityReferenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerActivityReference"
                }
              }
            },
            "description": "Activity reference recorded or already current"
          },
          "404": {
            "description": "Customer not found"
          },
          "409": {
            "description": "Customer was merged into another customer"
          }
        },
        "summary": "Record customer activity reference",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/archive": {
      "post": {
        "description": "Archives this customer without detaching saved methods or changing history",
        "operationId": "archiveCustomers",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer archived"
          },
          "404": {
            "description": "Customer not found"
          }
        },
        "summary": "Archive customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "customers:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/balance": {
      "get": {
        "description": "Returns the current customer balance",
        "operationId": "getCustomerBalance",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerBalance"
                }
              }
            },
            "description": "Customer balance retrieved successfully"
          }
        },
        "summary": "Get customer balance",
        "tags": [
          "CustomerBalance"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/balance-transactions": {
      "get": {
        "description": "Returns paginated ledger entries for a customer balance",
        "operationId": "listTransactionsCustomerBalance",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseCustomerBalanceTransaction"
                }
              }
            },
            "description": "Customer balance transactions retrieved successfully"
          }
        },
        "summary": "List customer balance transactions",
        "tags": [
          "CustomerBalance"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/balance/adjust": {
      "post": {
        "description": "Creates a manual balance adjustment ledger entry",
        "operationId": "adjustCustomerBalance",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustCustomerBalanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerBalance"
                }
              }
            },
            "description": "Customer balance adjusted successfully"
          }
        },
        "summary": "Adjust customer balance",
        "tags": [
          "CustomerBalance"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/bind-existing": {
      "post": {
        "operationId": "bindExisting",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosCustomerBindExistingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/default-payment-method": {
      "put": {
        "description": "Sets the default payment method for a customer",
        "operationId": "setDefaultPaymentMethodCustomers",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultPaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Default payment method updated successfully"
          },
          "404": {
            "description": "Customer not found"
          }
        },
        "summary": "Set default payment method",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/payment-methods": {
      "get": {
        "description": "Lists stored payment methods for a customer",
        "operationId": "getPaymentMethods",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeExpired",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Payment methods retrieved successfully"
          }
        },
        "summary": "Get customer payment methods",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{customerId}/transactions": {
      "get": {
        "description": "Lists transactions for a specific customer",
        "operationId": "getTransactions",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseTransaction"
                }
              }
            },
            "description": "Transactions retrieved successfully"
          }
        },
        "summary": "Get customer transactions",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{sourceCustomerId}/merge-into/{targetCustomerId}": {
      "post": {
        "description": "Merges one customer row into another within the same organization. All gift cards, subscriptions, and saved payment methods move from the source to the target atomically. Returns the per-table row counts that were re-parented and flags whether the underlying customer_identities rows were collapsed.",
        "operationId": "mergeInto",
        "parameters": [
          {
            "in": "path",
            "name": "sourceCustomerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "targetCustomerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMergeResponse"
                }
              }
            },
            "description": "Customer merged successfully"
          },
          "400": {
            "description": "Invalid request (same id, already merged)"
          },
          "403": {
            "description": "Customers belong to different organizations"
          },
          "404": {
            "description": "Source or target customer not found"
          }
        },
        "summary": "Merge customer",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/customers/{sourceCustomerId}/pos-merge-into/{targetCustomerId}": {
      "post": {
        "operationId": "mergePosBinding",
        "parameters": [
          {
            "in": "path",
            "name": "sourceCustomerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "targetCustomerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosCustomerMergeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosCustomerMergeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/dashboard/metrics": {
      "get": {
        "description": "Retrieves aggregated metrics for the dashboard",
        "operationId": "getMetrics",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardMetrics"
                }
              }
            },
            "description": "Metrics retrieved successfully"
          }
        },
        "summary": "Get dashboard metrics",
        "tags": [
          "Dashboard"
        ],
        "security": [
          {
            "OAuth2": [
              "dashboard:read"
            ]
          }
        ]
      }
    },
    "/api/v1/device-class-entitlements": {
      "get": {
        "description": "Returns the canonical device-license grants an organization may use for enrollment. Requires org admin.",
        "operationId": "listEntitlements",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceClassEntitlementResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List entitled device classes",
        "tags": [
          "DeviceClassEntitlements"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/devices": {
      "get": {
        "description": "List all enrolled devices for an organization. Requires org admin.",
        "operationId": "listDevices",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceIdentityResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List enrolled devices",
        "tags": [
          "Devices"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/devices/fleet/claims": {
      "post": {
        "operationId": "acquireTerminalClaim",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcquireTerminalClaimRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalClaimActionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/fleet/claims/preflight": {
      "get": {
        "operationId": "preflightTerminalClaim",
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CloudTerminalProvider"
            }
          },
          {
            "in": "query",
            "name": "hardwareId",
            "required": true,
            "schema": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalClaimPreflightResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/fleet/claims/{claimId}/release": {
      "post": {
        "operationId": "releaseTerminalClaim",
        "parameters": [
          {
            "in": "path",
            "name": "claimId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalClaimActionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/fleet/claims/{claimId}/retry": {
      "post": {
        "operationId": "retryTerminalClaim",
        "parameters": [
          {
            "in": "path",
            "name": "claimId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalClaimActionResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/key-scope/revoke": {
      "post": {
        "operationId": "revokeEnrollmentKeyScope",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceKeyScopeRevocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "int32",
                  "type": "integer"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/{deviceId}": {
      "get": {
        "description": "Get a single enrolled device by ID.",
        "operationId": "getDevices",
        "parameters": [
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceIdentityResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get device",
        "tags": [
          "Devices"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      },
      "delete": {
        "operationId": "revokeDeviceFleet",
        "parameters": [
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeDeviceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/devices/{deviceId}/alias": {
      "patch": {
        "description": "Set a human-readable alias for a device.",
        "operationId": "updateAlias",
        "parameters": [
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeviceAliasRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceIdentityResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update device alias",
        "tags": [
          "Devices"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/devices/{deviceId}/device-class": {
      "patch": {
        "description": "Promote an enrolled Android native Tap-to-Pay device to the requested payment-provider device class before issuing credentials.",
        "operationId": "updateDeviceClass",
        "parameters": [
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeviceClassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceIdentityResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update device class",
        "tags": [
          "Devices"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/discounts": {
      "post": {
        "operationId": "apply",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyDiscountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Apply discount",
        "tags": [
          "Discounts"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/discounts/by-checkout-session/{checkoutSessionId}": {
      "get": {
        "operationId": "listByCheckoutSession",
        "parameters": [
          {
            "in": "path",
            "name": "checkoutSessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DiscountResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List applied discounts for a checkout session",
        "tags": [
          "Discounts"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/discounts/by-subscription/{subscriptionId}": {
      "get": {
        "operationId": "listBySubscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DiscountResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List applied discounts for a subscription",
        "tags": [
          "Discounts"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/discounts/{discountId}": {
      "get": {
        "operationId": "getDiscounts",
        "parameters": [
          {
            "in": "path",
            "name": "discountId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get applied discount",
        "tags": [
          "Discounts"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "remove",
        "parameters": [
          {
            "in": "path",
            "name": "discountId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Remove applied discount",
        "tags": [
          "Discounts"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/dunning-cases": {
      "get": {
        "description": "Lists persisted dunning cases; merchantId/locationId are optional so platform admins can scan across every merchant",
        "operationId": "listAllCases",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DunningCaseStatus"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseDunningCase"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List dunning cases across merchants",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/event-subscriptions": {
      "get": {
        "operationId": "listEventSubscriptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EventSubscription"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List event subscriptions",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "event-subscriptions:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createEventSubscriptions",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Create event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "event-subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/event-subscriptions/{subscriptionId}": {
      "get": {
        "operationId": "getEventSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "event-subscriptions:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateEventSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEventSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "event-subscriptions:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteEventSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "event-subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/event-subscriptions/{subscriptionId}/test": {
      "post": {
        "operationId": "testEventSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscriptionTestDeliveryResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Send a test event subscription delivery",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:manage"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-card-configs/{organizationId}": {
      "get": {
        "operationId": "getConfigGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateConfig",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-card-configs/{organizationId}/location-restrictions": {
      "get": {
        "operationId": "listLocationRestrictions",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateLocationRestrictions",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardLocationRestrictionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards": {
      "post": {
        "operationId": "issueGiftCards",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardIssueResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/bulk-import": {
      "post": {
        "operationId": "bulkImport",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportGiftCardLine"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/bulk-issue": {
      "post": {
        "operationId": "bulkIssue",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkIssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkIssueGiftCardLine"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/lookup": {
      "post": {
        "operationId": "lookup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/revoke-unused-funded-loads": {
      "post": {
        "operationId": "revokeUnusedFundedLoads",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRevokeUnusedGiftCardsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCard"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}": {
      "get": {
        "operationId": "getGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/adjust": {
      "post": {
        "operationId": "adjustGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/balance": {
      "get": {
        "operationId": "balance",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardBalance"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/mark-lost": {
      "post": {
        "operationId": "markLost",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/redemptions": {
      "post": {
        "description": "Redeems a gift card against the location in the request body.",
        "operationId": "redeem",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransaction"
                }
              }
            },
            "description": "Gift card redeemed successfully"
          }
        },
        "summary": "Redeem gift card",
        "tags": [
          "PayGiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/reloads": {
      "post": {
        "operationId": "reload",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReloadGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/restore-lost": {
      "post": {
        "operationId": "restoreLost",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/revoke": {
      "post": {
        "operationId": "revokeGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/gift-cards/{id}/transactions": {
      "get": {
        "operationId": "listTransactionsGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCardTransaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/button": {
      "post": {
        "description": "Creates a hosted payment button",
        "operationId": "createButton",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateHostedButtonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedButton"
                }
              }
            },
            "description": "Button created successfully"
          }
        },
        "summary": "Create hosted button",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/button/{buttonId}": {
      "get": {
        "description": "Retrieves a hosted payment button",
        "operationId": "getButton",
        "parameters": [
          {
            "in": "path",
            "name": "buttonId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedButton"
                }
              }
            },
            "description": "Button retrieved successfully"
          }
        },
        "summary": "Get hosted button",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates a hosted payment button (display name, status, expiry, open amount, line items)",
        "operationId": "updateButton",
        "parameters": [
          {
            "in": "path",
            "name": "buttonId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateHostedButtonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedButton"
                }
              }
            },
            "description": "Button updated successfully"
          },
          "404": {
            "description": "Button not found"
          }
        },
        "summary": "Update hosted button",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Deletes a hosted payment button",
        "operationId": "deleteButton",
        "parameters": [
          {
            "in": "path",
            "name": "buttonId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Button deleted successfully"
          }
        },
        "summary": "Delete hosted button",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/button/{buttonId}/stats": {
      "get": {
        "description": "Retrieves per-link payment count and revenue for a hosted payment button",
        "operationId": "getButtonStats",
        "parameters": [
          {
            "in": "path",
            "name": "buttonId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedButtonStats"
                }
              }
            },
            "description": "Stats retrieved successfully"
          },
          "404": {
            "description": "Button not found"
          }
        },
        "summary": "Get hosted button stats",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/buttons": {
      "get": {
        "description": "Lists all hosted payment buttons for the merchant",
        "operationId": "listButtons",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/HostedButton"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Buttons listed successfully"
          }
        },
        "summary": "List hosted buttons",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/buttons/{buttonId}/checkout": {
      "post": {
        "description": "Creates a checkout session from a hosted button",
        "operationId": "createCheckoutFromButton",
        "parameters": [
          {
            "in": "path",
            "name": "buttonId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "Checkout session created successfully"
          }
        },
        "security": [],
        "summary": "Create checkout from hosted button",
        "tags": [
          "HostedPayments"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/hosted/card-entry-config": {
      "get": {
        "description": "Returns the merchant's configured card-entry tokenization mode without creating a session",
        "operationId": "getCardEntryConfig",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntryConfigResponse"
                }
              }
            },
            "description": "Card-entry configuration resolved successfully"
          }
        },
        "summary": "Get card entry configuration",
        "tags": [
          "HostedPayments"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/hosted/iframe-session": {
      "post": {
        "description": "Creates a hosted payment iframe session",
        "operationId": "createIframeSession",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIframeSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IframeSession"
                }
              }
            },
            "description": "Session created successfully"
          }
        },
        "summary": "Create iframe session",
        "tags": [
          "HostedPayments"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/impersonation/sessions": {
      "post": {
        "operationId": "createImpersonation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImpersonationSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Start impersonating a merchant organization",
        "tags": [
          "Impersonation"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/impersonation/sessions/current": {
      "get": {
        "operationId": "current",
        "parameters": [
          {
            "in": "header",
            "name": "X-Gateway-Impersonation-Session",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get the active impersonation session",
        "tags": [
          "Impersonation"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      },
      "delete": {
        "operationId": "endCurrent",
        "parameters": [
          {
            "in": "header",
            "name": "X-Gateway-Impersonation-Session",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationSession"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "End the active impersonation session",
        "tags": [
          "Impersonation"
        ],
        "security": [
          {
            "UserSession": []
          }
        ]
      }
    },
    "/api/v1/installment-plans": {
      "post": {
        "description": "Attests explicit customer authorization of every stage and binds it to a scoped active saved card. A changed plan or replacement card requires a new plan identity and fresh authorization. Availability depends on the payment configuration for the location.",
        "operationId": "createInstallmentPlan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInstallmentPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentPlanResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Authorize an immutable finite installment plan",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/installment-plans/{planId}": {
      "get": {
        "operationId": "getInstallmentPlan",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentPlanResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Read an authorized installment plan and durable remaining amounts",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/installment-plans/{planId}/installments/{installmentId}/attempts/{attempt}": {
      "get": {
        "description": "Read-only lookup retains the original operation identity. Unknown, missing, failed or inconclusive lookup preserves UNKNOWN and its dispatch fence.",
        "operationId": "inquireInstallmentAttempt",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "installmentId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentAttemptResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Inquire the exact installment operation",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/installment-plans/{planId}/installments/{installmentId}/charge": {
      "post": {
        "description": "Gateway derives processor counts, MIT indicators and original NTI from the committed plan. Attempt identity is deterministic. Duplicate dispatches only inquire; a subsequent explicit attempt requires the previous definitive decline. Missing/unknown inquiry is never permission to debit again.",
        "operationId": "chargeInstallment",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "installmentId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeInstallmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentAttemptResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Dispatch one due installment attempt",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/installment-plans/{planId}/installments/{installmentId}/external-payments": {
      "post": {
        "description": "A stable external payment identity reduces only this stage. A fully paid stage is skipped without renumbering the plan. An in-progress/unknown Gateway attempt cannot be adjusted. This is an authenticated merchant assertion, not a Gateway inquiry into another tender.",
        "operationId": "recordInstallmentExternalPayment",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "installmentId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordInstallmentPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentPlanResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Record a definitive early or partial payment",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/installment-plans/{planId}/revoke": {
      "post": {
        "description": "An already claimed unknown operation still requires inquiry. Revocation never turns unknown into no-payment authority.",
        "operationId": "revokeInstallmentPlan",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallmentPlanResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Revoke future installment dispatch",
        "tags": [
          "InstallmentPlans"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/invoices/{invoiceId}/customer-pdf": {
      "get": {
        "operationId": "customerDownload",
        "parameters": [
          {
            "in": "path",
            "name": "invoiceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Customer invoice PDF downloaded"
          }
        },
        "tags": [
          "Invoices"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/locations": {
      "get": {
        "description": "Lists merchants with pagination",
        "operationId": "listLocationsGet",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseLocation"
                }
              }
            },
            "description": "Merchants retrieved successfully"
          }
        },
        "summary": "List merchants",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/app-push-attempts": {
      "get": {
        "operationId": "listCardPresentAppPushAttempts",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "serialNumber",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XtmsAppPushAttemptListResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/smart-connect/topology/{hostDeviceId}": {
      "put": {
        "operationId": "configureSmartConnectTopology",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hostDeviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigureSmartConnectTopologyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartConnectTopologyResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteSmartConnectTopology",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hostDeviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mutationVersion",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/easy-deploy/pushes": {
      "post": {
        "operationId": "pushEasyDeploy",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EasyDeployPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/easy-deploy/templates": {
      "get": {
        "operationId": "listEasyDeployTemplates",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EasyDeployTemplateResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "upsertEasyDeployTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EasyDeployTemplateUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EasyDeployTemplateResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/easy-deploy/templates/{templateId}": {
      "delete": {
        "operationId": "deleteEasyDeployTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/{serialNumber}/apps/install": {
      "post": {
        "operationId": "installCardPresentApp",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstallDeviceAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/{serialNumber}/commands": {
      "post": {
        "operationId": "sendCardPresentDeviceCommand",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardPresentDeviceCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/{serialNumber}/location-alert": {
      "post": {
        "operationId": "configureCardPresentLocationAlert",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/{serialNumber}/messages": {
      "post": {
        "operationId": "sendCardPresentDeviceMessage",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardPresentDeviceMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/card-present-devices/{provider}/{serialNumber}/updates": {
      "post": {
        "operationId": "pushCardPresentDeviceUpdate",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CardPresentDeviceProvider"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevicePushResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/runtime-state": {
      "get": {
        "operationId": "listRuntimeStates",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceRuntimeStateResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/sdk-identities": {
      "get": {
        "operationId": "listSdkIdentities",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SdkDeviceIdentityResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/commands": {
      "get": {
        "operationId": "listCommandsDeviceFleet",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceCommandResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "enqueueCommand",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueDeviceCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceCommandResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/commands/{commandId}": {
      "get": {
        "operationId": "getCommandDeviceFleet",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "commandId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceCommandResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/commands/{commandId}/ack": {
      "post": {
        "operationId": "acknowledgeCommand",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "commandId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCommandAckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceCommandResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/heartbeat": {
      "post": {
        "operationId": "recordHeartbeat",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceHeartbeatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceHeartbeatResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/runtime-snapshot": {
      "get": {
        "operationId": "getRuntimeSnapshot",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceRuntimeSnapshotResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/devices/{deviceId}/runtime-state": {
      "get": {
        "operationId": "getRuntimeState",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceRuntimeStateResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "DeviceFleet"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/dunning-cases": {
      "get": {
        "description": "Lists persisted dunning cases for a merchant, optionally filtered by status",
        "operationId": "listCases",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DunningCaseStatus"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseDunningCase"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List dunning cases",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/dunning-cases/{caseId}": {
      "get": {
        "description": "Retrieves a single dunning case and its event timeline",
        "operationId": "getCase",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningCaseWithEvents"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get dunning case",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/dunning-cases/{caseId}/decision-timeline": {
      "get": {
        "description": "Resolves the case's server-supplied recurring billing selector and returns its sanitized decision timeline",
        "operationId": "getDecisionTimelineDunning",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTimelineResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get dunning decision timeline",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/dunning-cases/{caseId}/send-link": {
      "post": {
        "description": "Issues a hosted update-payment recovery link for the case's subscription and emails/texts it to the customer",
        "operationId": "sendLink",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendDunningLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningCaseSendLinkResult"
                }
              }
            },
            "description": "Send attempted; response reports whether/how the customer was notified"
          },
          "404": {
            "description": "Dunning case not found"
          }
        },
        "summary": "Send update-payment link",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "recovery:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/dunning-config": {
      "get": {
        "operationId": "getDunning",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "upsert",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertDunningConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards": {
      "get": {
        "description": "Lists organization-scoped gift cards for the current merchant context",
        "operationId": "listForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedAtLocationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedToCustomerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCard"
                }
              }
            },
            "description": "Gift cards retrieved successfully"
          }
        },
        "summary": "List gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Issues a new gift card within the current organization",
        "operationId": "issueForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Gateway-One-Wire",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardIssueResponse"
                }
              }
            },
            "description": "Gift card issued successfully"
          }
        },
        "summary": "Issue gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/bulk-import": {
      "post": {
        "description": "Streams NDJSON: one JSON object per imported card row",
        "operationId": "bulkImportForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportGiftCardLine"
                }
              }
            },
            "description": "Bulk import stream started"
          }
        },
        "summary": "Bulk-import gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/bulk-issue": {
      "post": {
        "description": "Streams NDJSON: one JSON object per issued card",
        "operationId": "bulkIssueForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkIssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkIssueGiftCardLine"
                }
              }
            },
            "description": "Bulk issuance stream started"
          }
        },
        "summary": "Bulk-issue gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/config": {
      "get": {
        "description": "Returns the per-Organization gift card config",
        "operationId": "getConfigForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "Config retrieved successfully"
          }
        },
        "summary": "Get gift card config",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates the per-Organization gift card config",
        "operationId": "updateConfigForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "Config updated successfully"
          }
        },
        "summary": "Update gift card config",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/config/location-restrictions": {
      "get": {
        "description": "Returns per-location redemption restrictions for the organization",
        "operationId": "listLocationRestrictionsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Location restrictions retrieved successfully"
          }
        },
        "summary": "List gift card location restrictions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Replaces the organization restriction grid for gift-card redemption",
        "operationId": "updateLocationRestrictionsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardLocationRestrictionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Location restrictions updated successfully"
          }
        },
        "summary": "Update gift card location restrictions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/issue-operations/{operationKey}": {
      "get": {
        "operationId": "getIssueOperationForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "operationKey",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/liability": {
      "get": {
        "description": "Retrieves organization-level gift card liability metrics",
        "operationId": "liabilitySummaryForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardLiabilitySummary"
                }
              }
            },
            "description": "Liability summary retrieved successfully"
          }
        },
        "summary": "Gift card liability summary",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/lookup": {
      "post": {
        "description": "Looks up a gift card by card number and optional PIN",
        "operationId": "lookupForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card retrieved successfully"
          }
        },
        "summary": "Lookup gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/redemption-outcome": {
      "get": {
        "description": "Reads the original scoped redemption without card credentials. NOT_FOUND is snapshot absence, not debit retry authority.",
        "operationId": "getGiftCardRedemptionOutcome",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "operationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardRedemptionOutcome"
                }
              }
            },
            "description": "Original redemption or NOT_FOUND"
          }
        },
        "summary": "Inquire a gift-card redemption outcome",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{giftCardId}/adjust": {
      "post": {
        "description": "Applies a platform-admin balance adjustment with required reason",
        "operationId": "adjustForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card adjusted successfully"
          }
        },
        "summary": "Adjust gift card balance",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{giftCardId}/mark-lost": {
      "post": {
        "description": "Marks a card as lost while preserving its balance for later restoration",
        "operationId": "markLostForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card marked lost successfully"
          }
        },
        "summary": "Mark gift card as lost",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{giftCardId}/restore-lost": {
      "post": {
        "description": "Returns a LOST card to ACTIVE so it can be redeemed again",
        "operationId": "restoreLostForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card restored successfully"
          }
        },
        "summary": "Restore gift card from lost",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{giftCardId}/revoke": {
      "post": {
        "description": "Revokes a gift card; the balance is zeroed and the card becomes terminal",
        "operationId": "revokeForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card revoked successfully"
          }
        },
        "summary": "Revoke gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{giftCardId}/transactions": {
      "get": {
        "description": "Returns the paginated ledger for a single gift card",
        "operationId": "listTransactionsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCardTransaction"
                }
              }
            },
            "description": "Gift card transactions retrieved successfully"
          }
        },
        "summary": "List gift card transactions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{id}/redemptions": {
      "post": {
        "description": "Redeems a gift card for a path-scoped location.",
        "operationId": "redeemGiftCardLocations",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransaction"
                }
              }
            },
            "description": "Gift card redeemed successfully"
          }
        },
        "summary": "Redeem gift card for location",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/gift-cards/{id}/refunds": {
      "post": {
        "description": "Refunds a gift-card redemption for a path-scoped location.",
        "operationId": "refundGiftCard",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransaction"
                }
              }
            },
            "description": "Gift card redemption refunded successfully"
          }
        },
        "summary": "Refund gift card redemption",
        "tags": [
          "Locations"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/products/{productId}/images": {
      "get": {
        "operationId": "listProductImages",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProductImage"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List product images",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "upload",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "altText",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductImage"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Upload product image",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/products/{productId}/images/{imageId}": {
      "delete": {
        "operationId": "deleteProductImages",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "imageId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Delete product image",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/subscription-schedules": {
      "get": {
        "description": "Lists schedules for a merchant",
        "operationId": "listSubscriptionSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseSubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedules retrieved successfully"
          }
        },
        "summary": "List subscription schedules",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/surcharge-disclosure": {
      "get": {
        "description": "The authenticated merchant declaration is not processor enrollment verification.",
        "operationId": "getSurchargeDisclosure",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationSurchargeDisclosureResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get the declared customer/location surcharge maximum",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      },
      "patch": {
        "description": "Declare the maximum actually disclosed to customers, including posted native POS disclosure. Null/omission retains the declaration; clear explicitly removes it. Zero is a declared zero maximum, never verification that processor enrollment is off. Actor and reason are audited atomically.",
        "operationId": "updateSurchargeDisclosure",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationSurchargeDisclosureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationSurchargeDisclosureResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Declare the customer/location surcharge maximum",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/tax-configs": {
      "get": {
        "operationId": "listByLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "jurisdiction_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TaxConfigRow"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaxConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxConfigRow"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/tax-configs/{id}": {
      "patch": {
        "operationId": "updateForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaxConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxConfigRow"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/tax-settings": {
      "get": {
        "operationId": "getTaxSettingsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationTaxSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateTaxSettingsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationTaxSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationTaxSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "clearTaxSettingsForLocation",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationTaxSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices": {
      "get": {
        "operationId": "listTerminalDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TerminalDevice"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/notifications/batch-closed": {
      "post": {
        "operationId": "publishBatchClosed",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalDeviceBatchClosedRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceNotificationDispatchResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/payment-devices/candidates": {
      "get": {
        "operationId": "discoverPaymentDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PaymentDeviceDiscoveryCandidate"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/payment-devices/{serialNumber}/identity": {
      "get": {
        "operationId": "lookupPaymentDeviceIdentity",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDeviceIdentity"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/payment-devices/{serialNumber}/readiness": {
      "get": {
        "operationId": "checkPaymentDeviceReadiness",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "serialNumber",
            "required": true,
            "schema": {
              "maxLength": 255,
              "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "requiredCapabilities",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDeviceReadinessResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/register": {
      "post": {
        "operationId": "registerTerminalDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalDeviceRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDevice"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}": {
      "get": {
        "operationId": "getTerminalDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDevice"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands": {
      "get": {
        "operationId": "listCommandsTerminalDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "resultStatus",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "createdAfter",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "createdBefore",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TerminalDeviceCommandStatus"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "sendCommand",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalDeviceCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceCommandResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands/latest": {
      "get": {
        "operationId": "getLatestCommand",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceCommandStatus"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands/pending": {
      "get": {
        "operationId": "listPendingCommands",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "createdAfter",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "createdBefore",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TerminalDeviceCommandStatus"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands/summary": {
      "get": {
        "operationId": "getCommandSummary",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceCommandSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands/{commandId}": {
      "get": {
        "operationId": "getCommandTerminalDevices",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "commandId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceCommandStatus"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/commands/{commandId}/result": {
      "post": {
        "operationId": "reportCommandResult",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "commandId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalDeviceCommandResultRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceCommandStatus"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/heartbeat": {
      "post": {
        "operationId": "heartbeat",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalDeviceHeartbeatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceHeartbeatResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/notifications": {
      "get": {
        "operationId": "listNotifications",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unreadOnly",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TerminalDeviceNotification"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/notifications/{notificationId}/ack": {
      "post": {
        "operationId": "acknowledgeNotification",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "notificationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalDeviceNotification"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{locationId}/terminal-devices/{deviceId}/payment-device-identity": {
      "get": {
        "operationId": "getPaymentDeviceIdentity",
        "parameters": [
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDeviceIdentity"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TerminalDevices"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{merchantId}": {
      "get": {
        "description": "Retrieves a specific merchant",
        "operationId": "getLocations",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "Merchant retrieved successfully"
          },
          "404": {
            "description": "Merchant not found"
          }
        },
        "summary": "Get merchant",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates an existing merchant",
        "operationId": "updateLocations",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "Merchant updated successfully"
          },
          "404": {
            "description": "Merchant not found"
          }
        },
        "summary": "Update merchant",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Tombstones a location while preserving transaction history",
        "operationId": "deleteLocations",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Location deleted successfully"
          },
          "404": {
            "description": "Location not found"
          }
        },
        "summary": "Delete location",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{merchantId}/devices/{deviceId}/nexgo/manual-credential-package": {
      "get": {
        "description": "Retrieves copyable device credential parameters when remote provisioning is unavailable",
        "operationId": "getNexgoManualCredentialPackage",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NexgoManualCredentialPackageResponse"
                }
              }
            },
            "description": "Manual device credential package retrieved successfully"
          },
          "404": {
            "description": "Merchant credential not found"
          }
        },
        "summary": "Get manual device credential package",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "transit:password:read"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{merchantId}/logo": {
      "post": {
        "operationId": "uploadLogo",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Upload merchant logo",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      }
    },
    "/api/v1/locations/{merchantId}/status": {
      "patch": {
        "description": "Updates merchant status",
        "operationId": "updateStatus",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "Merchant status updated successfully"
          },
          "404": {
            "description": "Merchant not found"
          }
        },
        "summary": "Update merchant status",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:write"
            ]
          }
        ]
      }
    },
    "/api/v1/me": {
      "get": {
        "description": "Retrieves the current authenticated user's profile",
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            },
            "description": "User profile retrieved successfully"
          },
          "401": {
            "description": "Authentication required"
          }
        },
        "summary": "Get current user",
        "tags": [
          "Me"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/me/resend-verification-email": {
      "post": {
        "description": "Re-sends the Firebase email-verification link to the current authenticated merchant/agent portal user, so an unverified account can self-cure and clear the EMAIL_VERIFICATION_REQUIRED gate on sensitive operations (#1576).",
        "operationId": "resendVerificationEmail",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationResendResponse"
                }
              }
            },
            "description": "Verification email sent (or account already verified)"
          },
          "401": {
            "description": "Authentication required"
          }
        },
        "summary": "Resend email verification",
        "tags": [
          "Me"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/merchant/event-subscriptions": {
      "get": {
        "operationId": "listForMerchantEventSubscriptions",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MerchantEventSubscription"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List event subscriptions for the caller's organization",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createForMerchant",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantEventSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantEventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Create event subscription for the caller's organization",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchant/event-subscriptions/{subscriptionId}": {
      "get": {
        "operationId": "getForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantEventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantEventSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantEventSubscription"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchant/event-subscriptions/{subscriptionId}/test": {
      "post": {
        "operationId": "testForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscriptionTestDeliveryResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Queue a nonfinancial test event for the caller's subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/config": {
      "get": {
        "operationId": "getMerchantConfig",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantSelfServiceConfig"
                }
              }
            },
            "description": "Configuration retrieved successfully"
          }
        },
        "summary": "Get merchant self-service config",
        "tags": [
          "MerchantConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateMerchantConfig",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMerchantSelfServiceConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantSelfServiceConfig"
                }
              }
            },
            "description": "Configuration updated successfully"
          }
        },
        "summary": "Update merchant self-service config",
        "tags": [
          "MerchantConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/config/payment-method-support": {
      "get": {
        "operationId": "getPaymentMethodSupport",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantPaymentMethodSupport"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "MerchantConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/dunning-cases": {
      "get": {
        "description": "Lists persisted dunning cases for a merchant",
        "operationId": "listCasesForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Dunning cases retrieved successfully"
          }
        },
        "summary": "List dunning cases",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/dunning-cases/{caseId}": {
      "get": {
        "description": "Retrieves a single dunning case and its event timeline",
        "operationId": "getCaseForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Dunning case retrieved successfully"
          }
        },
        "summary": "Get dunning case",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/dunning-cases/{caseId}/decision-timeline": {
      "get": {
        "description": "Resolves the case's server-supplied recurring billing selector and forwards its sanitized decision timeline",
        "operationId": "getDecisionTimelineForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Decision timeline retrieved successfully"
          },
          "404": {
            "description": "Dunning case or recurring billing attempt not found"
          }
        },
        "summary": "Get dunning decision timeline",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/dunning-cases/{caseId}/send-link": {
      "post": {
        "description": "Issues a hosted update-payment recovery link for the case's subscription and emails/texts it to the customer",
        "operationId": "sendLinkForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendDunningLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningCaseSendLinkResult"
                }
              }
            },
            "description": "Send attempted; response reports whether/how the customer was notified"
          },
          "404": {
            "description": "Dunning case not found"
          }
        },
        "summary": "Send update-payment link",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "recovery:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/dunning-config": {
      "get": {
        "description": "Retrieves dunning configuration for a merchant",
        "operationId": "getDunningConfig",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Dunning configuration retrieved successfully"
          }
        },
        "summary": "Get dunning config",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Creates or updates dunning configuration for a merchant",
        "operationId": "upsertDunningConfig",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertDunningConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Dunning configuration saved successfully"
          }
        },
        "summary": "Upsert dunning config",
        "tags": [
          "Dunning"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards": {
      "get": {
        "description": "Lists organization-scoped gift cards for the current merchant context",
        "operationId": "listForMerchantGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedAtLocationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedToCustomerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCard"
                }
              }
            },
            "description": "Gift cards retrieved successfully"
          }
        },
        "summary": "List gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Issues a new gift card within the current organization",
        "operationId": "issueForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Gateway-One-Wire",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardIssueResponse"
                }
              }
            },
            "description": "Gift card issued successfully"
          }
        },
        "summary": "Issue gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/bulk-import": {
      "post": {
        "description": "Streams NDJSON: one JSON object per imported card row",
        "operationId": "bulkImportForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportGiftCardLine"
                }
              }
            },
            "description": "Bulk import stream started"
          }
        },
        "summary": "Bulk-import gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/bulk-issue": {
      "post": {
        "description": "Streams NDJSON: one JSON object per issued card",
        "operationId": "bulkIssueForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkIssueGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/BulkIssueGiftCardLine"
                }
              }
            },
            "description": "Bulk issuance stream started"
          }
        },
        "summary": "Bulk-issue gift cards",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/config": {
      "get": {
        "description": "Returns the per-Organization gift card config",
        "operationId": "getConfigForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "Config retrieved successfully"
          }
        },
        "summary": "Get gift card config",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates the per-Organization gift card config",
        "operationId": "updateConfigForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardConfig"
                }
              }
            },
            "description": "Config updated successfully"
          }
        },
        "summary": "Update gift card config",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/config/location-restrictions": {
      "get": {
        "description": "Returns per-location redemption restrictions for the organization",
        "operationId": "listLocationRestrictionsForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Location restrictions retrieved successfully"
          }
        },
        "summary": "List gift card location restrictions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Replaces the organization restriction grid for gift-card redemption",
        "operationId": "updateLocationRestrictionsForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGiftCardLocationRestrictionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GiftCardLocationRestriction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Location restrictions updated successfully"
          }
        },
        "summary": "Update gift card location restrictions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/liability": {
      "get": {
        "description": "Retrieves organization-level gift card liability metrics",
        "operationId": "liabilitySummaryForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardLiabilitySummary"
                }
              }
            },
            "description": "Liability summary retrieved successfully"
          }
        },
        "summary": "Gift card liability summary",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/lookup": {
      "post": {
        "description": "Looks up a gift card by card number and optional PIN",
        "operationId": "lookupForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card retrieved successfully"
          }
        },
        "summary": "Lookup gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/adjust": {
      "post": {
        "description": "Applies a platform-admin balance adjustment with required reason",
        "operationId": "adjustForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card adjusted successfully"
          }
        },
        "summary": "Adjust gift card balance",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/mark-lost": {
      "post": {
        "description": "Marks a card as lost while preserving its balance for later restoration",
        "operationId": "markLostForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card marked lost successfully"
          }
        },
        "summary": "Mark gift card as lost",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/redemptions": {
      "post": {
        "description": "Redeems funds from a gift card for an in-store or POS transaction",
        "operationId": "redeemGiftCardGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantGiftCardRedemptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Gift card redeemed successfully"
          }
        },
        "summary": "Redeem gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/restore-lost": {
      "post": {
        "description": "Returns a LOST card to ACTIVE so it can be redeemed again",
        "operationId": "restoreLostForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreLostGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card restored successfully"
          }
        },
        "summary": "Restore gift card from lost",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/revoke": {
      "post": {
        "description": "Revokes a gift card; the balance is zeroed and the card becomes terminal",
        "operationId": "revokeForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCard"
                }
              }
            },
            "description": "Gift card revoked successfully"
          }
        },
        "summary": "Revoke gift card",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/gift-cards/{giftCardId}/transactions": {
      "get": {
        "description": "Returns the paginated ledger for a single gift card",
        "operationId": "listTransactionsForMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "giftCardId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCardTransaction"
                }
              }
            },
            "description": "Gift card transactions retrieved successfully"
          }
        },
        "summary": "List gift card transactions",
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/products/{productId}/images": {
      "get": {
        "operationId": "listImages",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProductImage"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List product images",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "uploadImage",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "altText",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductImage"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Upload product image",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/products/{productId}/images/{imageId}": {
      "delete": {
        "operationId": "deleteImage",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "imageId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Delete product image",
        "tags": [
          "ProductImages"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/merchants/{merchantId}/subscription-schedules": {
      "get": {
        "description": "Lists subscription schedules for a merchant",
        "operationId": "listSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Subscription schedules retrieved successfully"
          }
        },
        "summary": "List subscription schedules",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations": {
      "get": {
        "operationId": "listOrganizationsGet",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOrganization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createOrganizations",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/subtree-presence": {
      "get": {
        "operationId": "getSubtreePresence",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSubtreePresence"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/timezone-preview": {
      "post": {
        "operationId": "previewTimeZone",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationTimeZonePreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationTimeZonePreviewResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/tax-configs": {
      "get": {
        "operationId": "listByOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "jurisdiction_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TaxConfigRow"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaxConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxConfigRow"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/tax-configs/{id}": {
      "patch": {
        "operationId": "updateForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaxConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxConfigRow"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/tax-settings": {
      "get": {
        "operationId": "getTaxSettingsForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationTaxSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateTaxSettingsForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationTaxSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationTaxSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}": {
      "get": {
        "operationId": "getOrganizations",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateOrganizations",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteOrganizations",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Offboarding-Operation-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:delete"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/apps/{appId}": {
      "get": {
        "operationId": "getOrganizationAppGrant",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "appId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppAuthorizationGrantResponse",
                  "nullable": true
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "setOrganizationAppGrant",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "appId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppAuthorizationGrantResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/audit-log": {
      "get": {
        "description": "Searches verified audit logs scoped to an authorized organization or location using an opaque HMAC cursor",
        "operationId": "listMerchant",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "resourceType",
            "required": false,
            "schema": {
              "maxLength": 30,
              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 2048,
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantAuditLogPage"
                }
              }
            },
            "description": "Merchant audit logs retrieved successfully"
          },
          "400": {
            "description": "Invalid filters or merchant audit cursor"
          },
          "403": {
            "description": "Organization or location audit access denied"
          }
        },
        "summary": "List merchant audit logs",
        "tags": [
          "AuditLog"
        ],
        "security": [
          {
            "OAuth2": [
              "merchant-audit:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/bank-account": {
      "get": {
        "operationId": "getBillingBankAccount",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantBillingBankAccount"
                }
              }
            },
            "description": "Billing bank account retrieved successfully"
          }
        },
        "summary": "Get billing bank account",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/feature-entitlements": {
      "get": {
        "operationId": "listFeatureEntitlements",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OrganizationFeatureEntitlement"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "BillingFeatureEntitlements"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/fee-invoices": {
      "get": {
        "description": "Returns the organization's gateway processing-fee invoices/statements",
        "operationId": "listFeeInvoices",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MerchantFeeInvoice"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Invoices retrieved successfully"
          }
        },
        "summary": "List fee invoices",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/fee-invoices/export": {
      "get": {
        "description": "Downloads an inclusive organization fee-invoice period range as a raw text/csv attachment",
        "operationId": "exportFeeInvoices",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Invoice CSV exported successfully"
          }
        },
        "summary": "Export fee invoices",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/fee-invoices/{invoiceId}": {
      "get": {
        "description": "Returns one organization fee invoice with feature lines and collection history",
        "operationId": "getFeeInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invoiceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantFeeInvoice"
                }
              }
            },
            "description": "Invoice retrieved successfully"
          }
        },
        "summary": "Get fee invoice detail",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/fee-invoices/{invoiceId}/export": {
      "get": {
        "description": "Downloads one organization fee invoice as a raw text/csv attachment",
        "operationId": "exportFeeInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invoiceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Invoice CSV exported successfully"
          }
        },
        "summary": "Export one fee invoice",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/billing/rate-schedule": {
      "get": {
        "description": "Returns the organization's gateway processing-fee sell rate schedule",
        "operationId": "getRateSchedule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantRateSchedule"
                }
              }
            },
            "description": "Rate schedule retrieved successfully"
          }
        },
        "summary": "Get rate schedule",
        "tags": [
          "MerchantBilling"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-cases": {
      "get": {
        "operationId": "listChargebackCases",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackCasePage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackCases"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-cases/{caseId}": {
      "get": {
        "operationId": "getChargebackCases",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackCase"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackCases"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-cases/{caseId}/actions": {
      "post": {
        "operationId": "decideChargebackCases",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargebackCaseCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackCase"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackCases"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-cases/{caseId}/events": {
      "get": {
        "operationId": "events",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackCaseEventPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackCases"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-quarantine": {
      "get": {
        "operationId": "listChargebackReview",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "OPEN",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackQuarantinePage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackReview"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-quarantine/{caseId}": {
      "get": {
        "operationId": "getChargebackReview",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackQuarantineCase"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChargebackReview"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/chargeback-quarantine/{caseId}/actions": {
      "post": {
        "operationId": "decideChargebackReview",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargebackQuarantineAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargebackQuarantineCase"
                }
              }
            },
            "description": "Operator command admitted and audited; occurrence attribution remains durably pending and the case is OPEN"
          }
        },
        "tags": [
          "ChargebackReview"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles": {
      "get": {
        "operationId": "listCredentialProfiles",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CredentialProfileStatus"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CredentialProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCredentialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}": {
      "patch": {
        "operationId": "updateCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCredentialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Offboarding-Operation-Id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/deactivate": {
      "post": {
        "operationId": "deactivateCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/limit": {
      "put": {
        "operationId": "upsertCredentialProfileLimit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertCredentialProfileLimitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfileLimit"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/refresh-routing-scope": {
      "post": {
        "operationId": "refreshRoutingScope",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshCredentialProfileRoutingScopeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshCredentialProfileRoutingScopeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/rotate": {
      "post": {
        "operationId": "rotateCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateCredentialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/set-default": {
      "post": {
        "operationId": "setDefaultCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/set-default-if-unset": {
      "post": {
        "operationId": "setDefaultCredentialProfileIfUnset",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/transfer": {
      "post": {
        "operationId": "transferCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/verify-existing": {
      "post": {
        "operationId": "verifyExistingCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCredentialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/credential-profiles/{credentialProfileId}/volume-limit": {
      "get": {
        "operationId": "getCredentialProfileVolumeLimit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeLimitStatus"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/default-credential-profile": {
      "delete": {
        "operationId": "clearDefaultCredentialProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/default-location": {
      "delete": {
        "operationId": "clearDefaultLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/device-class-entitlements": {
      "get": {
        "operationId": "listDeviceClassEntitlements",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceClassEntitlement"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/external-capabilities": {
      "get": {
        "operationId": "listForOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExternalCapabilityState"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ExternalCapabilities"
        ],
        "security": [
          {
            "OAuth2": [
              "external-capabilities:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-approval-rate-protection": {
      "get": {
        "operationId": "getFraudApprovalRateProtection",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudApprovalRateProtection"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudApprovalRateProtection"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateFraudApprovalRateProtection",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudApprovalRateProtectionUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudApprovalRateProtection"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudApprovalRateProtection"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-approval-rate-protection/history": {
      "get": {
        "operationId": "historyFraudApprovalRateProtection",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudApprovalRateProtectionHistoryPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudApprovalRateProtection"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-approval-rate-protection/restore": {
      "post": {
        "operationId": "restoreFraudApprovalRateProtection",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudApprovalRateProtectionRestoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudApprovalRateProtection"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudApprovalRateProtection"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-audit-log": {
      "get": {
        "description": "Searches fraud audit logs scoped to an authorized organization using an opaque, snapshot-bound cursor",
        "operationId": "listFraud",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "resourceType",
            "required": false,
            "schema": {
              "maxLength": 30,
              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 2048,
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudAuditLogPage"
                }
              }
            },
            "description": "Organization fraud audit logs retrieved successfully"
          },
          "400": {
            "description": "Invalid or mismatched fraud audit cursor"
          },
          "403": {
            "description": "Organization or audit access denied"
          }
        },
        "summary": "List organization fraud audit logs",
        "tags": [
          "AuditLog"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-audit:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions": {
      "get": {
        "operationId": "listFraudDecisions",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudDisposition"
            }
          },
          {
            "in": "query",
            "name": "evaluatedFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ruleId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "[A-Za-z0-9_.:-]+",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ruleVersion",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "ruleMatchMode",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudRuleMatchMode"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "signalType",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudSignalType"
            }
          },
          {
            "in": "query",
            "name": "signalAvailability",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudEvidenceAvailability"
            }
          },
          {
            "in": "query",
            "name": "engineVersion",
            "required": false,
            "schema": {
              "maxLength": 64,
              "pattern": "[A-Za-z0-9_.:-]+",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "policyVersion",
            "required": false,
            "schema": {
              "maxLength": 64,
              "pattern": "[A-Za-z0-9_.:-]+",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 256,
              "pattern": "[A-Za-z0-9 _.:/-]+",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 2048,
              "pattern": "[A-Za-z0-9_=.-]+",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "transactionId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unconfirmedReversal",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudDecisionPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/card-present-integrity-summary": {
      "get": {
        "operationId": "cardPresentIntegritySummary",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "windowDays",
            "required": false,
            "schema": {
              "default": 30,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardPresentIntegritySummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/evidence-summary": {
      "get": {
        "operationId": "evidenceSummary",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "windowDays",
            "required": false,
            "schema": {
              "default": 30,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudEvidenceSummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/overview": {
      "get": {
        "operationId": "overview",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudOverview"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/recent": {
      "get": {
        "operationId": "recent",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRecentDecisionsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/top-rules": {
      "get": {
        "operationId": "topRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "evaluatedTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudTopRulesResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/transactions/{transactionId}/card-present-integrity": {
      "get": {
        "operationId": "cardPresentIntegrityEvidence",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardPresentIntegrityEvidence"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/transactions/{transactionId}/evidence": {
      "get": {
        "operationId": "transactionEvidence",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudTransactionEvidence"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/{decisionId}": {
      "get": {
        "operationId": "getFraudDecisions",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "decisionId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudDecisionDetail"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-decisions/{decisionId}/related-activity": {
      "get": {
        "operationId": "relatedActivity",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "decisionId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRelatedActivity"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudDecisions"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-review-cases": {
      "get": {
        "operationId": "listFraudReviewCases",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudReviewStatus"
            }
          },
          {
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudReviewDisposition"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minimumAgeSeconds",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "maximumAgeSeconds",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-review-cases/{caseId}": {
      "get": {
        "operationId": "getFraudReviewCases",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewCaseDetail"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-review-cases/{caseId}/actions": {
      "post": {
        "operationId": "performAction",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudReviewActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewActionResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:decide"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-review-cases/{caseId}/clear-and-capture": {
      "get": {
        "operationId": "currentCaptureCommand",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewCaptureResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "clearAndCapture",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudReviewCaptureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewCaptureResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:decide"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-review-cases/{caseId}/clear-and-capture/{commandKey}": {
      "get": {
        "operationId": "captureCommandStatus",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "commandKey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudReviewCaptureResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudReviewCases"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules": {
      "get": {
        "operationId": "listFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scopeType",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudRuleScopeType"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "enabled",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRulePage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/effective": {
      "get": {
        "operationId": "effective",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scopeType",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudRuleScopeType"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "enabled",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRulePage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/packs/high-risk-retail-v1": {
      "post": {
        "operationId": "applyHighRiskRetailPack",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRulePack"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}": {
      "get": {
        "operationId": "getFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleMutationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}/disable": {
      "post": {
        "operationId": "disableFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleMutationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}/enable": {
      "post": {
        "operationId": "enable",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleMutationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}/history": {
      "get": {
        "operationId": "historyFraudRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRulePage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}/reset-override": {
      "post": {
        "operationId": "resetOverride",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "processorProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudRuleMutationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud-rules/{ruleId}/versions/{version}": {
      "get": {
        "operationId": "version",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudRule"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudRules"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/card-history": {
      "post": {
        "operationId": "queryCardHistory",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardHistoryQueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardHistoryResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudHistory"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-decisions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/list-entries": {
      "get": {
        "operationId": "listFraudLists",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudListKind"
            }
          },
          {
            "in": "query",
            "name": "valueType",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudListValueType"
            }
          },
          {
            "in": "query",
            "name": "effectiveStatus",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FraudListEffectiveStatus"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createFraudLists",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudListCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListEntry"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/list-entries/bulk": {
      "post": {
        "operationId": "bulkCreate",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudListBulkCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListBulkResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/list-entries/match": {
      "post": {
        "operationId": "match",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudListMatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListMatchResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/list-entries/{entryId}": {
      "get": {
        "operationId": "getFraudLists",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entryId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListEntry"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:read"
            ]
          }
        ]
      },
      "patch": {
        "operationId": "updateFraudLists",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entryId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudListUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListEntry"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/fraud/list-entries/{entryId}/disable": {
      "post": {
        "operationId": "disableFraudLists",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entryId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudListDisableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudListEntry"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "FraudLists"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-lists:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards": {
      "get": {
        "operationId": "listGiftCards",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedAtLocationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "issuedToCustomerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseGiftCard"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards/liability": {
      "get": {
        "operationId": "liabilitySummary",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardLiabilitySummary"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards/reports/breakage": {
      "get": {
        "operationId": "breakageReport",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "default": "DAY",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardActivityReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards/reports/breakage.csv": {
      "get": {
        "operationId": "breakageReportCsv",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "default": "DAY",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards/reports/redemptions": {
      "get": {
        "operationId": "redemptionReport",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "default": "DAY",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardActivityReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gift-cards/reports/redemptions.csv": {
      "get": {
        "operationId": "redemptionReportCsv",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "default": "DAY",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "GiftCards"
        ],
        "security": [
          {
            "OAuth2": [
              "gift_cards:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations": {
      "get": {
        "operationId": "listLocations",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Location"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/by-external-id": {
      "get": {
        "operationId": "getLocationByExternalId",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "externalId",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/online/provision": {
      "post": {
        "operationId": "provisionOnlineLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}": {
      "get": {
        "operationId": "getLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteLocation",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Offboarding-Operation-Id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "organizations:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/ach-prenotes": {
      "post": {
        "description": "Submits a location-scoped ACH prenote without returning account or routing data.",
        "operationId": "createAchPrenotes",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AchPrenoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AchPrenoteResponse"
                }
              }
            },
            "description": "Canonical ACH prenote response"
          }
        },
        "summary": "Submit an ACH prenote",
        "tags": [
          "AchPrenotes"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/processor-routes": {
      "get": {
        "operationId": "listLocationProcessorRoutes",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LocationProcessorRoute"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/processor-routes/card-present/onboarding-reconcile": {
      "post": {
        "operationId": "reconcileOnboardingCardPresentProfile",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconcileOnboardingCardPresentProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationProcessorRoute"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/processor-routes/target-profiles": {
      "get": {
        "operationId": "listLocationProcessorRouteTargets",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paymentUseCase",
            "required": true,
            "schema": {
              "maxLength": 20,
              "pattern": "CARD_NOT_PRESENT|ACH",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LocationProcessorRouteTargetProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/processor-routes/{useCase}": {
      "put": {
        "operationId": "upsertLocationProcessorRoute",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "useCase",
            "required": true,
            "schema": {
              "maxLength": 20,
              "pattern": "[A-Za-z_]+",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertLocationProcessorRouteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationProcessorRoute"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteLocationProcessorRoute",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "useCase",
            "required": true,
            "schema": {
              "maxLength": 20,
              "pattern": "[A-Za-z_]+",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Offboarding-Operation-Id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locations/{locationId}/surcharge-disclosure": {
      "get": {
        "operationId": "getLocationSurchargeDisclosure",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationSurchargeDisclosure"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "credential-profiles:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/mid-utilization": {
      "get": {
        "description": "Per-credential-profile utilization, canonical headroom, projected run-rate, freshness, and reset time",
        "operationId": "getMidUtilization",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MidUtilization"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Utilization report retrieved successfully"
          }
        },
        "summary": "Get MID utilization report",
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/owner-history-baseline": {
      "post": {
        "operationId": "attestOwnerHistoryBaseline",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttestOrganizationOwnerHistoryBaselineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationOwnerHistoryBaselineReceipt"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "agents:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/payment-acceptance-policy": {
      "get": {
        "operationId": "getPolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectivePaymentAcceptancePolicy"
                }
              }
            },
            "description": "Payment acceptance policy retrieved successfully"
          }
        },
        "summary": "Get effective payment acceptance policy",
        "tags": [
          "PaymentPolicies"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updatePolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentAcceptancePolicyCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAcceptancePolicyCommandResponse"
                }
              }
            },
            "description": "Payment acceptance policy updated successfully"
          }
        },
        "summary": "Update one payment acceptance preference",
        "tags": [
          "PaymentPolicies"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/rate-card-assignment": {
      "put": {
        "operationId": "assignOrganizationRateCard",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignOrganizationRateCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRateCardResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "clearOrganizationRateCard",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "agent-rates:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/recommendations/mid-limits": {
      "get": {
        "operationId": "midLimits",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/recommendations/reserve-rule": {
      "get": {
        "operationId": "reserveRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "maxLength": 3,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/credential-profiles/{credentialProfileId}/adjustments": {
      "post": {
        "description": "Appends an authorized reserve adjustment",
        "operationId": "adjustReserve",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveControlCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveControlResult"
                }
              }
            },
            "description": "Reserve adjustment result"
          }
        },
        "summary": "Adjust a reserve balance",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/credential-profiles/{credentialProfileId}/manual-releases": {
      "post": {
        "description": "Appends an authorized manual reserve release",
        "operationId": "releaseReserve",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveControlCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveControlResult"
                }
              }
            },
            "description": "Reserve release result"
          }
        },
        "summary": "Manually release reserve",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/ledger": {
      "get": {
        "description": "Lists append-only reserve_ledger entries for an organization or an authorized location",
        "operationId": "listLedger",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "credentialProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReserveLedgerEntry"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Reserve ledger entries"
          }
        },
        "summary": "List reserve ledger entries",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/rules": {
      "get": {
        "description": "Lists reserve rules for an organization",
        "operationId": "listRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReserveRule"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Reserve rules"
          }
        },
        "summary": "List reserve rules",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates an attributed, versioned reserve rule",
        "operationId": "createRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReserveRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveRuleCommandResult"
                }
              }
            },
            "description": "Reserve rule command result"
          }
        },
        "summary": "Create a reserve rule",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/rules/{ruleId}/disable": {
      "post": {
        "description": "Disables an ACTIVE reserve rule with optimistic concurrency",
        "operationId": "disableRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveRuleCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveRuleCommandResult"
                }
              }
            },
            "description": "Reserve rule command result"
          }
        },
        "summary": "Disable a reserve rule",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/rules/{ruleId}/history": {
      "get": {
        "description": "Lists immutable attributed revisions for one organization-owned rule",
        "operationId": "ruleHistory",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReserveRuleRevision"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Reserve rule revisions"
          }
        },
        "summary": "Reserve rule history",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/rules/{ruleId}/restore": {
      "post": {
        "description": "Restores the exact policy snapshot from a prior ACTIVE revision",
        "operationId": "restoreRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreReserveRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveRuleCommandResult"
                }
              }
            },
            "description": "Reserve rule command result"
          }
        },
        "summary": "Restore a reserve rule revision",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/summaries": {
      "get": {
        "description": "Current balance + forecast + routing control for the organization scope or an authorized location",
        "operationId": "summaries",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "default": "USD",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReserveScopeSummary"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Reserve scope summaries"
          }
        },
        "summary": "Reserve scope summaries",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/reserve/summary": {
      "get": {
        "description": "Current balance + forecast for an organization or an authorized location",
        "operationId": "summary",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "credentialProfileId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "default": "USD",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReserveSummary"
                }
              }
            },
            "description": "Reserve summary"
          }
        },
        "summary": "Reserve summary",
        "tags": [
          "Reserve"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-alerts": {
      "get": {
        "operationId": "listOrganizationRiskAlerts",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "maxLength": 20,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "alertType",
            "required": false,
            "schema": {
              "maxLength": 40,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List risk alerts for an organization",
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reserves:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-control/credential-profiles/{credentialProfileId}": {
      "get": {
        "operationId": "getRiskControl",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskControl"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RiskControl"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-control/credential-profiles/{credentialProfileId}/history": {
      "get": {
        "operationId": "historyRiskControl",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RiskControlAction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RiskControl"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-control/credential-profiles/{credentialProfileId}/lock": {
      "post": {
        "operationId": "lock",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskControlWriteCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskControlAction"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RiskControl"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-control/credential-profiles/{credentialProfileId}/risk-range": {
      "post": {
        "operationId": "updateRiskRange",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskRangeChangeCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskControlAction"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RiskControl"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/risk-control/credential-profiles/{credentialProfileId}/unlock": {
      "post": {
        "operationId": "unlock",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskControlWriteCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskControlAction"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RiskControl"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/routing-health/credential-profiles/{credentialProfileId}": {
      "get": {
        "description": "Returns only this organization's profile control view; shared account and pair evidence is not exposed.",
        "operationId": "getProfileControlView",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingHealthProfileControlView"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get credential-profile routing health",
        "tags": [
          "RoutingHealth"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/routing-health/credential-profiles/{credentialProfileId}/controls": {
      "post": {
        "description": "Records a tenant-local profile action. REQUEST_BOUNDED_PROBE records a request for a future otherwise-eligible real dispatch and does not call a provider.",
        "operationId": "applyProfileControl",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingHealthControlProxyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingHealthControlResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Apply credential-profile routing-health control",
        "tags": [
          "RoutingHealth"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/smart-routing/report": {
      "get": {
        "operationId": "report",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "timelineCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartRoutingReportResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/transactions/{transactionId}/decline-fraud-held": {
      "post": {
        "operationId": "decline",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudHeldDeclineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FraudHeldDeclineResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "OAuth2": [
              "fraud-reviews:decide"
            ]
          }
        ]
      }
    },
    "/api/v1/portal-sign-in/device-trust/csrf": {
      "get": {
        "description": "Get the CSRF token and header name required for browser trust requests.",
        "operationId": "csrf",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [],
        "summary": "Get a browser trust request token",
        "tags": [
          "PortalSignIn"
        ]
      }
    },
    "/api/v1/portal-sign-in/device-trust/exchange": {
      "post": {
        "description": "Exchange a sign-in proof and a valid browser trust cookie for a sign-in token.",
        "operationId": "exchange",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalDeviceTrustExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalDeviceTrustExchangeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [],
        "summary": "Sign in with a trusted browser",
        "tags": [
          "PortalSignIn"
        ]
      }
    },
    "/api/v1/portal-sign-in/device-trust/issue": {
      "post": {
        "description": "After signing in, set a secure browser trust cookie for the current user.",
        "operationId": "issuePortalSignIn",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Trust this browser",
        "tags": [
          "PortalSignIn"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/portal-sign-in/device-trust/revoke-everywhere": {
      "post": {
        "description": "Revoke all trusted browsers for the current user and clear this browser's trust cookie.",
        "operationId": "revokePortalSignIn",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Revoke browser trust",
        "tags": [
          "PortalSignIn"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/portal-sign-in/lock-status": {
      "post": {
        "operationId": "lockStatus",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalLockStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalLockStateResponse"
                }
              }
            },
            "description": "Account not locked"
          },
          "423": {
            "description": "Account locked"
          }
        },
        "security": [],
        "summary": "Read portal sign-in lock state",
        "tags": [
          "PortalSignIn"
        ]
      }
    },
    "/api/v1/portal-sign-in/mfa-failures": {
      "post": {
        "operationId": "recordMfaFailure",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalMfaFailureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalLockStateResponse"
                }
              }
            },
            "description": "Failure counted; account not locked"
          },
          "400": {
            "description": "Invalid Google sign-in proof or unsupported tenant"
          },
          "423": {
            "description": "Account locked"
          }
        },
        "security": [],
        "summary": "Record a failed second factor",
        "tags": [
          "PortalSignIn"
        ]
      }
    },
    "/api/v1/portal-sign-in/success": {
      "post": {
        "operationId": "recordSuccess",
        "responses": {
          "204": {
            "description": "Counter reset"
          }
        },
        "summary": "Reset the failed second-factor counter after a completed sign-in",
        "tags": [
          "PortalSignIn"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/portal/balance": {
      "get": {
        "operationId": "getBalance",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Balance retrieved"
          }
        },
        "summary": "Get customer balance",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/balance/transactions": {
      "get": {
        "operationId": "listBalanceTransactions",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Balance transactions retrieved"
          }
        },
        "summary": "List customer balance transactions",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/card-entry-config": {
      "get": {
        "operationId": "cardEntryConfig",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntryConfigResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Read the authorized portal location's card-entry presentation without creating a session",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/credit-notes": {
      "get": {
        "operationId": "listCreditNotes",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Credit notes retrieved"
          }
        },
        "summary": "List customer credit notes",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/customer-contacts/{contactId}/accept": {
      "post": {
        "operationId": "acceptCustomerContactInvite",
        "parameters": [
          {
            "in": "path",
            "name": "contactId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptCustomerContactInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalCustomerResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Accept an invitation with the recipient's verified customer account",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          }
        ]
      }
    },
    "/api/v1/portal/payment-methods": {
      "get": {
        "operationId": "paymentMethods",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeExpired",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PortalPaymentMethod"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Payment methods retrieved"
          }
        },
        "summary": "List payment methods",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/payment-methods/{paymentMethodId}": {
      "delete": {
        "operationId": "removePaymentMethod",
        "parameters": [
          {
            "in": "path",
            "name": "paymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment method removed"
          }
        },
        "summary": "Remove a payment method",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/payment-methods/{paymentMethodId}/default": {
      "post": {
        "operationId": "setDefaultPaymentMethodPortal",
        "parameters": [
          {
            "in": "path",
            "name": "paymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default payment method updated"
          }
        },
        "summary": "Set default payment method",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/profile": {
      "get": {
        "operationId": "getProfile",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalProfile"
                }
              }
            },
            "description": "Profile retrieved"
          }
        },
        "summary": "Get customer profile",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateProfile",
        "parameters": [
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalProfile"
                }
              }
            },
            "description": "Profile updated"
          }
        },
        "summary": "Update customer profile",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/sessions": {
      "get": {
        "operationId": "sessions",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PortalSession"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Sessions retrieved"
          }
        },
        "summary": "List checkout sessions",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/sessions/{sessionId}/transaction": {
      "get": {
        "operationId": "getSessionTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalTransaction"
                }
              }
            },
            "description": "Transaction retrieved"
          }
        },
        "summary": "Get checkout transaction detail",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/setup-intents": {
      "post": {
        "operationId": "createSetupIntent",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalSetupIntent"
                }
              }
            },
            "description": "Setup intent created"
          }
        },
        "summary": "Create setup intent",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/setup-intents/{setupIntentId}/card-entry-session": {
      "post": {
        "operationId": "createCardEntrySession",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionCreateResponse"
                }
              }
            },
            "description": "Card-entry session created"
          }
        },
        "summary": "Create portal setup-intent card-entry session",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/setup-intents/{setupIntentId}/card-entry-session/{attemptId}": {
      "get": {
        "operationId": "getCardEntrySession",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionStatusResponse"
                }
              }
            },
            "description": "Card-entry session status"
          }
        },
        "summary": "Get portal setup-intent card-entry status",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/setup-intents/{setupIntentId}/card-entry-session/{attemptId}/cancel": {
      "post": {
        "operationId": "cancelCardEntrySession",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card-entry session canceled"
          }
        },
        "summary": "Cancel portal setup-intent card-entry session",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/setup-intents/{setupIntentId}/confirm": {
      "post": {
        "operationId": "confirmSetupIntent",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalConfirmSetupIntentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalPaymentMethod"
                }
              }
            },
            "description": "Setup intent confirmed"
          }
        },
        "summary": "Confirm setup intent",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscription-items/{subscriptionItemId}/usage-records": {
      "get": {
        "operationId": "listUsageRecords",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionItemId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Usage records retrieved"
          }
        },
        "summary": "List usage records for a subscription item",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions": {
      "get": {
        "operationId": "listSubscriptions",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Subscription"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Subscriptions retrieved"
          }
        },
        "summary": "List customer subscriptions",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/available-plans": {
      "get": {
        "operationId": "listAvailablePlans",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Prices retrieved"
          }
        },
        "summary": "List available prices for plan switching",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "operationId": "cancelSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription cancelled"
          }
        },
        "summary": "Cancel customer subscription",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/items/{itemId}": {
      "patch": {
        "operationId": "updateSubscriptionItemQuantity",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "itemId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemQuantityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionItemMutationResponse"
                }
              }
            },
            "description": "Subscription item quantity updated"
          }
        },
        "summary": "Update customer subscription item quantity",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/pause": {
      "post": {
        "operationId": "pauseSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PausePortalSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription paused"
          }
        },
        "summary": "Pause customer subscription",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/preview-plan-switch": {
      "post": {
        "operationId": "previewPlanSwitch",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalProrationPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProrationPreview"
                }
              }
            },
            "description": "Proration preview returned"
          }
        },
        "summary": "Preview plan switch proration",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/preview-proration": {
      "post": {
        "operationId": "previewProration",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalProrationPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProrationPreview"
                }
              }
            },
            "description": "Proration preview returned"
          }
        },
        "summary": "Preview subscription amount proration",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/resume": {
      "post": {
        "operationId": "resumeSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription resumed"
          }
        },
        "summary": "Resume customer subscription",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/portal/subscriptions/{subscriptionId}/switch-plan": {
      "post": {
        "operationId": "switchPlan",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Firebase-AppCheck",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalSwitchPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription plan switched"
          }
        },
        "summary": "Switch subscription plan",
        "tags": [
          "Portal"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "CustomerSession": [],
            "FirebaseAppCheck": []
          },
          {
            "CheckoutAccountCredential": [],
            "CheckoutSessionTokenAuth": []
          }
        ]
      }
    },
    "/api/v1/prices": {
      "get": {
        "description": "Lists price tiers for a merchant with optional pagination",
        "operationId": "listPrices",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "productId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subscriptionPlanOnly",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Price"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Prices retrieved successfully"
          }
        },
        "summary": "List prices",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:read",
              "products:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new price tier for a product",
        "operationId": "createPrices",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create price",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:write",
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/prices/by-product/{productId}": {
      "get": {
        "description": "Lists all price tiers for a specific product",
        "operationId": "listByProduct",
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Price"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Prices retrieved successfully"
          }
        },
        "summary": "List prices by product",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:read"
            ]
          }
        ]
      }
    },
    "/api/v1/prices/{priceId}": {
      "get": {
        "description": "Retrieves a specific price tier by ID",
        "operationId": "getPrices",
        "parameters": [
          {
            "in": "path",
            "name": "priceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price retrieved successfully"
          },
          "404": {
            "description": "Price not found"
          }
        },
        "summary": "Get price",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:read",
              "products:read"
            ]
          }
        ]
      },
      "patch": {
        "description": "Updates a price tier's descriptive metadata. Amount, currency, and interval are immutable.",
        "operationId": "updatePrices",
        "parameters": [
          {
            "in": "path",
            "name": "priceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price updated successfully"
          },
          "404": {
            "description": "Price not found"
          }
        },
        "summary": "Update price",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/prices/{priceId}/archive": {
      "post": {
        "description": "Archives a price tier (soft delete)",
        "operationId": "archivePrices",
        "parameters": [
          {
            "in": "path",
            "name": "priceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price archived successfully"
          },
          "404": {
            "description": "Price not found"
          }
        },
        "summary": "Archive price",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:write",
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/prices/{priceId}/replace": {
      "post": {
        "description": "Creates a new price with the requested amount and archives the existing price",
        "operationId": "replace",
        "parameters": [
          {
            "in": "path",
            "name": "priceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacePriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price replaced successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Price not found"
          }
        },
        "summary": "Replace price",
        "tags": [
          "Prices"
        ],
        "security": [
          {
            "OAuth2": [
              "prices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/products": {
      "get": {
        "description": "Lists products for a merchant with optional pagination",
        "operationId": "listProducts",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subscriptionPlanOnly",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "updatedSince",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "afterId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "itemKind",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProductItemKind"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Products retrieved successfully"
          }
        },
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new product for a merchant",
        "operationId": "createProducts",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create product",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/products/with-price": {
      "post": {
        "description": "Creates a product and its initial price atomically",
        "operationId": "createWithPrice",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductWithPriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductWithPrice"
                }
              }
            },
            "description": "Product and price created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create product with price",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/products/{productId}": {
      "get": {
        "description": "Retrieves a specific product by ID",
        "operationId": "getProducts",
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product retrieved successfully"
          },
          "404": {
            "description": "Product not found"
          }
        },
        "summary": "Get product",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read"
            ]
          }
        ]
      },
      "patch": {
        "description": "Updates an existing product",
        "operationId": "updateProducts",
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product updated successfully"
          },
          "404": {
            "description": "Product not found"
          }
        },
        "summary": "Update product",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/products/{productId}/archive": {
      "post": {
        "description": "Archives a product (soft delete)",
        "operationId": "archiveProducts",
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveProductRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product archived successfully"
          },
          "404": {
            "description": "Product not found"
          }
        },
        "summary": "Archive product",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write"
            ]
          }
        ]
      }
    },
    "/api/v1/promotion-codes": {
      "get": {
        "description": "Lists promotion codes for a merchant with optional pagination",
        "operationId": "listPromotionCodes",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PromotionCode"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Promotion codes retrieved successfully"
          }
        },
        "summary": "List promotion codes",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read",
              "promo-codes:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new promotion code for a merchant",
        "operationId": "createPromotionCodes",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePromotionCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionCode"
                }
              }
            },
            "description": "Promotion code created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create promotion code",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write",
              "promo-codes:write"
            ]
          }
        ]
      }
    },
    "/api/v1/promotion-codes/code/{code}": {
      "get": {
        "description": "Retrieves a promotion code by its code string",
        "operationId": "getByCode",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionCode"
                }
              }
            },
            "description": "Promotion code retrieved successfully"
          },
          "404": {
            "description": "Promotion code not found"
          }
        },
        "summary": "Get promotion code by code",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read",
              "promo-codes:read"
            ]
          }
        ]
      }
    },
    "/api/v1/promotion-codes/redeem": {
      "post": {
        "description": "Redeems a promotion code",
        "operationId": "redeemByCode",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coupon"
                }
              }
            },
            "description": "Promotion code redeemed successfully"
          },
          "404": {
            "description": "Promotion code not found"
          }
        },
        "summary": "Redeem promotion code",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write",
              "promo-codes:write"
            ]
          }
        ]
      }
    },
    "/api/v1/promotion-codes/{promotionCodeId}": {
      "get": {
        "description": "Retrieves a specific promotion code by ID",
        "operationId": "getPromotionCodes",
        "parameters": [
          {
            "in": "path",
            "name": "promotionCodeId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionCode"
                }
              }
            },
            "description": "Promotion code retrieved successfully"
          },
          "404": {
            "description": "Promotion code not found"
          }
        },
        "summary": "Get promotion code",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:read",
              "promo-codes:read"
            ]
          }
        ]
      }
    },
    "/api/v1/promotion-codes/{promotionCodeId}/archive": {
      "post": {
        "description": "Archives a promotion code (soft delete)",
        "operationId": "archivePromotionCodes",
        "parameters": [
          {
            "in": "path",
            "name": "promotionCodeId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionCode"
                }
              }
            },
            "description": "Promotion code archived successfully"
          },
          "404": {
            "description": "Promotion code not found"
          }
        },
        "summary": "Archive promotion code",
        "tags": [
          "PromotionCodes"
        ],
        "security": [
          {
            "OAuth2": [
              "products:write",
              "promo-codes:write"
            ]
          }
        ]
      }
    },
    "/api/v1/provisioning/jobs": {
      "get": {
        "description": "Lists provisioning jobs from merchant onboarding service",
        "operationId": "listProvisioning",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedProvisioningResponse"
                }
              }
            },
            "description": "Jobs retrieved successfully"
          }
        },
        "summary": "List provisioning jobs",
        "tags": [
          "Provisioning"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new provisioning job",
        "operationId": "createProvisioning",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProvisioningJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningJob"
                }
              }
            },
            "description": "Job created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create provisioning job",
        "tags": [
          "Provisioning"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/provisioning/jobs/{jobId}": {
      "get": {
        "description": "Gets a specific provisioning job from merchant onboarding service",
        "operationId": "getProvisioning",
        "parameters": [
          {
            "in": "path",
            "name": "jobId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningJob"
                }
              }
            },
            "description": "Job retrieved successfully"
          },
          "404": {
            "description": "Job not found"
          }
        },
        "summary": "Get provisioning job",
        "tags": [
          "Provisioning"
        ],
        "security": [
          {
            "OAuth2": [
              "merchants:read"
            ]
          }
        ]
      }
    },
    "/api/v1/provisioning/jobs/{jobId}/cancel": {
      "post": {
        "description": "Cancels a provisioning job",
        "operationId": "cancelProvisioning",
        "parameters": [
          {
            "in": "path",
            "name": "jobId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningJob"
                }
              }
            },
            "description": "Job cancelled successfully"
          },
          "404": {
            "description": "Job not found"
          }
        },
        "summary": "Cancel provisioning job",
        "tags": [
          "Provisioning"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/provisioning/jobs/{jobId}/retry": {
      "post": {
        "description": "Retries a failed provisioning job",
        "operationId": "retry",
        "parameters": [
          {
            "in": "path",
            "name": "jobId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningJob"
                }
              }
            },
            "description": "Job retry result returned"
          },
          "404": {
            "description": "Job not found"
          }
        },
        "summary": "Retry provisioning job",
        "tags": [
          "Provisioning"
        ],
        "security": [
          {
            "OAuth2": [
              "devices:write"
            ]
          }
        ]
      }
    },
    "/api/v1/public/gift-cards/balance": {
      "post": {
        "description": "Returns public gift-card balance details by card number.",
        "operationId": "publicBalance",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGiftCardBalance"
                }
              }
            },
            "description": "Gift card balance retrieved successfully"
          }
        },
        "security": [],
        "summary": "Lookup gift card balance",
        "tags": [
          "PayGiftCards"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/public/setup-intents/{setupIntentId}": {
      "get": {
        "description": "Returns the current SetupIntent state using the one-shot client secret",
        "operationId": "getWithSecret",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Setup-Intent-Client-Secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "embed_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "SetupIntent retrieved successfully"
          },
          "404": {
            "description": "SetupIntent not found"
          }
        },
        "security": [
          {
            "ClientSecretAuth": []
          }
        ],
        "summary": "Retrieve setup intent with client secret",
        "tags": [
          "SetupIntentConfirmation"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/public/setup-intents/{setupIntentId}/card-entry-session": {
      "post": {
        "description": "Creates a hosted card-entry session using only the setup intent's client secret. No raw card data is accepted or returned.",
        "operationId": "createPublicSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Setup-Intent-Client-Secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "embed_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionCreateResponse"
                }
              }
            },
            "description": "Card-entry session created"
          }
        },
        "security": [
          {
            "ClientSecretAuth": []
          }
        ],
        "summary": "Create public setup-intent card-entry session",
        "tags": [
          "PublicSetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/public/setup-intents/{setupIntentId}/card-entry-session/{attemptId}": {
      "get": {
        "description": "Returns provider-independent status using the setup intent's client secret",
        "operationId": "getPublicSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Setup-Intent-Client-Secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "embed_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionStatusResponse"
                }
              }
            },
            "description": "Card-entry session status"
          }
        },
        "security": [
          {
            "ClientSecretAuth": []
          }
        ],
        "summary": "Get public setup-intent card-entry session",
        "tags": [
          "PublicSetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/public/setup-intents/{setupIntentId}/card-entry-session/{attemptId}/cancel": {
      "post": {
        "description": "Cancels a hosted card-entry session using the setup intent's client secret",
        "operationId": "cancelPublicSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Setup-Intent-Client-Secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "embed_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card-entry session canceled"
          }
        },
        "security": [
          {
            "ClientSecretAuth": []
          }
        ],
        "summary": "Cancel public setup-intent card-entry session",
        "tags": [
          "PublicSetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/public/setup-intents/{setupIntentId}/confirm": {
      "post": {
        "description": "Confirms a setup intent using the one-shot client secret and exactly one credential representation. Raw and hosted card data are tokenized server-side; canonical token references are validated before use.",
        "operationId": "confirmPublicSetupIntent",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "embed_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmSetupIntentWithSecretRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "SetupIntent confirmed successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "SetupIntent not found"
          },
          "409": {
            "description": "Client secret already consumed"
          }
        },
        "summary": "Confirm setup intent with client secret",
        "tags": [
          "PaymentProfiles"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/api/v1/reconciliation/discrepancies": {
      "get": {
        "operationId": "listUnresolved",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseReconciliationDiscrepancy"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List unresolved discrepancies across merchants",
        "tags": [
          "Reconciliations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reconciliation/discrepancies/{id}": {
      "get": {
        "operationId": "getDiscrepancy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationDiscrepancy"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get an owned reconciliation discrepancy",
        "tags": [
          "Reconciliations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reconciliation/runs": {
      "get": {
        "operationId": "listRunsReconciliations",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "triggerType",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseReconciliationRun"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List reconciliation runs",
        "tags": [
          "Reconciliations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reconciliation/runs/{runId}": {
      "get": {
        "operationId": "getRunReconciliations",
        "parameters": [
          {
            "in": "path",
            "name": "runId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationRun"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get reconciliation run details",
        "tags": [
          "Reconciliations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reconciliation/runs/{runId}/discrepancies": {
      "get": {
        "operationId": "getRunDiscrepancies",
        "parameters": [
          {
            "in": "path",
            "name": "runId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseReconciliationDiscrepancy"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List discrepancies for a reconciliation run",
        "tags": [
          "Reconciliations"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/recovery/{setupIntentId}": {
      "get": {
        "description": "Returns masked merchant/amount/card context for the hosted update-payment page.",
        "operationId": "getContext",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryContext"
                }
              }
            },
            "description": "Recovery context retrieved"
          },
          "401": {
            "description": "Missing or invalid session token"
          }
        },
        "security": [
          {
            "RecoverySessionTokenAuth": []
          }
        ],
        "summary": "Get masked recovery context",
        "tags": [
          "Recovery"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/recovery/{setupIntentId}/card-entry-session": {
      "post": {
        "description": "Creates a hosted card-entry session using only the recovery session token. No raw card data is accepted or returned.",
        "operationId": "createRecoveryCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionCreateResponse"
                }
              }
            },
            "description": "Card-entry session created"
          }
        },
        "security": [
          {
            "RecoverySessionTokenAuth": []
          }
        ],
        "summary": "Create recovery card-entry session",
        "tags": [
          "RecoveryCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/recovery/{setupIntentId}/card-entry-session/{attemptId}": {
      "get": {
        "description": "Returns provider-independent status using the recovery session token",
        "operationId": "getRecoveryCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionStatusResponse"
                }
              }
            },
            "description": "Card-entry session status"
          }
        },
        "security": [
          {
            "RecoverySessionTokenAuth": []
          }
        ],
        "summary": "Get recovery card-entry session",
        "tags": [
          "RecoveryCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/recovery/{setupIntentId}/card-entry-session/{attemptId}/cancel": {
      "post": {
        "description": "Cancels a hosted card-entry session using the recovery session token",
        "operationId": "cancelRecoveryCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card-entry session canceled"
          }
        },
        "security": [
          {
            "RecoverySessionTokenAuth": []
          }
        ],
        "summary": "Cancel recovery card-entry session",
        "tags": [
          "RecoveryCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/recovery/{setupIntentId}/confirm": {
      "post": {
        "description": "Submits new card details, swaps the subscription's payment token, and reports the outcome.",
        "operationId": "confirmRecovery",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryConfirmCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryConfirmResult"
                }
              }
            },
            "description": "Card saved (and retried if configured)"
          },
          "400": {
            "description": "Card declined or link no longer valid"
          },
          "401": {
            "description": "Missing or invalid session token"
          }
        },
        "security": [
          {
            "RecoverySessionTokenAuth": []
          }
        ],
        "summary": "Confirm hosted update-payment card",
        "tags": [
          "Recovery"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/reports/card-brand": {
      "get": {
        "description": "Generates a card brand breakdown report. Platform users may omit merchantId to receive an aggregate across all merchants; merchant-scoped users must supply their merchantId.",
        "operationId": "cardBrand",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardBrandReport"
                }
              }
            },
            "description": "Report generated successfully"
          }
        },
        "summary": "Get card brand report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/custom": {
      "get": {
        "description": "Generates a custom date-range report. Platform users may omit merchantId to receive an aggregate across all merchants; merchant-scoped users must supply their merchantId.",
        "operationId": "custom",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DailyReport"
                }
              }
            },
            "description": "Report generated successfully"
          }
        },
        "summary": "Get custom report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/daily": {
      "get": {
        "description": "Generates a daily report. Platform users may omit merchantId to receive an aggregate across all merchants; merchant-scoped users must supply their merchantId.",
        "operationId": "daily",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "date",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DailyReport"
                }
              }
            },
            "description": "Report generated successfully"
          }
        },
        "summary": "Get daily report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/export": {
      "get": {
        "description": "Exports a report in CSV or PDF format",
        "operationId": "exportReports",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Report exported successfully"
          }
        },
        "summary": "Export report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/exports": {
      "get": {
        "description": "Org-scoped, paginated list of report export jobs",
        "operationId": "listExports",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseReportExportJob"
                }
              }
            },
            "description": "Report export jobs retrieved successfully"
          }
        },
        "summary": "List report export jobs",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Queues a one-shot or recurring report export",
        "operationId": "submitExport",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportExportJob"
                }
              }
            },
            "description": "Report export job queued"
          }
        },
        "summary": "Submit a report export job",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/exports/{id}": {
      "get": {
        "description": "Returns a single report export job by id",
        "operationId": "getExport",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportExportJob"
                }
              }
            },
            "description": "Report export job retrieved successfully"
          }
        },
        "summary": "Get a report export job",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      },
      "delete": {
        "description": "Cancels a still-QUEUED one-shot job or disables a recurring job's future runs",
        "operationId": "cancelExport",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "reason",
            "required": true,
            "schema": {
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "description": "Report export cancellation outcome"
          }
        },
        "summary": "Cancel a report export job",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/exports/{id}/download": {
      "get": {
        "description": "Returns a short-lived signed GCS URL when available, otherwise streams the artifact bytes",
        "operationId": "downloadExport",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Report export downloaded successfully"
          },
          "302": {
            "description": "Redirect to a short-lived signed download URL"
          }
        },
        "summary": "Download a report export artifact",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/monthly": {
      "get": {
        "description": "Generates a monthly report. Platform users may omit merchantId to receive an aggregate across all merchants; merchant-scoped users must supply their merchantId.",
        "operationId": "monthly",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "month",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonthlyReport"
                }
              }
            },
            "description": "Report generated successfully"
          }
        },
        "summary": "Get monthly report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/runs": {
      "get": {
        "description": "Org-scoped, paginated list of report runs",
        "operationId": "listRunsReports",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseReportRun"
                }
              }
            },
            "description": "Report runs retrieved successfully"
          }
        },
        "summary": "List report runs",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Executes a report run synchronously and returns its final status",
        "operationId": "submitRun",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRun"
                }
              }
            },
            "description": "Report run completed or failed"
          }
        },
        "summary": "Submit a report run",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/runs/{id}": {
      "get": {
        "description": "Returns a single report run by id",
        "operationId": "getRunReports",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRun"
                }
              }
            },
            "description": "Report run retrieved successfully"
          }
        },
        "summary": "Get a report run",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/runs/{id}/download": {
      "get": {
        "description": "Renders and returns the report run's result as CSV",
        "operationId": "downloadRun",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Report run downloaded successfully"
          }
        },
        "summary": "Download a report run",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/subscriptions": {
      "get": {
        "description": "Lists subscriptions. Date filters are not supported; omit from and to.",
        "operationId": "subscriptions",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get subscription report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/subscriptions/account-updater": {
      "get": {
        "description": "Masked canonical updater state and billing holds; no provider token or raw account data.",
        "operationId": "subscriptionUpdaterOutcomes",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionUpdaterReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List account-updater outcomes for active subscriptions",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/subscriptions/churn": {
      "get": {
        "description": "Cancellations over inclusive store-calendar dates from/to (UTC when unscoped or unset) vs the active base at window start, split voluntary vs involuntary (dunning-policy cancellation or CLOSED_LOST case).",
        "operationId": "subscriptionChurn",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChurnReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get subscription churn report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/subscriptions/mrr": {
      "get": {
        "description": "Current MRR (interval-normalized over ACTIVE/PAST_DUE/TRIALING subscriptions) and MRR-at-risk (open dunning cases' amount_at_risk, falling back to PAST_DUE/paused subscriptions when no case is open). Omit merchantId/locationId for a platform-wide aggregate.",
        "operationId": "subscriptionMrr",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MrrReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get subscription MRR report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/reports/subscriptions/recovery": {
      "get": {
        "description": "Recovery funnel (opened -> retried -> link-sent -> card-updated -> recovered vs closed-lost), recovered revenue, recovery rate, recovery-method breakdown, and retry success by decline category over inclusive store-calendar dates from/to (UTC when unscoped or unset).",
        "operationId": "subscriptionRecovery",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryReport"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get dunning recovery report",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-allocation": {
      "get": {
        "operationId": "routingAllocationSettings",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "required": true,
            "schema": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAllocationSettingsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-allocation/accounts/{credentialProfileId}/recovery-family": {
      "put": {
        "operationId": "setRoutingAllocationRecoveryFamily",
        "parameters": [
          {
            "in": "path",
            "name": "credentialProfileId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingAllocationRecoveryFamilyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAllocationRecoveryFamilyResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-allocation/policies": {
      "put": {
        "operationId": "updateRoutingAllocationPolicies",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingAllocationPolicyBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAllocationSettingsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-allocation/recovery-families": {
      "get": {
        "operationId": "routingAllocationRecoveryFamilySettings",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAllocationRecoveryFamilySettingsResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/automatic-optimization/status": {
      "get": {
        "operationId": "automaticOptimizationStatus",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomaticOptimizationStatus"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/decline-map": {
      "get": {
        "operationId": "declineMap",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingDeclineMapResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/decline-replay": {
      "get": {
        "operationId": "declineReplay",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "windowDays",
            "required": false,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingDeclineReplayResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/optimization": {
      "get": {
        "operationId": "optimizationPolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingOptimizationPolicy"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "setOptimizationPolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingOptimizationPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingOptimizationPolicy"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/policy": {
      "get": {
        "operationId": "policy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paymentUseCase",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAutomationPolicy",
                  "nullable": true
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "setPolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paymentUseCase",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingAutomationPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingAutomationPolicy"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "clearPolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paymentUseCase",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/policy/effective": {
      "get": {
        "operationId": "effectivePolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paymentUseCase",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveRoutingPolicyResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingAutomation"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules": {
      "get": {
        "operationId": "listRoutingRules",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeInactive",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleSetResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      },
      "post": {
        "operationId": "createRoutingRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementCreateRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleMutationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules/issuers": {
      "get": {
        "operationId": "searchRoutingRuleIssuers",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ManagementRoutingIssuerGroup"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules/issuers/resolve": {
      "post": {
        "operationId": "resolveRoutingRuleIssuers",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementRoutingIssuerResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ManagementRoutingIssuerGroup"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules/target-profiles": {
      "get": {
        "operationId": "listRoutingRuleTargetProfiles",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleTargetProfile"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules/{ruleId}": {
      "get": {
        "operationId": "getRoutingRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeInactive",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleMutationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateRoutingRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementUpdateRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleMutationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteRoutingRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementDeleteRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleMutationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/routing-automation/organizations/{organizationId}/rules/{ruleId}/restore": {
      "post": {
        "operationId": "restoreRoutingRule",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "ruleId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementRestoreRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementRoutingRuleMutationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "RoutingRules"
        ],
        "security": [
          {
            "OAuth2": [
              "routing-rules:write"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods": {
      "get": {
        "description": "Lists saved cards for a customer across every Location in the caller's Organization. Use `merchantId`/`locationId`/`organizationId` to select which Organization scope to read.",
        "operationId": "listSavedPaymentMethods",
        "parameters": [
          {
            "in": "query",
            "name": "customerId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeExpired",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Saved payment methods retrieved"
          },
          "400": {
            "description": "Missing customer or organization context"
          },
          "403": {
            "description": "Cross-organization access denied"
          }
        },
        "summary": "List saved payment methods for a customer",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods/bank-accounts": {
      "post": {
        "operationId": "createSavedBankAccountPaymentMethod",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 36,
              "minLength": 36,
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBankAccountPaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                }
              }
            },
            "description": "Saved bank account linked"
          },
          "400": {
            "description": "Invalid or rejected bank account"
          }
        },
        "summary": "Create a saved bank account payment method",
        "tags": [
          "SavedBankAccounts"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods/{savedPaymentMethodId}": {
      "get": {
        "description": "Retrieves a single saved payment method by id within the caller's Organization. Returns 404 when the id belongs to a different Organization (the id alone never leaks cross-Org).",
        "operationId": "getSavedPaymentMethod",
        "parameters": [
          {
            "in": "path",
            "name": "savedPaymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                }
              }
            },
            "description": "Saved payment method retrieved"
          },
          "404": {
            "description": "Saved payment method not found in caller's Organization"
          }
        },
        "summary": "Get a saved payment method",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      },
      "delete": {
        "description": "Removes the saved card from the caller's Organization.",
        "operationId": "deleteSavedPaymentMethod",
        "parameters": [
          {
            "in": "path",
            "name": "savedPaymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Saved payment method deleted"
          },
          "404": {
            "description": "Saved payment method not found in caller's Organization"
          }
        },
        "summary": "Delete a saved payment method",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods/{savedPaymentMethodId}/replace": {
      "post": {
        "description": "Confirms a new setup intent through the hosted server-side card-data path, then promotes it and disables the old method atomically.",
        "operationId": "replaceSavedPaymentMethod",
        "parameters": [
          {
            "in": "path",
            "name": "savedPaymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacePaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                }
              }
            },
            "description": "Saved payment method replaced"
          },
          "400": {
            "description": "Invalid setup intent or customer mismatch"
          },
          "404": {
            "description": "Saved payment method not found"
          }
        },
        "summary": "Replace a saved payment method",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods/{savedPaymentMethodId}/set-default": {
      "post": {
        "description": "Marks the target row as the customer's default and clears the flag from every other saved card on the same customer within the same Organization.",
        "operationId": "setDefaultSavedPaymentMethod",
        "parameters": [
          {
            "in": "path",
            "name": "savedPaymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                }
              }
            },
            "description": "Default updated"
          },
          "404": {
            "description": "Saved payment method not found in caller's Organization"
          }
        },
        "summary": "Set default saved payment method",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/saved-payment-methods/{savedPaymentMethodId}/status": {
      "put": {
        "description": "Sets the status of a saved payment method (ACTIVE / DISABLED / etc).",
        "operationId": "updateSavedPaymentMethodStatus",
        "parameters": [
          {
            "in": "path",
            "name": "savedPaymentMethodId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePaymentMethodStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodResponse"
                }
              }
            },
            "description": "Status updated"
          },
          "404": {
            "description": "Saved payment method not found in caller's Organization"
          }
        },
        "summary": "Update saved payment method status",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/batches": {
      "get": {
        "description": "Lists report-backed Gateway batches with cursor pagination",
        "operationId": "listBatches",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayBatchPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List settlement batches",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/batches/{gatewayBatchId}": {
      "get": {
        "description": "Returns one report-backed batch by its Gateway projection ID",
        "operationId": "getBatch",
        "parameters": [
          {
            "in": "path",
            "name": "gatewayBatchId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayBatch"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get settlement batch",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/close-command": {
      "get": {
        "description": "Reads an existing durable command for the caller's location and frozen cutoff; never closes a batch",
        "operationId": "inquireClose",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cutoffAt",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualSettlementCloseResponse",
                  "nullable": true
                }
              }
            },
            "description": "Existing processor close command, or null when absent"
          }
        },
        "summary": "Read processor close command",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/close-context": {
      "get": {
        "description": "Read-only local account work discovery; never dispatches a processor call",
        "operationId": "getCloseContext",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessorSettlementCloseContext"
                }
              }
            },
            "description": "Account identity, earliest unsettled work and server cutoff"
          }
        },
        "summary": "Read current processor account close context",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "settlements:close"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/close-request": {
      "get": {
        "description": "Reads an existing command without resolving the current processor route; null does not prove no effect",
        "operationId": "inquireCloseRequest",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "idempotencyKey",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualSettlementCloseRequestLookupResponse"
                }
              }
            },
            "description": "Identity protocol version and original command, or a null command when not found"
          }
        },
        "summary": "Read processor close by original request identity",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/terminal-close": {
      "post": {
        "description": "Requests one durable processor settlement close for an agent-authorized location",
        "operationId": "terminalClose",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManualSettlementCloseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualSettlementCloseResponse"
                }
              }
            },
            "description": "Processor settlement close command accepted"
          }
        },
        "summary": "Close store processor settlement",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "settlements:close"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/unmatched": {
      "get": {
        "description": "Lists processor settlement rows without a canonical local match",
        "operationId": "listUnmatched",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "operation",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "observedTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnmatchedSettlementPage"
                }
              }
            },
            "description": "Unmatched settlement rows"
          }
        },
        "summary": "List unmatched settlements",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/settlements/unmatched/{rowId}": {
      "get": {
        "description": "Returns one support-safe unmatched processor settlement row",
        "operationId": "getUnmatched",
        "parameters": [
          {
            "in": "path",
            "name": "rowId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnmatchedSettlement"
                }
              }
            },
            "description": "Unmatched settlement row"
          }
        },
        "summary": "Get unmatched settlement",
        "tags": [
          "Settlements"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:read"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents": {
      "get": {
        "description": "Lists setup intents for a merchant",
        "operationId": "listSetupIntents",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseSetupIntent"
                }
              }
            },
            "description": "SetupIntents retrieved successfully"
          },
          "400": {
            "description": "Invalid request parameters"
          }
        },
        "summary": "List setup intents",
        "tags": [
          "SetupIntents"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new setup intent for saving a payment method",
        "operationId": "createSetupIntents",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSetupIntentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "SetupIntent created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create setup intent",
        "tags": [
          "SetupIntents"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents/issue-link": {
      "post": {
        "operationId": "issueHostedSetupLink",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueHostedSetupLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueHostedSetupLinkResponse"
                }
              }
            },
            "description": "Hosted setup link issued"
          }
        },
        "summary": "Issue a hosted setup link",
        "tags": [
          "PaymentProfiles"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents/keyset": {
      "get": {
        "description": "Keyset-paginated list. Pass the previous page's `nextCursor` back as `cursor` to fetch the next page. `nextCursor` is null on the last page.",
        "operationId": "listKeyset",
        "parameters": [
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SetupIntentStatus"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeTotal",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntentListPage"
                }
              }
            },
            "description": "SetupIntents retrieved successfully"
          },
          "400": {
            "description": "Invalid cursor or request parameters"
          }
        },
        "summary": "List setup intents (keyset)",
        "tags": [
          "SetupIntents"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}": {
      "get": {
        "description": "Retrieves details of a specific setup intent",
        "operationId": "getSetupIntents",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "SetupIntent retrieved successfully"
          },
          "404": {
            "description": "SetupIntent not found"
          }
        },
        "summary": "Get setup intent",
        "tags": [
          "SetupIntents"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}/cancel": {
      "post": {
        "description": "Cancels a setup intent",
        "operationId": "cancelSetupIntents",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSetupIntentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "SetupIntent cancelled successfully"
          },
          "400": {
            "description": "SetupIntent cannot be cancelled in current status"
          },
          "404": {
            "description": "SetupIntent not found"
          }
        },
        "summary": "Cancel setup intent",
        "tags": [
          "SetupIntents"
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}/card-entry-session": {
      "post": {
        "description": "Creates a provider-hosted card-entry session for a merchant-owned setup intent",
        "operationId": "createSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionCreateResponse"
                }
              }
            },
            "description": "Card-entry session created"
          }
        },
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ],
        "summary": "Create setup-intent card-entry session",
        "tags": [
          "SetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}/card-entry-session/{attemptId}": {
      "get": {
        "description": "Gets the provider-independent status of a setup-intent card-entry session",
        "operationId": "getSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardEntrySessionStatusResponse"
                }
              }
            },
            "description": "Card-entry session status"
          }
        },
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ],
        "summary": "Get setup-intent card-entry session",
        "tags": [
          "SetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}/card-entry-session/{attemptId}/cancel": {
      "post": {
        "description": "Cancels a merchant-owned setup-intent card-entry session",
        "operationId": "cancelSetupIntentCardEntry",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attemptId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card-entry session canceled"
          }
        },
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ],
        "summary": "Cancel setup-intent card-entry session",
        "tags": [
          "SetupIntentCardEntry"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ]
      }
    },
    "/api/v1/setup-intents/{setupIntentId}/confirm": {
      "post": {
        "description": "Confirm a merchant-owned setup intent with typed card data",
        "operationId": "confirmSetupIntentConfirmation",
        "parameters": [
          {
            "in": "path",
            "name": "setupIntentId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmSetupIntentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "Setup intent confirmed"
          }
        },
        "summary": "Confirm setup intent",
        "tags": [
          "SetupIntentConfirmation"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/shipping/config": {
      "get": {
        "operationId": "getConfigShipping",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingConfigResponse"
                }
              }
            },
            "description": "Configuration retrieved"
          }
        },
        "summary": "Get merchant shipping configuration",
        "tags": [
          "Shipping"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "upsertConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertShippingConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingConfigResponse"
                }
              }
            },
            "description": "Configuration saved"
          }
        },
        "summary": "Create or update merchant shipping configuration",
        "tags": [
          "Shipping"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      },
      "delete": {
        "operationId": "deleteConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Configuration deleted"
          }
        },
        "summary": "Delete merchant shipping configuration",
        "tags": [
          "Shipping"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "hosted-payments:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscription-schedules": {
      "post": {
        "description": "Creates a multi-phase subscription schedule",
        "operationId": "createSubscriptionSchedules",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedule created successfully"
          }
        },
        "summary": "Create subscription schedule",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscription-schedules/{scheduleId}": {
      "get": {
        "description": "Retrieves a subscription schedule by id",
        "operationId": "getSubscriptionSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "scheduleId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedule retrieved successfully"
          }
        },
        "summary": "Get subscription schedule",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/subscription-schedules/{scheduleId}/activate": {
      "post": {
        "description": "Activates a NOT_STARTED schedule and creates the backing subscription",
        "operationId": "activateSubscriptionSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "scheduleId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedule activated successfully"
          }
        },
        "summary": "Activate subscription schedule",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscription-schedules/{scheduleId}/advance": {
      "post": {
        "description": "Advances an ACTIVE subscription schedule to its next phase",
        "operationId": "advance",
        "parameters": [
          {
            "in": "path",
            "name": "scheduleId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedule advanced successfully"
          }
        },
        "summary": "Advance subscription schedule",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscription-schedules/{scheduleId}/cancel": {
      "post": {
        "description": "Cancels a NOT_STARTED or ACTIVE schedule",
        "operationId": "cancelSubscriptionSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "scheduleId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "merchantId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSchedule"
                }
              }
            },
            "description": "Subscription schedule cancelled successfully"
          }
        },
        "summary": "Cancel subscription schedule",
        "tags": [
          "SubscriptionSchedules"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions": {
      "get": {
        "description": "Lists subscriptions with optional filters",
        "operationId": "listSubscriptionsGet",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionStatus"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseSubscription"
                }
              }
            },
            "description": "Subscriptions retrieved successfully"
          },
          "400": {
            "description": "Invalid request parameters"
          }
        },
        "summary": "List subscriptions",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new subscription",
        "operationId": "createSubscriptions",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create subscription",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/plans/{priceId}/deactivate": {
      "post": {
        "description": "Pauses or cancels every live subscription that contains the plan price",
        "operationId": "deactivatePlan",
        "parameters": [
          {
            "in": "path",
            "name": "priceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanDeactivationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPlanBulkResult"
                }
              }
            },
            "description": "Plan subscriptions processed"
          },
          "400": {
            "description": "Invalid action or plan scope"
          }
        },
        "summary": "Deactivate subscriptions for a plan",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/plans/{sourcePriceId}/migrate": {
      "post": {
        "description": "Replaces a source plan price on every matching live subscription",
        "operationId": "migratePlan",
        "parameters": [
          {
            "in": "path",
            "name": "sourcePriceId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanMigrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPlanBulkResult"
                }
              }
            },
            "description": "Plan subscriptions processed"
          },
          "400": {
            "description": "Invalid target plan or scope"
          }
        },
        "summary": "Migrate subscriptions to another plan",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}": {
      "get": {
        "description": "Retrieves details of a specific subscription",
        "operationId": "getSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription retrieved successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Get subscription details",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      },
      "patch": {
        "description": "Updates an existing subscription",
        "operationId": "updateSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription updated successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Update subscription",
        "tags": [
          "Subscriptions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/apply-final-action": {
      "post": {
        "description": "Skips remaining retries and applies the merchant's configured dunning final action immediately",
        "operationId": "applyFinalAction",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyFinalActionResponse"
                }
              }
            },
            "description": "Final action applied successfully"
          },
          "400": {
            "description": "Subscription already terminal"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Apply configured dunning final action",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "recovery:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/billing-history": {
      "get": {
        "description": "Retrieves billing history for a subscription",
        "operationId": "billingHistory",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseBillingEvent"
                }
              }
            },
            "description": "Billing history retrieved successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Get billing history",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "description": "Cancels an active subscription",
        "operationId": "cancelSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription cancelled successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Cancel subscription",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/items": {
      "post": {
        "description": "Adds a new item to a subscription",
        "operationId": "addItem",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionItemMutationResponse"
                }
              }
            },
            "description": "Item added successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Add subscription item",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/items/{itemId}": {
      "patch": {
        "description": "Updates the quantity of a subscription item",
        "operationId": "updateItemQuantity",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "itemId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionItemMutationResponse"
                }
              }
            },
            "description": "Item quantity updated successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Subscription or item not found"
          }
        },
        "summary": "Update subscription item quantity",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Removes an item from a subscription",
        "operationId": "removeItem",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "itemId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionItemMutationResponse"
                }
              }
            },
            "description": "Item removed successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Subscription or item not found"
          }
        },
        "summary": "Remove subscription item",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/pause": {
      "post": {
        "description": "Pauses an active subscription",
        "operationId": "pause",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription paused successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Pause subscription",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/resume": {
      "post": {
        "description": "Resumes a paused subscription",
        "operationId": "resume",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription resumed successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Resume subscription",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/subscriptions/{subscriptionId}/trigger-billing": {
      "post": {
        "description": "Manually triggers billing for a specific subscription",
        "operationId": "triggerBilling",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerSubscriptionBillingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionBillingResult"
                }
              }
            },
            "description": "Billing triggered successfully"
          },
          "404": {
            "description": "Subscription not found"
          }
        },
        "summary": "Trigger billing",
        "tags": [
          "Subscriptions"
        ],
        "security": [
          {
            "OAuth2": [
              "subscriptions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/tax-configs/validate": {
      "post": {
        "operationId": "validate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateTaxConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxConfigValidationResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "tax-config:write"
            ]
          }
        ]
      }
    },
    "/api/v1/tax/calculate": {
      "post": {
        "operationId": "calculate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxCalculationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCalculationResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TaxConfig"
        ],
        "security": [
          {
            "OAuth2": [
              "billing:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transaction-exports": {
      "post": {
        "operationId": "exportTransactionExports",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TransactionExports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export",
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transaction-exports/access": {
      "get": {
        "description": "Requires reports:export to call. Returns allowed=false when transactions:read or access to the requested scope is missing; downloading an export requires both reports:export and transactions:read.",
        "operationId": "access",
        "parameters": [
          {
            "in": "query",
            "name": "scopeType",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scopeId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionExportAccessResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Check transaction export access",
        "tags": [
          "TransactionExports"
        ],
        "security": [
          {
            "OAuth2": [
              "reports:export"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions": {
      "get": {
        "description": "Lists transactions for the authorized location",
        "operationId": "listTransactions",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "description": "Optional status filter. When omitted, EXPIRED_UNCONFIRMED transactions are excluded; pass EXPIRED_UNCONFIRMED to retrieve them explicitly.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TransactionStatus"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customerId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "externalReferenceId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "checkoutAttemptId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseTransaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List transactions",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/auth": {
      "post": {
        "description": "Process a typed card transaction auth",
        "operationId": "authorizeTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process typed auth",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/count": {
      "get": {
        "description": "Counts transactions in an authorized location",
        "operationId": "countTransactions",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionCountResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Count transactions",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/force-auth": {
      "post": {
        "description": "Process a typed card transaction force auth",
        "operationId": "forceAuthorizeTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process typed force auth",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/recurring/{subscriptionId}/{cycle}/{attempt}/decision-timeline": {
      "get": {
        "description": "Resolves a recurring billing attempt by subscription, cycle, and attempt before reading its sanitized decision timeline",
        "operationId": "getRecurringDecisionTimeline",
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cycle",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "attempt",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTimelineResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get recurring transaction decision timeline",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/sale": {
      "post": {
        "description": "Process a typed card transaction sale",
        "operationId": "saleTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process typed sale",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/virtual-terminal/auth": {
      "post": {
        "description": "Process a merchant-initiated virtual-terminal authorization",
        "operationId": "virtualTerminalAuthorizeTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process virtual-terminal auth",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/virtual-terminal/force-auth": {
      "post": {
        "description": "Process a merchant-initiated virtual-terminal force authorization",
        "operationId": "virtualTerminalForceAuthorizeTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process virtual-terminal force auth",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/virtual-terminal/quote": {
      "post": {
        "description": "Resolve catalog prices and location/product tax into an immutable payment quote",
        "operationId": "quoteVirtualTerminalTransaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VirtualTerminalQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualTerminalQuote"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Quote a virtual terminal sale",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/virtual-terminal/sale": {
      "post": {
        "description": "Process a merchant-initiated virtual-terminal sale",
        "operationId": "virtualTerminalSaleTransaction",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardTransactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Process virtual-terminal sale",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}": {
      "get": {
        "description": "Retrieves a transaction owned by the authenticated merchant",
        "operationId": "getTransactionsGet",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get transaction",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/capture": {
      "post": {
        "description": "Captures a previously authorized transaction",
        "operationId": "captureTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Capture transaction",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/customer": {
      "post": {
        "description": "Links a customer without changing payment-account attribution or moving money",
        "operationId": "attachCustomer",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCustomerLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Attach transaction customer",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/customer/unlink": {
      "post": {
        "description": "Removes the expected customer link; rejects a changed link",
        "operationId": "unlinkCustomer",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCustomerLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unlink transaction customer",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/decision-timeline": {
      "get": {
        "description": "Retrieves the sanitized fraud, routing, processor-attempt, and recovery decisions for a transaction",
        "operationId": "getDecisionTimelineTransactions",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTimelineResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get transaction decision timeline",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/dispute-evidence": {
      "get": {
        "description": "Assembles the PAN-free EMV card-read, cardholder-verification and receipt evidence retained for a transaction, naming the evidence that was not captured. Never contains a card number, track data, EMV cryptograms or PIN data.",
        "operationId": "getDisputeEvidence",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisputeEvidencePacket"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get card-present dispute evidence packet",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/enrich": {
      "post": {
        "description": "Adds L2/L3 enrichment data to a transaction",
        "operationId": "enrichTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Enrich transaction",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/increment": {
      "post": {
        "description": "Increases the authorized amount on an existing authorization",
        "operationId": "incrementAuthTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncrementAuthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Increment authorization",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/operations": {
      "get": {
        "description": "Reads the original durable request outcome, including pending or unknown requests",
        "operationId": "getOperation",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "operationId",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOperationEvidence"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get exact transaction operation",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/refund": {
      "post": {
        "description": "Refunds a previously captured transaction",
        "operationId": "refundTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Refund transaction",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/refunds": {
      "get": {
        "description": "Lists the completed refunds of a transaction owned by the authenticated merchant, oldest first. Each refund carries the same transactionId, amount and refundedTipAmount as its payment.refunded webhook.",
        "operationId": "listRefunds",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TransactionRefund"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List transaction refunds",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:read"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/tip-adjust": {
      "post": {
        "description": "Adjusts the tip amount for a transaction",
        "operationId": "tipAdjustTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TipAdjustRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Adjust transaction tip",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/total-adjust": {
      "post": {
        "description": "Adjusts the total amount for a transaction",
        "operationId": "totalAdjustTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotalAdjustRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Adjust transaction total",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/transactions/{transactionId}/void": {
      "post": {
        "description": "Voids a previously authorized transaction",
        "operationId": "voidTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transactionId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Void transaction",
        "tags": [
          "Transactions"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "description": "Lists all users",
        "operationId": "listUsersGet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/User"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Users retrieved successfully"
          }
        },
        "summary": "List users",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates a new user",
        "operationId": "createUsers",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User created successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Create user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users/{userId}": {
      "get": {
        "description": "Retrieves a specific user",
        "operationId": "getUsers",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User retrieved successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Get user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:read"
            ]
          }
        ]
      },
      "put": {
        "description": "Updates an existing user",
        "operationId": "updateUsers",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User updated successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Update user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Deletes a user",
        "operationId": "deleteUsers",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "User deleted successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Delete user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users/{userId}/activate": {
      "post": {
        "description": "Activates a disabled user",
        "operationId": "activateUsers",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User activated successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Activate user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users/{userId}/deactivate": {
      "post": {
        "description": "Deactivates a user",
        "operationId": "deactivate",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User deactivated successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Deactivate user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users/{userId}/password-reset": {
      "post": {
        "description": "Sends a password reset email to a user",
        "operationId": "sendPasswordReset",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordResetResponse"
                }
              }
            },
            "description": "Password reset email sent"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Send password reset",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/users/{userId}/restore": {
      "post": {
        "description": "Restores a disabled user",
        "operationId": "restoreUsers",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "User restored successfully"
          },
          "404": {
            "description": "User not found"
          }
        },
        "summary": "Restore user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "OAuth2": [
              "users:write"
            ]
          }
        ]
      }
    },
    "/api/v1/virtual-terminal/reconcile": {
      "get": {
        "description": "Look up an operation by its idempotency key",
        "operationId": "getVirtualTerminalReconciliation",
        "parameters": [
          {
            "in": "query",
            "name": "idempotencyKey",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Reconcile virtual-terminal operation",
        "tags": [
          "VirtualTerminalReconciliation"
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/apple-pay/authorize": {
      "post": {
        "description": "Authorizes Apple Pay payment",
        "operationId": "authorizeApplePay",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplePayAuthorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletChargeResult"
                }
              }
            },
            "description": "Apple Pay payment authorized successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Authorize Apple Pay",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/apple-pay/charge": {
      "post": {
        "description": "Processes Apple Pay payment",
        "operationId": "chargeApplePay",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplePayChargeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletChargeResult"
                }
              }
            },
            "description": "Apple Pay payment processed successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Charge Apple Pay",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/apple-pay/session": {
      "post": {
        "description": "Validates Apple Pay merchant session",
        "operationId": "validateApplePaySession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplePaySessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplePaySession"
                }
              }
            },
            "description": "Apple Pay session validated successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Validate Apple Pay session",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/google-pay/authorize": {
      "post": {
        "description": "Authorizes Google Pay payment",
        "operationId": "authorizeGooglePay",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GooglePayAuthorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletChargeResult"
                }
              }
            },
            "description": "Google Pay payment authorized successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Authorize Google Pay",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/google-pay/charge": {
      "post": {
        "description": "Processes Google Pay payment",
        "operationId": "chargeGooglePay",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GooglePayChargeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletChargeResult"
                }
              }
            },
            "description": "Google Pay payment processed successfully"
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "summary": "Charge Google Pay",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/wallet/google-pay/config": {
      "get": {
        "description": "Gets Google Pay gateway configuration",
        "operationId": "getGooglePayConfigWallet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GooglePayConfig"
                }
              }
            },
            "description": "Google Pay config retrieved successfully"
          }
        },
        "summary": "Get Google Pay config",
        "tags": [
          "Wallet"
        ],
        "servers": [
          {
            "url": "https://pay.peakgateway.co"
          },
          {
            "url": "https://staging-pay.peakgateway.co"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transactions:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-deliveries/{id}": {
      "get": {
        "operationId": "getDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDelivery"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a webhook delivery by id",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-deliveries/{id}/retry": {
      "post": {
        "operationId": "retryDeliveryFromDlq",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDelivery"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Retry a webhook delivery from the DLQ",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-events": {
      "get": {
        "description": "Org-scoped, keyset-paginated.",
        "operationId": "listWebhookEvents",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventType",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "includeTotal",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventListPage"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List webhook events",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-events/retention": {
      "get": {
        "operationId": "getRetentionConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventRetentionConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateRetentionConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventRetentionConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventRetentionConfig"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-events/{id}": {
      "get": {
        "operationId": "getWebhookEvents",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventRecord"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a webhook event by id",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-events/{id}/deliveries": {
      "get": {
        "operationId": "listDeliveriesWebhookEvents",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventDelivery"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List delivery attempts for a webhook event",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhook-events/{id}/replay": {
      "post": {
        "operationId": "replay",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organizationId",
            "required": false,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayWebhookEventRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayWebhookEventResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Replay a webhook event to one or more subscriptions",
        "tags": [
          "WebhookEvents"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "description": "Lists webhook endpoints configured for a merchant",
        "operationId": "listWebhooks",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookDefinition"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List configured webhooks",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      },
      "post": {
        "description": "Creates or replaces the webhook endpoint for a merchant",
        "operationId": "createWebhooks",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDefinition"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Create webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks/deliveries": {
      "get": {
        "description": "Lists webhook delivery history for a merchant",
        "operationId": "listDeliveriesWebhooks",
        "parameters": [
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookDelivery"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Webhook deliveries retrieved successfully"
          }
        },
        "summary": "List webhook deliveries",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks/deliveries/{id}/retry": {
      "post": {
        "description": "Retries a failed webhook delivery",
        "operationId": "retryDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookRetryResult"
                }
              }
            },
            "description": "Delivery retried successfully"
          }
        },
        "summary": "Retry delivery",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks/events": {
      "get": {
        "description": "Lists all supported webhook event types",
        "operationId": "listEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Event types retrieved successfully"
          }
        },
        "summary": "List event types",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{webhookId}": {
      "put": {
        "description": "Updates the webhook endpoint for a merchant",
        "operationId": "updateWebhooks",
        "parameters": [
          {
            "in": "path",
            "name": "webhookId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDefinition"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      },
      "delete": {
        "description": "Deletes the webhook endpoint for a merchant",
        "operationId": "deleteWebhooks",
        "parameters": [
          {
            "in": "path",
            "name": "webhookId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{webhookId}/test": {
      "post": {
        "description": "Sends a test event to the configured merchant webhook",
        "operationId": "testWebhooks",
        "parameters": [
          {
            "in": "path",
            "name": "webhookId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Test webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/oauth2/api-key/token": {
      "post": {
        "operationId": "exchangeApiKey",
        "parameters": [
          {
            "in": "header",
            "name": "X-Api-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyTokenExchangeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKeyHeaderAuth": []
          }
        ],
        "tags": [
          "TokenExchange"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ]
      }
    },
    "/oauth2/token-exchange": {
      "post": {
        "operationId": "tokenExchange",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenExchangeResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "ClientBasicAuth": []
          }
        ],
        "tags": [
          "TokenExchange"
        ],
        "servers": [
          {
            "url": "https://api.peakgateway.co/auth"
          },
          {
            "url": "https://staging-api.peakgateway.co/auth"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AchAccountType": {
        "enum": [
          "CHECKING",
          "SAVINGS"
        ],
        "type": "string"
      },
      "AchEntryCode": {
        "enum": [
          "CCD",
          "PPD",
          "TEL",
          "WEB"
        ],
        "type": "string"
      },
      "AchPrenoteRequest": {
        "properties": {
          "accountNumber": {
            "minLength": 1,
            "pattern": "\\d{4,17}",
            "type": "string"
          },
          "accountType": {
            "$ref": "#/components/schemas/AchAccountType"
          },
          "credit": {
            "type": "boolean"
          },
          "entryCode": {
            "$ref": "#/components/schemas/AchEntryCode",
            "nullable": true
          },
          "firstName": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "lastName": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "routingNumber": {
            "minLength": 1,
            "pattern": "\\d{9}",
            "type": "string"
          }
        },
        "required": [
          "accountNumber",
          "accountType",
          "firstName",
          "lastName",
          "routingNumber"
        ],
        "type": "object"
      },
      "AchPrenoteResponse": {
        "properties": {
          "approved": {
            "type": "boolean"
          },
          "operationId": {
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorReference": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "responseCode": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string"
          },
          "responseMessage": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "approved",
          "operationId",
          "processorPlatform",
          "processorType",
          "responseCode",
          "responseMessage"
        ],
        "type": "object"
      },
      "ProcessorPlatform": {
        "enum": [
          "TRANSIT",
          "SIERRA",
          "RAPID_CONNECT",
          "CARDPOINTE",
          "EPG",
          "ECPI",
          "SERVER_POST",
          "MAVERICK_ACH",
          "TRANSIT_SIMULATOR"
        ],
        "type": "string"
      },
      "ProcessorType": {
        "enum": [
          "TSYS",
          "FISERV",
          "ELAVON",
          "CHASE",
          "WORLDPAY",
          "HEARTLAND",
          "EPX",
          "MAVERICK"
        ],
        "type": "string"
      },
      "AgentBuyRateHistoryBaselineReceipt": {
        "properties": {
          "acceptedExistingBaselines": {
            "items": {
              "$ref": "#/components/schemas/RateHistoryBaselineObservation"
            },
            "type": "array"
          },
          "actorEmail": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "alreadyCovered": {
            "type": "boolean"
          },
          "auditId": {
            "type": "string"
          },
          "buyRateGroupId": {
            "type": "string"
          },
          "creationPriceVersionId": {
            "type": "string"
          },
          "effectiveAt": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "recordedAt": {
            "format": "date-time",
            "type": "string"
          },
          "replay": {
            "type": "boolean"
          },
          "resourceId": {
            "type": "string"
          },
          "transitionId": {
            "type": "string"
          }
        },
        "required": [
          "acceptedExistingBaselines",
          "actorEmail",
          "actorId",
          "alreadyCovered",
          "auditId",
          "buyRateGroupId",
          "creationPriceVersionId",
          "effectiveAt",
          "reason",
          "recordedAt",
          "replay",
          "resourceId",
          "transitionId"
        ],
        "type": "object"
      },
      "AgentOauthClientResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "oauthClientId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "agentId"
        ],
        "type": "object"
      },
      "AgentOauthClientScopeReconciliationResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "changed": {
            "type": "boolean"
          },
          "oauthClientId": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "agentId",
          "changed",
          "oauthClientId",
          "revision"
        ],
        "type": "object"
      },
      "AgentRateCardCatalogResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "defaultRateCardGroup": {
            "$ref": "#/components/schemas/RateCardGroupResponse"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/RateCardGroupResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "agentId",
          "defaultRateCardGroup",
          "groups"
        ],
        "type": "object"
      },
      "AgentRateCardResponse": {
        "properties": {
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "setByAgentId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "billingCycleDay",
          "effectiveFrom",
          "featureFees",
          "id",
          "monthlyFee",
          "status",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "AgentResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "billingExempt": {
            "type": "boolean"
          },
          "billingExemptInherited": {
            "type": "boolean"
          },
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "depth": {
            "format": "int32",
            "type": "integer"
          },
          "isRoot": {
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "oauthClientId": {
            "nullable": true,
            "type": "string"
          },
          "parentAgentId": {
            "nullable": true,
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "billingExempt",
          "billingExemptInherited",
          "createdAt",
          "depth",
          "isRoot",
          "name",
          "path",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "AgentTreeResponse": {
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentResponse"
          },
          "descendants": {
            "items": {
              "$ref": "#/components/schemas/AgentResponse"
            },
            "type": "array"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "agent",
          "descendants",
          "total"
        ],
        "type": "object"
      },
      "AgentUserResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "createdAt",
          "email",
          "role",
          "status",
          "userId"
        ],
        "type": "object"
      },
      "AppAuthorizationGrantResponse": {
        "properties": {
          "appId": {
            "type": "string"
          },
          "grantId": {
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantedBy": {
            "nullable": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "appId",
          "grantId",
          "grantedAt",
          "status",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "AssignAgentBuyRateRequest": {
        "properties": {
          "rateCardGroupId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AssignAgentDefaultRateRequest": {
        "properties": {
          "rateCardGroupId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "rateCardGroupId"
        ],
        "type": "object"
      },
      "AttachOrganizationRequest": {
        "properties": {
          "organizationId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "AttestAgentBuyRateHistoryBaselineRequest": {
        "properties": {
          "expectedCurrentBuyRateGroupId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 10,
            "type": "string"
          },
          "unchangedSinceCreation": {
            "type": "boolean"
          }
        },
        "required": [
          "expectedCurrentBuyRateGroupId",
          "reason",
          "unchangedSinceCreation"
        ],
        "type": "object"
      },
      "BillingFeatureGroup": {
        "enum": [
          "FRAUD",
          "TOKENIZATION",
          "NETWORK_TOKENIZATION",
          "ACCOUNT_UPDATER",
          "SMART_ROUTING",
          "CARD_NOT_PRESENT",
          "THREE_DS",
          "APPLE_PAY",
          "GOOGLE_PAY",
          "ACH_TENDER",
          "EBT_TENDER",
          "AGENTIC_CHECKOUT",
          "SMART_POS",
          "TTP_IOS_NATIVE",
          "TTP_IOS_NEARPAY",
          "TTP_ANDROID_NEARPAY",
          "TTP_ANDROID_NATIVE"
        ],
        "type": "string"
      },
      "CloneRateCardGroupRequest": {
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateAgentRateCardGroupRequest": {
        "properties": {
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateAgentRequest": {
        "properties": {
          "contactEmail": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "parentAgentId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateAgentUserRequest": {
        "properties": {
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "format": "email",
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "email",
          "role"
        ],
        "type": "object"
      },
      "CreateRateCardTemplateRequest": {
        "properties": {
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "platformDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "Organization": {
        "properties": {
          "activeLocationCount": {
            "format": "int64",
            "type": "integer"
          },
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "defaultCredentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "defaultLocationId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "inactiveLocationCount": {
            "format": "int64",
            "type": "integer"
          },
          "legalName": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationStatus",
            "nullable": true
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "legalName",
          "organizationId",
          "updatedAt"
        ],
        "type": "object"
      },
      "OrganizationStatus": {
        "enum": [
          "ACTIVE",
          "DELETED"
        ],
        "type": "string"
      },
      "PaginatedResponseAgentResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentResponse"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseOrganization": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Organization"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "RateCardFeatureFee": {
        "properties": {
          "enablementFee": {
            "format": "int64",
            "type": "integer"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "lifecycleFeeFixed": {
            "description": "Integer cents per lifecycle event. Accepted only for TOKENIZATION and NETWORK_TOKENIZATION; their payment-event price is perTxnFeePercent/perTxnFeeFixed.",
            "format": "int64",
            "type": "integer"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "perTxnFeeFixed": {
            "format": "int64",
            "type": "integer"
          },
          "perTxnFeePercent": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "enablementFee",
          "featureGroup",
          "monthlyFee",
          "perTxnFeeFixed",
          "perTxnFeePercent"
        ],
        "type": "object"
      },
      "RateCardGroupResponse": {
        "properties": {
          "activeVersion": {
            "$ref": "#/components/schemas/AgentRateCardResponse"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ownerId": {
            "nullable": true,
            "type": "string"
          },
          "ownerType": {
            "$ref": "#/components/schemas/RateCardOwnerType"
          },
          "platformDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "activeVersion",
          "id",
          "name",
          "ownerType",
          "platformDefault"
        ],
        "type": "object"
      },
      "RateCardOwnerType": {
        "enum": [
          "PLATFORM",
          "AGENT"
        ],
        "type": "string"
      },
      "RateHistoryBaselineObservation": {
        "properties": {
          "effectiveAt": {
            "format": "date-time",
            "type": "string"
          },
          "ownerAgentId": {
            "nullable": true,
            "type": "string"
          },
          "rateGroupId": {
            "nullable": true,
            "type": "string"
          },
          "transitionId": {
            "type": "string"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "effectiveAt",
          "transitionId"
        ],
        "type": "object"
      },
      "SetAppGrantRequest": {
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "UpdateAgentRequest": {
        "properties": {
          "contactEmail": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateAgentUserRoleRequest": {
        "properties": {
          "role": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "UpsertRateCardRequest": {
        "properties": {
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "nullable": true,
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AgentAccess": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "role"
        ],
        "type": "object"
      },
      "ApiKey": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "lastUsedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/ApiKeyStatus"
          }
        },
        "required": [
          "createdAt",
          "id",
          "keyPrefix",
          "scopes",
          "status"
        ],
        "type": "object"
      },
      "ApiKeyCreateResponse": {
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "apiKey",
          "id",
          "keyPrefix",
          "scopes"
        ],
        "type": "object"
      },
      "ApiKeyStatus": {
        "enum": [
          "ACTIVE",
          "REVOKED"
        ],
        "type": "string"
      },
      "ApiKeyTokenExchangeResponse": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_in",
          "scope",
          "token_type"
        ],
        "type": "object"
      },
      "CreateApiKeyRequest": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 0,
            "type": "array"
          }
        },
        "required": [
          "scopes"
        ],
        "type": "object"
      },
      "EmailVerificationResendResponse": {
        "properties": {
          "alreadyVerified": {
            "type": "boolean"
          },
          "emailSent": {
            "type": "boolean"
          }
        },
        "required": [
          "alreadyVerified",
          "emailSent"
        ],
        "type": "object"
      },
      "LocationAccess": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "role"
        ],
        "type": "object"
      },
      "MeResponse": {
        "properties": {
          "agentAccess": {
            "items": {
              "$ref": "#/components/schemas/AgentAccess"
            },
            "type": "array"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "locationAccess": {
            "items": {
              "$ref": "#/components/schemas/LocationAccess"
            },
            "type": "array"
          },
          "organizationAccess": {
            "items": {
              "$ref": "#/components/schemas/OrganizationAccess"
            },
            "type": "array"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "role": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "permissions",
          "userId"
        ],
        "type": "object"
      },
      "OrganizationAccess": {
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "role"
        ],
        "type": "object"
      },
      "RotateApiKeyRequest": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "TokenExchangeRequest": {
        "properties": {
          "audience": {
            "type": "string"
          },
          "grant_type": {
            "type": "string"
          },
          "requested_token_type": {
            "nullable": true,
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "subject_token": {
            "type": "string"
          },
          "subject_token_type": {
            "type": "string"
          }
        },
        "required": [
          "audience",
          "grant_type",
          "resource",
          "scope",
          "subject_token",
          "subject_token_type"
        ],
        "type": "object"
      },
      "TokenExchangeResponse": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "format": "int64",
            "type": "integer"
          },
          "issued_token_type": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_in",
          "issued_token_type",
          "scope",
          "token_type"
        ],
        "type": "object"
      },
      "ApiScope": {
        "type": "string",
        "enum": [
          "agent-rates:read",
          "agent-rates:write",
          "agents:read",
          "agents:write",
          "api-keys:read",
          "api-keys:write",
          "billing:read",
          "billing:write",
          "card-intelligence:read",
          "coupons:read",
          "coupons:write",
          "credential-profiles:read",
          "credential-profiles:write",
          "customer-contacts:read",
          "customer-contacts:write",
          "customer-oauth-clients:read",
          "customers:read",
          "customers:write",
          "dashboard:read",
          "devices:read",
          "devices:write",
          "event-subscriptions:read",
          "event-subscriptions:write",
          "external-capabilities:read",
          "fraud-audit:read",
          "fraud-decisions:read",
          "fraud-lists:read",
          "fraud-lists:write",
          "fraud-reviews:decide",
          "fraud-reviews:read",
          "fraud-rules:read",
          "fraud-rules:write",
          "gift_cards:read",
          "gift_cards:write",
          "hosted-payments:read",
          "hosted-payments:write",
          "impersonation:write",
          "mcp:dunning",
          "mcp:read",
          "mcp:refund",
          "mcp:write",
          "merchant-audit:read",
          "merchant:activate",
          "merchants:read",
          "merchants:write",
          "mid-utilization:read",
          "mid-utilization:write",
          "organizations:delete",
          "organizations:read",
          "organizations:write",
          "prices:read",
          "prices:write",
          "products:read",
          "products:write",
          "promo-codes:read",
          "promo-codes:write",
          "recovery:write",
          "reports:export",
          "reports:read",
          "reserves:read",
          "reserves:write",
          "routing-rules:read",
          "routing-rules:write",
          "settlements:close",
          "subscriptions:read",
          "subscriptions:write",
          "tax-config:write",
          "transactions:read",
          "transactions:write",
          "transit:password:read",
          "users:read",
          "users:write",
          "webhooks:manage",
          "webhooks:read",
          "webhooks:write"
        ]
      },
      "UserRole": {
        "type": "string",
        "enum": [
          "agent_admin",
          "agent_user",
          "location_admin",
          "location_user",
          "organization_admin",
          "readonly"
        ]
      },
      "AuditLogEntry": {
        "properties": {
          "action": {
            "type": "string"
          },
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "details": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "impersonationSessionId": {
            "nullable": true,
            "type": "string"
          },
          "ipAddress": {
            "nullable": true,
            "type": "string"
          },
          "resourceId": {
            "nullable": true,
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "routingCommandId": {
            "nullable": true,
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "userEmail": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "action",
          "id",
          "timestamp"
        ],
        "type": "object"
      },
      "FraudAuditLogPage": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "hasMore",
          "items"
        ],
        "type": "object"
      },
      "MerchantAuditLogPage": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "hasMore",
          "items"
        ],
        "type": "object"
      },
      "AgentBillingSummaryResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/AgentBillingSummaryRow"
            },
            "type": "array"
          },
          "periodEnd": {
            "format": "date",
            "type": "string"
          },
          "periodStart": {
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "organizations",
          "periodEnd",
          "periodStart"
        ],
        "type": "object"
      },
      "AgentBillingSummaryRow": {
        "properties": {
          "achTxnCount": {
            "format": "int64",
            "type": "integer"
          },
          "achVolume": {
            "format": "int64",
            "type": "integer"
          },
          "cardNotPresentTxnCount": {
            "format": "int64",
            "type": "integer"
          },
          "cardNotPresentVolume": {
            "format": "int64",
            "type": "integer"
          },
          "cardPresentVolume": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "netAmount": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "totalRefunds": {
            "format": "int64",
            "type": "integer"
          },
          "totalSales": {
            "format": "int64",
            "type": "integer"
          },
          "txnCount": {
            "format": "int64",
            "type": "integer"
          },
          "volume": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "achTxnCount",
          "achVolume",
          "cardNotPresentTxnCount",
          "cardNotPresentVolume",
          "cardPresentVolume",
          "currency",
          "netAmount",
          "organizationId",
          "totalRefunds",
          "totalSales",
          "txnCount",
          "volume"
        ],
        "type": "object"
      },
      "AgentEffectiveRateCardsResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "buyRate": {
            "$ref": "#/components/schemas/EffectiveRateChainEntry",
            "nullable": true
          },
          "sellRates": {
            "items": {
              "$ref": "#/components/schemas/EffectiveRateChainEntry"
            },
            "type": "array"
          }
        },
        "required": [
          "agentId",
          "sellRates"
        ],
        "type": "object"
      },
      "AgentProcessingRateSnapshotsResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "buyRateChain": {
            "items": {
              "$ref": "#/components/schemas/ProcessingRateSnapshotEntry"
            },
            "type": "array"
          },
          "feeFormulaVersion": {
            "format": "int32",
            "type": "integer"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sellUsageSegments": {
            "items": {
              "$ref": "#/components/schemas/ProcessingRateSellUsageSegment"
            },
            "type": "array"
          },
          "snapshotSchemaVersion": {
            "format": "int32",
            "type": "integer"
          },
          "to": {
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "buyRateChain",
          "feeFormulaVersion",
          "from",
          "organizationId",
          "sellUsageSegments",
          "snapshotSchemaVersion",
          "to"
        ],
        "type": "object"
      },
      "AgentResidualChargeKind": {
        "enum": [
          "BASE_MONTHLY",
          "ENABLEMENT",
          "MONTHLY",
          "PER_TRANSACTION",
          "ACH_RETURN_CORRECTION",
          "ACH_RECOLLECTION_REVERSAL",
          "LATE_PAYMENT_CORRECTION"
        ],
        "type": "string"
      },
      "AgentResidualLine": {
        "properties": {
          "buyAmount": {
            "format": "int64",
            "type": "integer"
          },
          "chargeKind": {
            "$ref": "#/components/schemas/AgentResidualChargeKind"
          },
          "correctionEventId": {
            "nullable": true,
            "type": "string"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup",
            "nullable": true
          },
          "organizationId": {
            "type": "string"
          },
          "quantity": {
            "format": "int64",
            "type": "integer"
          },
          "residual": {
            "format": "int64",
            "type": "integer"
          },
          "sellAmount": {
            "format": "int64",
            "type": "integer"
          },
          "sourceChargeId": {
            "nullable": true,
            "type": "string"
          },
          "sourceInvoiceId": {
            "nullable": true,
            "type": "string"
          },
          "sourcePeriod": {
            "nullable": true,
            "type": "string"
          },
          "volume": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "buyAmount",
          "chargeKind",
          "organizationId",
          "quantity",
          "residual",
          "sellAmount",
          "volume"
        ],
        "type": "object"
      },
      "AgentResidualStatementResponse": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "buyRateCardVersionId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/AgentResidualLine"
            },
            "type": "array"
          },
          "paidOutAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "paidOutBy": {
            "nullable": true,
            "type": "string"
          },
          "payoutReference": {
            "nullable": true,
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentResidualStatementStatus"
          },
          "totalBuy": {
            "format": "int64",
            "type": "integer"
          },
          "totalResidual": {
            "format": "int64",
            "type": "integer"
          },
          "totalSell": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "buyRateCardVersionId",
          "createdAt",
          "lines",
          "period",
          "status",
          "totalBuy",
          "totalResidual",
          "totalSell",
          "updatedAt"
        ],
        "type": "object"
      },
      "AgentResidualStatementStatus": {
        "enum": [
          "OPEN",
          "FINALIZED",
          "PAID_OUT"
        ],
        "type": "string"
      },
      "AgentSettlementBatchResponse": {
        "properties": {
          "batchDate": {
            "format": "date",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "netAmount": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalRefunds": {
            "format": "int64",
            "type": "integer"
          },
          "totalSales": {
            "format": "int64",
            "type": "integer"
          },
          "txnCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "batchDate",
          "currency",
          "id",
          "merchantId",
          "netAmount",
          "organizationId",
          "status",
          "totalRefunds",
          "totalSales",
          "txnCount"
        ],
        "type": "object"
      },
      "BillingBankAccountType": {
        "enum": [
          "CHECKING",
          "SAVINGS"
        ],
        "type": "string"
      },
      "BillingChannel": {
        "enum": [
          "CARD_PRESENT",
          "CARD_NOT_PRESENT",
          "ACH"
        ],
        "type": "string"
      },
      "EffectiveRateChainEntry": {
        "properties": {
          "assignmentSource": {
            "$ref": "#/components/schemas/RateCardAssignmentSource"
          },
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "rateCardGroupId": {
            "nullable": true,
            "type": "string"
          },
          "rateCardGroupName": {
            "nullable": true,
            "type": "string"
          },
          "setByAgentId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "assignmentSource",
          "billingCycleDay",
          "effectiveFrom",
          "featureFees",
          "monthlyFee",
          "status",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "EnablementChargeStatus": {
        "enum": [
          "PENDING",
          "CHARGED"
        ],
        "type": "string"
      },
      "InvoiceFeatureChargeKind": {
        "enum": [
          "ENABLEMENT",
          "MONTHLY",
          "PER_TRANSACTION"
        ],
        "type": "string"
      },
      "InvoiceFeatureLine": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "chargeKind": {
            "$ref": "#/components/schemas/InvoiceFeatureChargeKind"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "lineId": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int64",
            "type": "integer"
          },
          "rateCardVersionId": {
            "nullable": true,
            "type": "string"
          },
          "unitFixed": {
            "format": "int64",
            "type": "integer"
          },
          "unitPercent": {
            "format": "int64",
            "type": "integer"
          },
          "volume": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "chargeKind",
          "featureGroup",
          "quantity",
          "unitFixed",
          "unitPercent",
          "volume"
        ],
        "type": "object"
      },
      "InvoicePricingGap": {
        "properties": {
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "excludedSaleAmountMinorUnits": {
            "description": "Feature-attributed settled sale amount excluded from USD billing, in currency minor units.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "excludedSaleCount": {
            "description": "Feature-attributed settled sale count excluded from USD billing for featureGroup and currency.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "featureGroup",
          "reason"
        ],
        "type": "object"
      },
      "LocationInvoiceUsage": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/BillingChannel"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "settledCount": {
            "format": "int64",
            "type": "integer"
          },
          "settledVolume": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "locationId",
          "settledCount",
          "settledVolume"
        ],
        "type": "object"
      },
      "MerchantBillingBankAccount": {
        "properties": {
          "accountType": {
            "$ref": "#/components/schemas/BillingBankAccountType"
          },
          "last4": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MerchantBillingBankAccountStatus"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "accountType",
          "last4",
          "organizationId",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "MerchantBillingBankAccountStatus": {
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ],
        "type": "string"
      },
      "MerchantFeeInvoice": {
        "properties": {
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/MerchantFeeInvoiceAttempt"
            },
            "type": "array"
          },
          "blockedReason": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "dunningAttempts": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "featureFeeTotal": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "featureLines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceFeatureLine"
            },
            "type": "array"
          },
          "gatewayChargeId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "issuedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "locationUsage": {
            "items": {
              "$ref": "#/components/schemas/LocationInvoiceUsage"
            },
            "nullable": true,
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "nextAttemptAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "paid": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "paidAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "periodEndExclusive": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pricingGaps": {
            "items": {
              "$ref": "#/components/schemas/InvoicePricingGap"
            },
            "type": "array"
          },
          "rateCardVersionId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MerchantFeeInvoiceStatus",
            "nullable": true
          },
          "total": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unclassifiedPricingGaps": {
            "items": {
              "$ref": "#/components/schemas/UnclassifiedInvoicePricingGap"
            },
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "voidReason": {
            "nullable": true,
            "type": "string"
          },
          "voidedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "voidedBy": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "createdAt",
          "featureLines",
          "id",
          "organizationId",
          "period",
          "pricingGaps",
          "updatedAt"
        ],
        "type": "object"
      },
      "MerchantFeeInvoiceAttempt": {
        "properties": {
          "attempt": {
            "format": "int32",
            "type": "integer"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/MerchantFeeInvoiceAttemptOutcome"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "attempt",
          "outcome",
          "startedAt"
        ],
        "type": "object"
      },
      "MerchantFeeInvoiceAttemptOutcome": {
        "enum": [
          "APPROVED",
          "DECLINED",
          "UNKNOWN",
          "BLOCKED",
          "RETURNED"
        ],
        "type": "string"
      },
      "MerchantFeeInvoiceStatus": {
        "enum": [
          "draft",
          "issued",
          "collecting",
          "paid",
          "past_due",
          "blocked",
          "void"
        ],
        "type": "string"
      },
      "MerchantRateSchedule": {
        "properties": {
          "billingCycleDay": {
            "format": "int32",
            "type": "integer"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "featureFees": {
            "items": {
              "$ref": "#/components/schemas/RateCardFeatureFee"
            },
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/RateCardAssignmentSource"
          },
          "status": {
            "$ref": "#/components/schemas/MerchantRateScheduleStatus"
          }
        },
        "required": [
          "billingCycleDay",
          "effectiveFrom",
          "featureFees",
          "monthlyFee",
          "organizationId",
          "source",
          "status"
        ],
        "type": "object"
      },
      "MerchantRateScheduleStatus": {
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ],
        "type": "string"
      },
      "OrganizationFeatureEntitlement": {
        "properties": {
          "billingStartedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "collectionConfigured": {
            "nullable": true,
            "type": "boolean"
          },
          "effective": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "enablementChargeStatus": {
            "$ref": "#/components/schemas/EnablementChargeStatus",
            "nullable": true
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "firstEnabledAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "platformEnabled": {
            "type": "boolean"
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "collectionConfigured",
          "effective",
          "enabled",
          "featureGroup",
          "organizationId",
          "platformEnabled"
        ],
        "type": "object"
      },
      "PaginatedResponseAgentResidualStatementResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentResidualStatementResponse"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseAgentSettlementBatchResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentSettlementBatchResponse"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "ProcessingRateSellUsageSegment": {
        "properties": {
          "cardNotPresentTxnCount": {
            "format": "int64",
            "type": "integer"
          },
          "cardNotPresentVolumeCents": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntilExclusive": {
            "format": "date-time",
            "type": "string"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "monthlyFeeCents": {
            "format": "int64",
            "type": "integer"
          },
          "perTxnFixedCents": {
            "format": "int64",
            "type": "integer"
          },
          "percentRateUnits": {
            "format": "int64",
            "type": "integer"
          },
          "rateCardGroupId": {
            "type": "string"
          },
          "rateCardVersionId": {
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/ProcessingRateSide"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "$ref": "#/components/schemas/ProcessingRateSubjectType"
          }
        },
        "required": [
          "cardNotPresentTxnCount",
          "cardNotPresentVolumeCents",
          "currency",
          "effectiveFrom",
          "effectiveUntilExclusive",
          "featureGroup",
          "monthlyFeeCents",
          "perTxnFixedCents",
          "percentRateUnits",
          "rateCardGroupId",
          "rateCardVersionId",
          "side",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "ProcessingRateSide": {
        "enum": [
          "BUY",
          "SELL"
        ],
        "type": "string"
      },
      "ProcessingRateSnapshotEntry": {
        "properties": {
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntilExclusive": {
            "format": "date-time",
            "type": "string"
          },
          "featureGroup": {
            "$ref": "#/components/schemas/BillingFeatureGroup"
          },
          "monthlyFeeCents": {
            "format": "int64",
            "type": "integer"
          },
          "perTxnFixedCents": {
            "format": "int64",
            "type": "integer"
          },
          "percentRateUnits": {
            "format": "int64",
            "type": "integer"
          },
          "rateCardGroupId": {
            "type": "string"
          },
          "rateCardVersionId": {
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/ProcessingRateSide"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "$ref": "#/components/schemas/ProcessingRateSubjectType"
          }
        },
        "required": [
          "effectiveFrom",
          "effectiveUntilExclusive",
          "featureGroup",
          "monthlyFeeCents",
          "perTxnFixedCents",
          "percentRateUnits",
          "rateCardGroupId",
          "rateCardVersionId",
          "side",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "ProcessingRateSubjectType": {
        "enum": [
          "AGENT",
          "ORGANIZATION"
        ],
        "type": "string"
      },
      "RateCardAssignmentSource": {
        "enum": [
          "PLATFORM_TEMPLATE",
          "EXPLICIT_AGENT_BUY",
          "INHERITED_PARENT_DEFAULT",
          "AGENT_DEFAULT",
          "EXPLICIT_ORGANIZATION",
          "INHERITED_AGENT_DEFAULT"
        ],
        "type": "string"
      },
      "UnclassifiedInvoicePricingGap": {
        "properties": {
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "unattributedSaleAmountMinorUnits": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unattributedSaleCount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "BinLookupMatch": {
        "properties": {
          "brand": {
            "nullable": true,
            "type": "string"
          },
          "fundingSource": {
            "nullable": true,
            "type": "string"
          },
          "issuerCountry": {
            "nullable": true,
            "type": "string"
          },
          "issuerName": {
            "nullable": true,
            "type": "string"
          },
          "prepaid": {
            "nullable": true,
            "type": "boolean"
          },
          "productCode": {
            "nullable": true,
            "type": "string"
          },
          "productName": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/BinLookupSource"
          },
          "sourceVersion": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "source"
        ],
        "type": "object"
      },
      "BinLookupRequest": {
        "properties": {
          "binPrefix": {
            "type": "string"
          }
        },
        "required": [
          "binPrefix"
        ],
        "type": "object"
      },
      "BinLookupResponse": {
        "properties": {
          "ambiguous": {
            "type": "boolean"
          },
          "binPrefix": {
            "type": "string"
          },
          "matches": {
            "items": {
              "$ref": "#/components/schemas/BinLookupMatch"
            },
            "type": "array"
          }
        },
        "required": [
          "ambiguous",
          "binPrefix",
          "matches"
        ],
        "type": "object"
      },
      "BinLookupSource": {
        "enum": [
          "OFFLINE_SNAPSHOT",
          "NETWORK_AUTHORITY"
        ],
        "type": "string"
      },
      "AdditionalTaxDetail": {
        "properties": {
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "taxCategory": {
            "$ref": "#/components/schemas/TaxCategory"
          },
          "taxRate": {
            "nullable": true,
            "type": "string"
          },
          "taxType": {
            "$ref": "#/components/schemas/TaxType"
          }
        },
        "required": [
          "taxAmount",
          "taxCategory",
          "taxType"
        ],
        "type": "object"
      },
      "BatchStatus": {
        "enum": [
          "OPEN",
          "CLOSE_REQUESTED",
          "CLOSE_UNCONFIRMED",
          "CLOSED_AWAITING_VERIFICATION",
          "CLOSE_REJECTED",
          "SETTLED",
          "REVIEW_REQUIRED",
          "RECONCILIATION_MISMATCH",
          "FORCE_CLOSED"
        ],
        "type": "string"
      },
      "BoltAuthorizeRequest": {
        "properties": {
          "aid": {
            "nullable": true,
            "type": "string"
          },
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "externalReferenceId": {
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "includePIN": {
            "nullable": true,
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "orderId": {
            "maxLength": 19,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "tipAmountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "externalReferenceId",
          "hsn"
        ],
        "type": "object"
      },
      "BoltBindTerminalRequest": {
        "properties": {
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "verifyDevice": {
            "type": "boolean"
          }
        },
        "required": [
          "hsn"
        ],
        "type": "object"
      },
      "BoltCancelRequest": {
        "properties": {
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "hsn"
        ],
        "type": "object"
      },
      "BoltDateTimeResult": {
        "properties": {
          "dateTime": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltDisplayTextRequest": {
        "properties": {
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "text": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "hsn",
          "text"
        ],
        "type": "object"
      },
      "BoltEntryMode": {
        "enum": [
          "A",
          "M",
          "S",
          "K",
          "?"
        ],
        "type": "string"
      },
      "BoltIntentReviewResolutionRequest": {
        "properties": {
          "disposition": {
            "$ref": "#/components/schemas/BoltReviewResolution"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "disposition"
        ],
        "type": "object"
      },
      "BoltManualAuthRequest": {
        "properties": {
          "aid": {
            "nullable": true,
            "type": "string"
          },
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "capture": {
            "type": "boolean"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "externalReferenceId": {
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "includeCVV": {
            "nullable": true,
            "type": "boolean"
          },
          "includePIN": {
            "nullable": true,
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "orderId": {
            "maxLength": 19,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "externalReferenceId",
          "hsn"
        ],
        "type": "object"
      },
      "BoltPingResult": {
        "properties": {
          "latencyMs": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "reachable": {
            "type": "boolean"
          }
        },
        "required": [
          "reachable"
        ],
        "type": "object"
      },
      "BoltPrintReceiptApiRequest": {
        "properties": {
          "authMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "orderId": {
            "maxLength": 19,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "printDelay": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "printExtraReceipt": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "hsn",
          "orderId"
        ],
        "type": "object"
      },
      "BoltPrintReceiptResult": {
        "properties": {
          "receiptData": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          }
        },
        "type": "object"
      },
      "BoltReadCardApiRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "confirmAmount": {
            "nullable": true,
            "type": "boolean"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "includeSignature": {
            "nullable": true,
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "hsn"
        ],
        "type": "object"
      },
      "BoltReadCardResult": {
        "properties": {
          "entryMode": {
            "$ref": "#/components/schemas/BoltEntryMode",
            "nullable": true
          },
          "expiry": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltReadConfirmationApiRequest": {
        "properties": {
          "beep": {
            "nullable": true,
            "type": "boolean"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "prompt": {
            "maxLength": 16,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "hsn",
          "prompt"
        ],
        "type": "object"
      },
      "BoltReadConfirmationResult": {
        "properties": {
          "confirmed": {
            "type": "boolean"
          }
        },
        "required": [
          "confirmed"
        ],
        "type": "object"
      },
      "BoltReadInputApiRequest": {
        "properties": {
          "beep": {
            "nullable": true,
            "type": "boolean"
          },
          "format": {
            "minLength": 1,
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "prompt": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "format",
          "hsn"
        ],
        "type": "object"
      },
      "BoltReadInputResult": {
        "properties": {
          "input": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltReadManualApiRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "beep": {
            "nullable": true,
            "type": "boolean"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "includeExpirationDate": {
            "nullable": true,
            "type": "boolean"
          },
          "includeSignature": {
            "nullable": true,
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "hsn"
        ],
        "type": "object"
      },
      "BoltReadSignatureApiRequest": {
        "properties": {
          "beep": {
            "nullable": true,
            "type": "boolean"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "prompt": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "hsn"
        ],
        "type": "object"
      },
      "BoltReadSignatureResult": {
        "properties": {
          "signature": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltRepointTerminalRequest": {
        "properties": {
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "targetMerchantId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "targetMerchantId"
        ],
        "type": "object"
      },
      "BoltReviewIntentSummary": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": "string"
          },
          "hsn": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "transactionType": {
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "externalReferenceId",
          "hsn",
          "merchantId",
          "orderId",
          "transactionType"
        ],
        "type": "object"
      },
      "BoltReviewResolution": {
        "enum": [
          "APPROVED_RECORDED",
          "DECLINED_RECORDED",
          "NO_EFFECT"
        ],
        "type": "string"
      },
      "BoltSaleRequest": {
        "properties": {
          "aid": {
            "nullable": true,
            "type": "string"
          },
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "externalReferenceId": {
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "includePIN": {
            "nullable": true,
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "orderId": {
            "maxLength": 19,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "tipAmountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "externalReferenceId",
          "hsn"
        ],
        "type": "object"
      },
      "BoltSignatureCaptureRequest": {
        "properties": {
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "retref": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "hsn",
          "retref"
        ],
        "type": "object"
      },
      "BoltSignatureCaptureResult": {
        "properties": {
          "attached": {
            "type": "boolean"
          },
          "respstat": {
            "nullable": true,
            "type": "string"
          },
          "resptext": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "attached"
        ],
        "type": "object"
      },
      "BoltTerminalDateTimeRequest": {
        "properties": {
          "dateTime": {
            "minLength": 1,
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "dateTime",
          "hsn"
        ],
        "type": "object"
      },
      "BoltTerminalDetail": {
        "properties": {
          "features": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "hsn": {
            "nullable": true,
            "type": "string"
          },
          "model": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltTerminalDetailsResult": {
        "properties": {
          "terminals": {
            "items": {
              "$ref": "#/components/schemas/BoltTerminalDetail"
            },
            "type": "array"
          }
        },
        "required": [
          "terminals"
        ],
        "type": "object"
      },
      "BoltTerminalLifecycleRequest": {
        "properties": {
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BoltTerminalOpRequest": {
        "properties": {
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "hsn"
        ],
        "type": "object"
      },
      "BoltTerminalStatus": {
        "enum": [
          "ACTIVE",
          "SUSPENDED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "BoltTerminalSummary": {
        "properties": {
          "cardpointeMid": {
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "hsn": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BoltTerminalStatus"
          }
        },
        "required": [
          "cardpointeMid",
          "hsn",
          "merchantId",
          "status"
        ],
        "type": "object"
      },
      "BoltTipApiRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "prompt": {
            "minLength": 1,
            "type": "string"
          },
          "tipPercentPresets": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "amountMinor",
          "hsn",
          "prompt",
          "tipPercentPresets"
        ],
        "type": "object"
      },
      "BoltTipResult": {
        "properties": {
          "tipAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BoltTokenizeCardRequest": {
        "properties": {
          "consentAccepted": {
            "type": "boolean"
          },
          "consentPolicyVersion": {
            "minLength": 1,
            "type": "string"
          },
          "customerId": {
            "minLength": 1,
            "type": "string"
          },
          "hsn": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "consentAccepted",
          "consentPolicyVersion",
          "customerId",
          "hsn"
        ],
        "type": "object"
      },
      "BoltTokenizeCardResult": {
        "properties": {
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "savedPaymentMethodId": {
            "type": "string"
          }
        },
        "required": [
          "savedPaymentMethodId"
        ],
        "type": "object"
      },
      "BoltTransactionResult": {
        "properties": {
          "authCode": {
            "nullable": true,
            "type": "string"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "respcode": {
            "nullable": true,
            "type": "string"
          },
          "resptext": {
            "nullable": true,
            "type": "string"
          },
          "retref": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BoltTransactionStatus"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "BoltTransactionStatus": {
        "enum": [
          "APPROVED",
          "DECLINED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "BoltVendorTerminalBindingState": {
        "enum": [
          "BOUND_HERE",
          "BOUND_ELSEWHERE",
          "UNBOUND"
        ],
        "type": "string"
      },
      "BoltVendorTerminalEntry": {
        "properties": {
          "bindingState": {
            "$ref": "#/components/schemas/BoltVendorTerminalBindingState"
          },
          "hsn": {
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BoltTerminalStatus",
            "nullable": true
          }
        },
        "required": [
          "bindingState",
          "hsn"
        ],
        "type": "object"
      },
      "BoltVendorTerminalsResult": {
        "properties": {
          "cardpointeMid": {
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "terminals": {
            "items": {
              "$ref": "#/components/schemas/BoltVendorTerminalEntry"
            },
            "type": "array"
          }
        },
        "required": [
          "cardpointeMid",
          "credentialProfileId",
          "terminals"
        ],
        "type": "object"
      },
      "CaptureOperationEvidence": {
        "properties": {
          "capturedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "claimId": {
            "nullable": true,
            "type": "string"
          },
          "effectiveAt": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/TransactionOperationOutcome"
          },
          "processorAttemptId": {
            "nullable": true,
            "type": "string"
          },
          "requestedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "effectiveAt",
          "operationId",
          "outcome",
          "requestedAmount",
          "transactionId"
        ],
        "type": "object"
      },
      "CardDataSource": {
        "enum": [
          "MANUAL",
          "SWIPE",
          "FALLBACK_SWIPE",
          "EMV",
          "CONTACTLESS",
          "TOKEN",
          "INTERNET",
          "PHONE",
          "MAIL"
        ],
        "type": "string"
      },
      "CardPresentAuthRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "cardData": {
            "$ref": "#/components/schemas/CardPresentCardData"
          },
          "cardDataSource": {
            "minLength": 1,
            "type": "string"
          },
          "cardPresent": {
            "$ref": "#/components/schemas/CardPresentPayload",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "externalReferenceId": {
            "minLength": 1,
            "type": "string"
          },
          "industryType": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "amount",
          "cardData",
          "cardDataSource",
          "currency",
          "externalReferenceId",
          "industryType"
        ],
        "type": "object"
      },
      "CardPresentCardData": {
        "properties": {
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardPresentEbtPayload": {
        "properties": {
          "benefitType": {
            "type": "string"
          },
          "ksn": {
            "nullable": true,
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "type": "string"
          },
          "pinBlock": {
            "nullable": true,
            "type": "string"
          },
          "pinKsn": {
            "nullable": true,
            "type": "string"
          },
          "track2Data": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "benefitType"
        ],
        "type": "object"
      },
      "CardPresentPayload": {
        "properties": {
          "cardDataInputMode": {
            "nullable": true,
            "type": "string"
          },
          "cardDataOutputCapability": {
            "nullable": true,
            "type": "string"
          },
          "cardPresentDetail": {
            "nullable": true,
            "type": "string"
          },
          "cardholderAuthenticationEntity": {
            "nullable": true,
            "type": "string"
          },
          "cardholderAuthenticationMethod": {
            "nullable": true,
            "type": "string"
          },
          "cardholderPresentDetail": {
            "nullable": true,
            "type": "string"
          },
          "chipConditionCode": {
            "nullable": true,
            "type": "string"
          },
          "emvFallbackReason": {
            "nullable": true,
            "type": "string"
          },
          "emvTags": {
            "nullable": true,
            "type": "string"
          },
          "maxPinLength": {
            "nullable": true,
            "type": "string"
          },
          "terminalAuthenticationCapability": {
            "nullable": true,
            "type": "string"
          },
          "terminalCapability": {
            "nullable": true,
            "type": "string"
          },
          "terminalCardCaptureCapability": {
            "nullable": true,
            "type": "string"
          },
          "terminalOperatingEnvironment": {
            "nullable": true,
            "type": "string"
          },
          "terminalOutputCapability": {
            "nullable": true,
            "type": "string"
          },
          "track2Data": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardPresentPinDebitPayload": {
        "properties": {
          "emvFallbackCondition": {
            "nullable": true,
            "type": "string"
          },
          "emvTags": {
            "nullable": true,
            "type": "string"
          },
          "ksn": {
            "nullable": true,
            "type": "string"
          },
          "lastChipRead": {
            "nullable": true,
            "type": "string"
          },
          "paymentAppVersion": {
            "nullable": true,
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "type": "string"
          },
          "pinKsn": {
            "nullable": true,
            "type": "string"
          },
          "track2Data": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardPresentSaleRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "cardData": {
            "$ref": "#/components/schemas/CardPresentCardData"
          },
          "cardDataSource": {
            "minLength": 1,
            "type": "string"
          },
          "cardPresent": {
            "$ref": "#/components/schemas/CardPresentPayload",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "ebt": {
            "$ref": "#/components/schemas/CardPresentEbtPayload",
            "nullable": true
          },
          "externalReferenceId": {
            "minLength": 1,
            "type": "string"
          },
          "industryType": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "pinDebit": {
            "$ref": "#/components/schemas/CardPresentPinDebitPayload",
            "nullable": true
          }
        },
        "required": [
          "amount",
          "cardData",
          "cardDataSource",
          "currency",
          "externalReferenceId",
          "industryType"
        ],
        "type": "object"
      },
      "CloudTerminalAttemptResponse": {
        "properties": {
          "externalReferenceId": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "result": {
            "$ref": "#/components/schemas/CloudTerminalTransactionResult",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/CloudTerminalAttemptStatus"
          }
        },
        "required": [
          "externalReferenceId",
          "provider",
          "status"
        ],
        "type": "object"
      },
      "CloudTerminalAttemptStatus": {
        "enum": [
          "REQUESTED",
          "PENDING",
          "UNKNOWN",
          "APPROVED",
          "DECLINED",
          "NOT_FOUND"
        ],
        "type": "string"
      },
      "CloudTerminalCancelRequest": {
        "properties": {
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "terminalId": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "provider",
          "terminalId"
        ],
        "type": "object"
      },
      "CloudTerminalCapability": {
        "enum": [
          "SALE",
          "AUTHORIZE",
          "CANCEL",
          "PIN_DEBIT"
        ],
        "type": "string"
      },
      "CloudTerminalLineItem": {
        "properties": {
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "productId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "unitPrice": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "name",
          "productId",
          "quantity",
          "totalAmount",
          "unitPrice"
        ],
        "type": "object"
      },
      "CloudTerminalPaymentRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "customerId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "externalReferenceId": {
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CloudTerminalLineItem"
            },
            "maxItems": 100,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "orderId": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "quoteId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "tender": {
            "$ref": "#/components/schemas/CloudTerminalTender"
          },
          "terminalId": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "externalReferenceId",
          "provider",
          "terminalId"
        ],
        "type": "object"
      },
      "CloudTerminalProvider": {
        "enum": [
          "NEXGO",
          "BOLT"
        ],
        "type": "string"
      },
      "CloudTerminalStatus": {
        "enum": [
          "ACTIVE",
          "INACTIVE",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "CloudTerminalSummary": {
        "properties": {
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/CloudTerminalCapability"
            },
            "type": "array",
            "uniqueItems": true
          },
          "displayLabel": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "providerStatus": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CloudTerminalStatus"
          },
          "terminalId": {
            "type": "string"
          }
        },
        "required": [
          "capabilities",
          "displayLabel",
          "provider",
          "status",
          "terminalId"
        ],
        "type": "object"
      },
      "CloudTerminalTender": {
        "enum": [
          "CARD",
          "PIN_DEBIT"
        ],
        "type": "string"
      },
      "CloudTerminalTransactionResult": {
        "properties": {
          "authorizationCode": {
            "nullable": true,
            "type": "string"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "providerReference": {
            "nullable": true,
            "type": "string"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CloudTerminalTransactionStatus"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "provider",
          "status"
        ],
        "type": "object"
      },
      "CloudTerminalTransactionStatus": {
        "enum": [
          "APPROVED",
          "DECLINED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "CommercialCardLevel": {
        "enum": [
          "LEVEL2",
          "LEVEL3"
        ],
        "type": "string"
      },
      "EnrichmentStatus": {
        "enum": [
          "PENDING",
          "APPLIED",
          "SKIPPED_PIN_DEBIT",
          "DISCARDED_INVALID",
          "PROCESSOR_DECLINED",
          "DEFERRED_UNCAPTURED_AUTH",
          "FAILED",
          "SKIPPED_CUTOFF",
          "ENRICHMENT_UNKNOWN"
        ],
        "type": "string"
      },
      "Level2Data": {
        "properties": {
          "chargeDescriptor": {
            "nullable": true,
            "type": "string"
          },
          "commercialCardLevel": {
            "$ref": "#/components/schemas/CommercialCardLevel",
            "nullable": true
          },
          "customerCode": {
            "nullable": true,
            "type": "string"
          },
          "customerRefID": {
            "nullable": true,
            "type": "string"
          },
          "purchaseOrder": {
            "nullable": true,
            "type": "string"
          },
          "shipToZip": {
            "nullable": true,
            "type": "string"
          },
          "supplierReferenceNumber": {
            "nullable": true,
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "taxIndicator": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Level3Data": {
        "properties": {
          "additionalTaxDetails": {
            "items": {
              "$ref": "#/components/schemas/AdditionalTaxDetail"
            },
            "type": "array"
          },
          "commercialCardLevel": {
            "$ref": "#/components/schemas/CommercialCardLevel",
            "nullable": true
          },
          "customerVATNumber": {
            "nullable": true,
            "type": "string"
          },
          "destinationCountryCode": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "dutyAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "freightAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/Level3LineItem"
            },
            "minItems": 1,
            "type": "array"
          },
          "orderDate": {
            "nullable": true,
            "type": "string"
          },
          "purchaseOrder": {
            "nullable": true,
            "type": "string"
          },
          "salesTax": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "shipFromZip": {
            "nullable": true,
            "type": "string"
          },
          "shipToZip": {
            "nullable": true,
            "type": "string"
          },
          "summaryCommodityCode": {
            "nullable": true,
            "type": "string"
          },
          "vatInvoice": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "lineItems"
        ],
        "type": "object"
      },
      "Level3LineItem": {
        "properties": {
          "commodityCode": {
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "discountName": {
            "nullable": true,
            "type": "string"
          },
          "discountPercentage": {
            "nullable": true,
            "type": "string"
          },
          "discountPriority": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "discountStackable": {
            "nullable": true,
            "type": "boolean"
          },
          "discountType": {
            "$ref": "#/components/schemas/ProductDiscountType",
            "nullable": true
          },
          "lineTotal": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "productCode": {
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "taxName": {
            "nullable": true,
            "type": "string"
          },
          "taxPercentage": {
            "nullable": true,
            "type": "string"
          },
          "unitCost": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PosTransactionContext": {
        "properties": {
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "posOperationKey": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "storeId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "terminalId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "posOperationKey",
          "storeId",
          "terminalId"
        ],
        "type": "object"
      },
      "ProductDiscountType": {
        "enum": [
          "AMOUNT",
          "PERCENTAGE"
        ],
        "type": "string"
      },
      "RoutingTerminalReason": {
        "enum": [
          "NETWORK_REATTEMPT_LIMIT",
          "FUTILE_CARD_HISTORY",
          "TOKENIZATION_CREDENTIAL_REJECTED"
        ],
        "type": "string"
      },
      "SyncRefundRequest": {
        "properties": {
          "cardBrand": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "entryMode": {
            "minLength": 1,
            "pattern": "[A-Za-z0-9][A-Za-z0-9 _/-]{0,63}",
            "type": "string"
          },
          "idempotencyKey": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "lastFour": {
            "minLength": 1,
            "pattern": "\\d{4}",
            "type": "string"
          },
          "originalGatewayTransactionId": {
            "minLength": 1,
            "type": "string"
          },
          "processorReferenceId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "processorTransactionId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "refundedAmount": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "refundedAt": {
            "format": "date-time",
            "type": "string"
          },
          "terminalId": {
            "minLength": 1,
            "type": "string"
          },
          "terminalTransactionId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          }
        },
        "required": [
          "cardBrand",
          "entryMode",
          "idempotencyKey",
          "lastFour",
          "originalGatewayTransactionId",
          "processorReferenceId",
          "refundedAmount",
          "refundedAt",
          "terminalId",
          "terminalTransactionId"
        ],
        "type": "object"
      },
      "SyncRefundResponse": {
        "properties": {
          "gatewayRefundTransactionId": {
            "type": "string"
          },
          "refundedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "remainingRefundableAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "gatewayRefundTransactionId",
          "refundedAmount",
          "remainingRefundableAmount"
        ],
        "type": "object"
      },
      "SyncReversalRequest": {
        "properties": {
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "idempotencyKey": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "originalGatewayTransactionId": {
            "minLength": 1,
            "type": "string"
          },
          "processorReferenceId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "processorTransactionId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "reversedAt": {
            "format": "date-time",
            "type": "string"
          },
          "terminalId": {
            "minLength": 1,
            "type": "string"
          },
          "terminalTransactionId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          }
        },
        "required": [
          "idempotencyKey",
          "originalGatewayTransactionId",
          "processorReferenceId",
          "reversedAt",
          "terminalId",
          "terminalTransactionId"
        ],
        "type": "object"
      },
      "SyncReversalResponse": {
        "properties": {
          "gatewayReversalTransactionId": {
            "type": "string"
          }
        },
        "required": [
          "gatewayReversalTransactionId"
        ],
        "type": "object"
      },
      "SyncStage": {
        "enum": [
          "INTENT",
          "CONFIRMATION"
        ],
        "type": "string"
      },
      "SyncTransactionContext": {
        "properties": {
          "amountPaidCard": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "amountPaidCash": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "changeDue": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "customerId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "notes": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "paymentMethod": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "processedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "storeId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "subtotalAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "transactionRef": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "transactionStatus": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SyncTransactionLineItem": {
        "properties": {
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "unitPrice": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SyncTransactionRequest": {
        "properties": {
          "authCode": {
            "nullable": true,
            "type": "string"
          },
          "authorizedAmount": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "authorizedAt": {
            "format": "date-time",
            "type": "string"
          },
          "bin": {
            "nullable": true,
            "pattern": "\\d{6,8}",
            "type": "string"
          },
          "cardBrand": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/SyncTransactionContext",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "customerReceipt": {
            "nullable": true,
            "type": "string"
          },
          "cvm": {
            "nullable": true,
            "type": "string"
          },
          "deviceInfoValidationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "emvAid": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "emvAppName": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "emvData": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "emvTsi": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "emvTvr": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "entryMode": {
            "nullable": true,
            "pattern": "[A-Za-z0-9][A-Za-z0-9 _/-]{0,63}",
            "type": "string"
          },
          "feeAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "firstFour": {
            "nullable": true,
            "pattern": "\\d{4}",
            "type": "string"
          },
          "gatewayTransactionId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "lastFour": {
            "nullable": true,
            "pattern": "\\d{4}",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SyncTransactionLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "merchantReceipt": {
            "nullable": true,
            "type": "string"
          },
          "message": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "originalOperationId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "par": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "paymentType": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "posContext": {
            "$ref": "#/components/schemas/PosTransactionContext",
            "nullable": true
          },
          "processorDeviceId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": ".*\\S.*",
            "type": "string"
          },
          "processorMerchantId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": ".*\\S.*",
            "type": "string"
          },
          "processorReferenceId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "processorTransactionId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "processorType": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "rawResponse": {
            "nullable": true,
            "type": "string"
          },
          "recoveryDeviceInfoValidationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "resultCode": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "serialNumber": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": ".*\\S.*",
            "type": "string"
          },
          "stage": {
            "$ref": "#/components/schemas/SyncStage"
          },
          "status": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "statusCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "terminalId": {
            "minLength": 1,
            "type": "string"
          },
          "terminalTransactionId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,255}$",
            "type": "string"
          },
          "tipAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "transactionType": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "authorizedAmount",
          "authorizedAt",
          "terminalId",
          "terminalTransactionId"
        ],
        "type": "object"
      },
      "SyncTransactionResponse": {
        "properties": {
          "bin": {
            "nullable": true,
            "type": "string"
          },
          "gatewayCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "par": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "transactionId"
        ],
        "type": "object"
      },
      "TaxCategory": {
        "enum": [
          "TAXABLE",
          "NON_TAXABLE"
        ],
        "type": "string"
      },
      "TaxType": {
        "enum": [
          "SALES_TAX",
          "VAT",
          "GST"
        ],
        "type": "string"
      },
      "Transaction": {
        "properties": {
          "achReturnCode": {
            "nullable": true,
            "type": "string"
          },
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "autoVoided": {
            "type": "boolean"
          },
          "avsResult": {
            "nullable": true,
            "type": "string"
          },
          "captureOperations": {
            "items": {
              "$ref": "#/components/schemas/CaptureOperationEvidence"
            },
            "type": "array"
          },
          "capturedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "cardBin": {
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardDataSource": {
            "$ref": "#/components/schemas/CardDataSource",
            "nullable": true
          },
          "cardIntelligence": {
            "$ref": "#/components/schemas/TransactionCardIntelligence",
            "nullable": true
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardTransactionIdentifier": {
            "nullable": true,
            "type": "string"
          },
          "cashDiscountAmount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "credentialProfileId": {
            "nullable": true,
            "type": "string"
          },
          "credentialProfileKeyVersion": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "cvvResult": {
            "nullable": true,
            "type": "string"
          },
          "declineCategory": {
            "nullable": true,
            "type": "string"
          },
          "detailsAvailability": {
            "$ref": "#/components/schemas/TransactionResponseDetailsAvailability",
            "nullable": true
          },
          "emvIssuerData": {
            "nullable": true,
            "type": "string"
          },
          "enrichmentStatus": {
            "$ref": "#/components/schemas/EnrichmentStatus",
            "nullable": true
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "gatewayCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "industryType": {
            "$ref": "#/components/schemas/TransactionIndustryType",
            "nullable": true
          },
          "isPinDebit": {
            "type": "boolean"
          },
          "level2": {
            "$ref": "#/components/schemas/Level2Data",
            "nullable": true
          },
          "level3": {
            "$ref": "#/components/schemas/Level3Data",
            "nullable": true
          },
          "lifecycle": {
            "$ref": "#/components/schemas/TransactionLifecycle",
            "nullable": true
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/TransactionLineItem"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "networkTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "noSendReason": {
            "nullable": true,
            "type": "string"
          },
          "operationOutcome": {
            "$ref": "#/components/schemas/TransactionOperationOutcome",
            "nullable": true
          },
          "operations": {
            "items": {
              "$ref": "#/components/schemas/TransactionOperationEvidence"
            },
            "type": "array"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "par": {
            "nullable": true,
            "type": "string"
          },
          "parentTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "partiallyApproved": {
            "type": "boolean"
          },
          "paymentLifecycleState": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processorBatchId": {
            "nullable": true,
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform",
            "nullable": true
          },
          "processorReference": {
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType",
            "nullable": true
          },
          "refundedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "remainingAuthorizedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "remainingRefundableAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "retryable": {
            "nullable": true,
            "type": "boolean"
          },
          "reversals": {
            "items": {
              "$ref": "#/components/schemas/TransactionReversalEvidence"
            },
            "type": "array"
          },
          "selectedTender": {
            "nullable": true,
            "type": "string"
          },
          "settledAt": {
            "description": "Settlement anchor used for billing; this is not necessarily the time the settlement batch closed. The anchor may be midnight on the settlement business date in the merchant time zone.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "settlementFinal": {
            "nullable": true,
            "type": "boolean"
          },
          "settlementObservedAt": {
            "description": "Instant when Gateway observed settlement. May be null for historical transactions.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "surchargeAmount": {
            "format": "int64",
            "type": "integer"
          },
          "terminalReason": {
            "$ref": "#/components/schemas/RoutingTerminalReason",
            "nullable": true
          },
          "tipAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionChannel": {
            "$ref": "#/components/schemas/TransactionChannel",
            "nullable": true
          },
          "transactionId": {
            "type": "string"
          },
          "transitTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "captureOperations",
          "currency",
          "lineItems",
          "merchantId",
          "operations",
          "reversals",
          "status",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "TransactionCardIntelligence": {
        "properties": {
          "brand": {
            "nullable": true,
            "type": "string"
          },
          "fundingSource": {
            "nullable": true,
            "type": "string"
          },
          "issuerCountry": {
            "nullable": true,
            "type": "string"
          },
          "issuerName": {
            "nullable": true,
            "type": "string"
          },
          "prepaid": {
            "nullable": true,
            "type": "boolean"
          },
          "productName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TransactionChannel": {
        "enum": [
          "VIRTUAL_TERMINAL",
          "ONLINE_CHECKOUT",
          "PAYMENT_LINK"
        ],
        "type": "string"
      },
      "TransactionIndustryType": {
        "enum": [
          "RE",
          "EC",
          "RS",
          "DM",
          "HC",
          "LD"
        ],
        "type": "string"
      },
      "TransactionLifecycle": {
        "properties": {
          "operations": {
            "items": {
              "$ref": "#/components/schemas/TransactionOperationAvailability"
            },
            "type": "array"
          },
          "settlementBatchId": {
            "nullable": true,
            "type": "string"
          },
          "settlementBatchStatus": {
            "$ref": "#/components/schemas/BatchStatus",
            "nullable": true
          },
          "settlementState": {
            "$ref": "#/components/schemas/TransactionSettlementState"
          }
        },
        "required": [
          "operations",
          "settlementState"
        ],
        "type": "object"
      },
      "TransactionLifecycleOperation": {
        "enum": [
          "CAPTURE",
          "VOID",
          "REFUND",
          "TIP_ADJUSTMENT",
          "INCREMENT_AUTH"
        ],
        "type": "string"
      },
      "TransactionLineItem": {
        "properties": {
          "commodityCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "lineTotal": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "productCode": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          },
          "unitPrice": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TransactionOperationAvailability": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "defaultAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "maxAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "minAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "operation": {
            "$ref": "#/components/schemas/TransactionLifecycleOperation"
          },
          "partialAmountSupported": {
            "type": "boolean"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "available",
          "operation"
        ],
        "type": "object"
      },
      "TransactionOperationEvidence": {
        "properties": {
          "operation": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/TransactionOperationOutcome"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "requestedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "requestedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "operation",
          "operationId",
          "outcome",
          "transactionId"
        ],
        "type": "object"
      },
      "TransactionOperationOutcome": {
        "enum": [
          "APPROVED",
          "DECLINED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "TransactionResponseDetailsAvailability": {
        "enum": [
          "AVAILABLE",
          "UNAVAILABLE_UNSAFE_PROVIDER_DATA",
          "UNAVAILABLE_PROTECTED_DETAILS",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "TransactionReversalEvidence": {
        "properties": {
          "autoVoided": {
            "type": "boolean"
          },
          "effectiveAt": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "originalApprovedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "outcome": {
            "$ref": "#/components/schemas/TransactionOperationOutcome"
          },
          "partiallyApproved": {
            "nullable": true,
            "type": "boolean"
          },
          "remainingAuthorizedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "remainingCapturedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "remainingRefundableAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "requestedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "reversedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "autoVoided",
          "effectiveAt",
          "operationId",
          "outcome",
          "transactionId"
        ],
        "type": "object"
      },
      "TransactionSettlementState": {
        "enum": [
          "OPEN",
          "SETTLED"
        ],
        "type": "string"
      },
      "TransactionStatus": {
        "enum": [
          "PENDING",
          "PENDING_CONFIRMATION",
          "EXPIRED_UNCONFIRMED",
          "FRAUD_BLOCKED",
          "FRAUD_HELD",
          "APPROVED",
          "DECLINED",
          "CANCELLED",
          "ERROR",
          "VOIDED",
          "CAPTURED",
          "TIP_ADJUSTED",
          "ENRICHED",
          "SETTLED",
          "REFUNDED",
          "REVERSED"
        ],
        "type": "string"
      },
      "TransactionType": {
        "enum": [
          "SALE",
          "AUTH",
          "CAPTURE",
          "VOID",
          "REFUND",
          "REVERSAL",
          "ADJUSTMENT",
          "TIP_ADJUSTMENT",
          "RECURRING",
          "FORCE_AUTH"
        ],
        "type": "string"
      },
      "ArchiveCatalogCategoryRequest": {
        "properties": {
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ArchiveProductRequest": {
        "properties": {
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CatalogCategory": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "parentId": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "id",
          "name",
          "organizationId",
          "syncVersion"
        ],
        "type": "object"
      },
      "CreateCatalogCategoryRequest": {
        "properties": {
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "externalId": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "parentId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateInitialPriceRequest": {
        "properties": {
          "billingInterval": {
            "nullable": true,
            "type": "string"
          },
          "commodityCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,63}$",
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "intervalCount": {
            "format": "int32",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "taxBehavior": {
            "$ref": "#/components/schemas/TaxBehavior"
          },
          "type": {
            "$ref": "#/components/schemas/PriceType"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitOfMeasure": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,15}$",
            "type": "string"
          }
        },
        "required": [
          "unitAmount"
        ],
        "type": "object"
      },
      "CreatePriceRequest": {
        "properties": {
          "billingInterval": {
            "nullable": true,
            "type": "string"
          },
          "commodityCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,63}$",
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "intervalCount": {
            "format": "int32",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "productId": {
            "minLength": 1,
            "type": "string"
          },
          "taxBehavior": {
            "$ref": "#/components/schemas/TaxBehavior"
          },
          "type": {
            "$ref": "#/components/schemas/PriceType"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitOfMeasure": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,15}$",
            "type": "string"
          }
        },
        "required": [
          "productId",
          "unitAmount"
        ],
        "type": "object"
      },
      "CreateProductRequest": {
        "properties": {
          "categoryId": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "itemKind": {
            "$ref": "#/components/schemas/ProductItemKind",
            "nullable": true
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "taxRateBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateProductWithPriceRequest": {
        "properties": {
          "price": {
            "$ref": "#/components/schemas/CreateInitialPriceRequest"
          },
          "product": {
            "$ref": "#/components/schemas/CreateProductRequest"
          }
        },
        "required": [
          "price",
          "product"
        ],
        "type": "object"
      },
      "Price": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "billingInterval": {
            "nullable": true,
            "type": "string"
          },
          "commodityCode": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "intervalCount": {
            "format": "int32",
            "type": "integer"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "taxBehavior": {
            "$ref": "#/components/schemas/TaxBehavior"
          },
          "type": {
            "$ref": "#/components/schemas/PriceType"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "currency",
          "id",
          "intervalCount",
          "merchantId",
          "metadata",
          "productId",
          "taxBehavior",
          "type",
          "unitAmount"
        ],
        "type": "object"
      },
      "PriceType": {
        "enum": [
          "ONE_TIME",
          "RECURRING"
        ],
        "type": "string"
      },
      "Product": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "categoryId": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "defaultPriceId": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "itemKind": {
            "$ref": "#/components/schemas/ProductItemKind"
          },
          "lastMutationId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "taxRateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "id",
          "locationId",
          "merchantId",
          "metadata",
          "name",
          "syncVersion"
        ],
        "type": "object"
      },
      "ProductImage": {
        "properties": {
          "altText": {
            "nullable": true,
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "fileSizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "position": {
            "format": "int32",
            "type": "integer"
          },
          "productId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "contentType",
          "createdAt",
          "fileSizeBytes",
          "id",
          "merchantId",
          "position",
          "productId",
          "url"
        ],
        "type": "object"
      },
      "ProductItemKind": {
        "enum": [
          "PRODUCT",
          "SERVICE"
        ],
        "type": "string"
      },
      "ProductWithPrice": {
        "properties": {
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "required": [
          "price",
          "product"
        ],
        "type": "object"
      },
      "ReplacePriceRequest": {
        "properties": {
          "commodityCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,63}$",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "unitAmount": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "unitOfMeasure": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,15}$",
            "type": "string"
          }
        },
        "required": [
          "unitAmount"
        ],
        "type": "object"
      },
      "TaxBehavior": {
        "enum": [
          "EXCLUSIVE",
          "INCLUSIVE"
        ],
        "type": "string"
      },
      "UpdateCatalogCategoryRequest": {
        "properties": {
          "clearParentId": {
            "type": "boolean"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "externalId": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "parentId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdatePriceRequest": {
        "properties": {
          "commodityCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,63}$",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "unitOfMeasure": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,15}$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateProductRequest": {
        "properties": {
          "active": {
            "nullable": true,
            "type": "boolean"
          },
          "categoryId": {
            "nullable": true,
            "type": "string"
          },
          "clearCategoryId": {
            "type": "boolean"
          },
          "clearDescription": {
            "type": "boolean"
          },
          "clearTaxRateBps": {
            "type": "boolean"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "itemKind": {
            "$ref": "#/components/schemas/ProductItemKind",
            "nullable": true
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "taxRateBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ChargebackCase": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "decisionActorId": {
            "nullable": true,
            "type": "string"
          },
          "decisionCommandId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "effectiveLabelValue": {
            "enum": [
              "UNKNOWN",
              "FRAUDULENT",
              "LEGITIMATE"
            ],
            "type": "string"
          },
          "firstOccurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "firstReportDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "firstReportDateAvailability": {
            "enum": [
              "UNAVAILABLE"
            ],
            "type": "string"
          },
          "fraudRelated": {
            "enum": [
              "YES",
              "NO",
              "UNKNOWN"
            ],
            "type": "string"
          },
          "historicalMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "historicalProcessorPlatform": {
            "nullable": true,
            "type": "string"
          },
          "historicalProcessorType": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "network": {
            "nullable": true,
            "type": "string"
          },
          "networkAvailability": {
            "enum": [
              "UNAVAILABLE"
            ],
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reasonFamily": {
            "enum": [
              "FRAUD",
              "AUTHORIZATION",
              "PROCESSING_ERROR",
              "CONSUMER_DISPUTE",
              "UNKNOWN"
            ],
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ChargebackCaseSource"
          },
          "sourceRowId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackCaseStatus"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "credentialProfileId",
          "effectiveLabelValue",
          "firstOccurredAt",
          "firstReportDateAvailability",
          "fraudRelated",
          "id",
          "networkAvailability",
          "organizationId",
          "reasonFamily",
          "source",
          "sourceRowId",
          "status",
          "version"
        ],
        "type": "object"
      },
      "ChargebackCaseCommand": {
        "properties": {
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "fraudRelated": {
            "enum": [
              "YES",
              "NO",
              "UNKNOWN"
            ],
            "pattern": "YES|NO|UNKNOWN",
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reasonFamily": {
            "enum": [
              "FRAUD",
              "AUTHORIZATION",
              "PROCESSING_ERROR",
              "CONSUMER_DISPUTE",
              "UNKNOWN"
            ],
            "pattern": "FRAUD|AUTHORIZATION|PROCESSING_ERROR|CONSUMER_DISPUTE|UNKNOWN",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackCaseStatus"
          }
        },
        "required": [
          "commandId",
          "expectedVersion",
          "fraudRelated",
          "observedAt",
          "reasonFamily",
          "status"
        ],
        "type": "object"
      },
      "ChargebackCaseEvent": {
        "properties": {
          "actorId": {
            "nullable": true,
            "type": "string"
          },
          "caseId": {
            "format": "uuid",
            "type": "string"
          },
          "commandId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "effectiveLabelValue": {
            "enum": [
              "UNKNOWN",
              "FRAUDULENT",
              "LEGITIMATE"
            ],
            "type": "string"
          },
          "eventType": {
            "enum": [
              "OCCURRENCE",
              "DECISION"
            ],
            "type": "string"
          },
          "fraudRelated": {
            "enum": [
              "YES",
              "NO",
              "UNKNOWN"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reasonFamily": {
            "enum": [
              "FRAUD",
              "AUTHORIZATION",
              "PROCESSING_ERROR",
              "CONSUMER_DISPUTE",
              "UNKNOWN"
            ],
            "type": "string"
          },
          "recordedAt": {
            "format": "date-time",
            "type": "string"
          },
          "sourceRowId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackCaseStatus"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "caseId",
          "effectiveLabelValue",
          "eventType",
          "fraudRelated",
          "id",
          "observedAt",
          "organizationId",
          "reasonFamily",
          "recordedAt",
          "status",
          "version"
        ],
        "type": "object"
      },
      "ChargebackCaseEventPage": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/ChargebackCaseEvent"
            },
            "type": "array"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "events",
          "truncated"
        ],
        "type": "object"
      },
      "ChargebackCasePage": {
        "properties": {
          "cases": {
            "items": {
              "$ref": "#/components/schemas/ChargebackCase"
            },
            "type": "array"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "cases",
          "truncated"
        ],
        "type": "object"
      },
      "ChargebackCaseSource": {
        "enum": [
          "CARDPOINTE_FUNDING"
        ],
        "type": "string"
      },
      "ChargebackCaseStatus": {
        "enum": [
          "UNKNOWN",
          "OPEN",
          "WON",
          "LOST",
          "REVERSED"
        ],
        "type": "string"
      },
      "ChargebackQuarantineAction": {
        "properties": {
          "action": {
            "pattern": "RESOLVE|DISMISS",
            "type": "string"
          },
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "action",
          "commandId",
          "expectedVersion"
        ],
        "type": "object"
      },
      "ChargebackQuarantineCase": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "approvalCode": {
            "type": "string"
          },
          "arn": {
            "type": "string"
          },
          "candidateCount": {
            "format": "int32",
            "type": "integer"
          },
          "cardLast4": {
            "type": "string"
          },
          "caseNumber": {
            "type": "string"
          },
          "commandId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "eventDate": {
            "format": "date",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "processorReference": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resolvedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolvedTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "reviewedBy": {
            "nullable": true,
            "type": "string"
          },
          "selectedTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ChargebackQuarantineSource"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackQuarantineStatus"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "approvalCode",
          "arn",
          "candidateCount",
          "cardLast4",
          "caseNumber",
          "createdAt",
          "credentialProfileId",
          "currency",
          "eventDate",
          "id",
          "organizationId",
          "processorReference",
          "reason",
          "source",
          "status",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "ChargebackQuarantinePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ChargebackQuarantineCase"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "ChargebackQuarantineSource": {
        "enum": [
          "CARDPOINTE_FUNDING"
        ],
        "type": "string"
      },
      "ChargebackQuarantineStatus": {
        "enum": [
          "OPEN",
          "RESOLVED",
          "DISMISSED"
        ],
        "type": "string"
      },
      "AddressAutocompleteDetailsRequest": {
        "properties": {
          "placeId": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          },
          "sessionToken": {
            "pattern": "^[A-Za-z0-9_-]{1,36}$",
            "type": "string"
          }
        },
        "required": [
          "placeId",
          "sessionToken"
        ],
        "type": "object"
      },
      "AddressAutocompleteDetailsResponse": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "state",
          "street",
          "zip"
        ],
        "type": "object"
      },
      "AddressAutocompleteRequest": {
        "properties": {
          "input": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "sessionToken": {
            "pattern": "^[A-Za-z0-9_-]{1,36}$",
            "type": "string"
          }
        },
        "required": [
          "input",
          "sessionToken"
        ],
        "type": "object"
      },
      "AddressAutocompleteResponse": {
        "properties": {
          "suggestions": {
            "items": {
              "$ref": "#/components/schemas/AddressAutocompleteSuggestion"
            },
            "type": "array"
          }
        },
        "required": [
          "suggestions"
        ],
        "type": "object"
      },
      "AddressAutocompleteSuggestion": {
        "properties": {
          "description": {
            "type": "string"
          },
          "placeId": {
            "type": "string"
          }
        },
        "required": [
          "description",
          "placeId"
        ],
        "type": "object"
      },
      "AgenticCheckoutAvailability": {
        "enum": [
          "UNAVAILABLE",
          "NOT_REQUESTED",
          "STEP_UP_REQUIRED",
          "READY"
        ],
        "type": "string"
      },
      "AgenticCheckoutState": {
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/AgenticCheckoutAvailability"
          }
        },
        "required": [
          "availability"
        ],
        "type": "object"
      },
      "ApplePayAuthorizeRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SaleLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "paymentToken": {
            "minLength": 1,
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "paymentToken"
        ],
        "type": "object"
      },
      "ApplePayChargeRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "paymentToken": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "paymentToken"
        ],
        "type": "object"
      },
      "ApplePaySession": {
        "properties": {
          "merchantSession": {
            "type": "object"
          }
        },
        "required": [
          "merchantSession"
        ],
        "type": "object"
      },
      "ApplePaySessionRequest": {
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "domainName": {
            "minLength": 1,
            "type": "string"
          },
          "validationUrl": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "domainName",
          "validationUrl"
        ],
        "type": "object"
      },
      "ApplyPromoCodeRequest": {
        "properties": {
          "code": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "BrowserEvidence": {
        "properties": {
          "language": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[^\\p{Cntrl}]*[^\\p{Cntrl}\\s][^\\p{Cntrl}]*$",
            "type": "string"
          },
          "platformDescription": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[^\\p{Cntrl}]*[^\\p{Cntrl}\\s][^\\p{Cntrl}]*$",
            "type": "string"
          },
          "screen": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[^\\p{Cntrl}]*[^\\p{Cntrl}\\s][^\\p{Cntrl}]*$",
            "type": "string"
          },
          "timezone": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[^\\p{Cntrl}]*[^\\p{Cntrl}\\s][^\\p{Cntrl}]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardBrand": {
        "enum": [
          "VISA",
          "MASTERCARD",
          "AMEX",
          "DISCOVER",
          "CUP",
          "JCB",
          "DINERS",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "CardEntryConfigResponse": {
        "properties": {
          "tokenizationMode": {
            "$ref": "#/components/schemas/TokenizationMode"
          }
        },
        "required": [
          "tokenizationMode"
        ],
        "type": "object"
      },
      "CatalogTaxContribution": {
        "description": "Catalog-rate tax for a checkout line; no jurisdiction or config identity is asserted.",
        "properties": {
          "lineItemId": {
            "type": "string"
          },
          "rateBps": {
            "format": "int32",
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "lineItemId",
          "rateBps",
          "taxAmount"
        ],
        "type": "object"
      },
      "CheckoutAccountCredentialResponse": {
        "properties": {
          "credential": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "required": [
          "credential",
          "expiresAt",
          "sessionId"
        ],
        "type": "object"
      },
      "CheckoutAchAccountType": {
        "enum": [
          "CHECKING",
          "SAVINGS"
        ],
        "type": "string"
      },
      "CheckoutApplePayPayRequest": {
        "properties": {
          "billingContact": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "browserEvidence": {
            "$ref": "#/components/schemas/BrowserEvidence",
            "nullable": true
          },
          "email": {
            "format": "email",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "paymentData": {
            "minLength": 1,
            "type": "string"
          },
          "recaptchaToken": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "paymentData"
        ],
        "type": "object"
      },
      "CheckoutApplePayValidateRequest": {
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "domainName": {
            "minLength": 1,
            "type": "string"
          },
          "validationUrl": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "domainName",
          "validationUrl"
        ],
        "type": "object"
      },
      "CheckoutCapability": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType",
            "nullable": true
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "reason",
          "status"
        ],
        "type": "object"
      },
      "CheckoutCustomerBinding": {
        "properties": {
          "externalRef": {
            "pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}",
            "type": "string"
          },
          "externalRefSource": {
            "pattern": "PEAK_POS",
            "type": "string"
          }
        },
        "required": [
          "externalRef"
        ],
        "type": "object"
      },
      "CheckoutCustomerBindingResponse": {
        "properties": {
          "cardSaveAuthorizedAt": {
            "nullable": true,
            "type": "string"
          },
          "cardSaveNotice": {
            "type": "string"
          },
          "cardSaveNoticeVersion": {
            "type": "string"
          },
          "cardSaveStatus": {
            "type": "string"
          },
          "consentReference": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "externalRef": {
            "type": "string"
          },
          "externalRefSource": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "cardSaveNotice",
          "cardSaveNoticeVersion",
          "cardSaveStatus",
          "consentReference",
          "customerId",
          "externalRef",
          "externalRefSource",
          "locationId",
          "organizationId",
          "sessionId"
        ],
        "type": "object"
      },
      "CheckoutCustomerPrefill": {
        "properties": {
          "billingCity": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "billingCountry": {
            "nullable": true,
            "pattern": "^[A-Z]{2}$",
            "type": "string"
          },
          "billingState": {
            "maxLength": 50,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "billingStreet": {
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "billingZip": {
            "maxLength": 20,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "email": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "fullName": {
            "maxLength": 512,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "maxLength": 50,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckoutDeclineCategory": {
        "enum": [
          "SOFT_DECLINE",
          "HARD_DECLINE",
          "EXPIRED_CARD",
          "INSUFFICIENT_FUNDS",
          "DO_NOT_HONOR",
          "INVALID_CARD",
          "FRAUD_SUSPECTED",
          "PROCESSING_ERROR",
          "UNKNOWN",
          "PAYMENT_VERIFICATION_FAILED",
          "VERIFICATION_MISMATCH"
        ],
        "type": "string"
      },
      "CheckoutGooglePayConfig": {
        "properties": {
          "allowedAuthMethods": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "allowedCardNetworks": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "environment": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          },
          "gatewayMerchantId": {
            "type": "string"
          },
          "googlePayMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "allowedAuthMethods",
          "allowedCardNetworks",
          "environment",
          "gateway",
          "gatewayMerchantId"
        ],
        "type": "object"
      },
      "CheckoutGooglePayPayRequest": {
        "properties": {
          "billingAddress": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "browserEvidence": {
            "$ref": "#/components/schemas/BrowserEvidence",
            "nullable": true
          },
          "email": {
            "format": "email",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "paymentData": {
            "minLength": 1,
            "type": "string"
          },
          "recaptchaToken": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "paymentData"
        ],
        "type": "object"
      },
      "CheckoutLineItem": {
        "properties": {
          "categoryCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          },
          "taxable": {
            "type": "boolean"
          },
          "totalPrice": {
            "format": "int64",
            "type": "integer"
          },
          "unitPrice": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "quantity",
          "totalPrice",
          "unitPrice"
        ],
        "type": "object"
      },
      "CheckoutMeResponse": {
        "properties": {
          "activeOrganizationId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "merchantOnlyContext": {
            "$ref": "#/components/schemas/CheckoutMerchantOnlyContext",
            "nullable": true
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/CheckoutOrganizationSummary"
            },
            "type": "array"
          },
          "userId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckoutMerchantOnlyContext": {
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          }
        },
        "required": [
          "merchantId"
        ],
        "type": "object"
      },
      "CheckoutOrganizationSummary": {
        "properties": {
          "displayName": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "organizationId"
        ],
        "type": "object"
      },
      "CheckoutPaymentCapabilities": {
        "properties": {
          "ach": {
            "$ref": "#/components/schemas/CheckoutCapability"
          },
          "payerAuthentication": {
            "$ref": "#/components/schemas/CheckoutCapability"
          }
        },
        "required": [
          "ach",
          "payerAuthentication"
        ],
        "type": "object"
      },
      "CheckoutPaymentMethodType": {
        "enum": [
          "CARD",
          "ACH"
        ],
        "type": "string"
      },
      "CheckoutReadinessResponse": {
        "properties": {
          "checkoutOrigin": {
            "type": "string"
          },
          "currencies": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethods": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "ready": {
            "type": "boolean"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "checkoutOrigin",
          "currencies",
          "locationId",
          "paymentMethods",
          "ready",
          "reasons"
        ],
        "type": "object"
      },
      "CheckoutSession": {
        "properties": {
          "achReturnCode": {
            "nullable": true,
            "type": "string"
          },
          "agenticCheckout": {
            "$ref": "#/components/schemas/AgenticCheckoutState",
            "nullable": true
          },
          "allowedPaymentMethods": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "amount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "amountTotal": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "applePaySupportedNetworks": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "autoVoided": {
            "nullable": true,
            "type": "boolean"
          },
          "cancelUrl": {
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "$ref": "#/components/schemas/CardBrand",
            "nullable": true
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardSaveNotice": {
            "nullable": true,
            "type": "string"
          },
          "cardStorageRequested": {
            "description": "The merchant offered card storage for this checkout. Only a signed-in customer who opts in with saveCard on pay stores the card; guests and customers who decline get an ordinary sale.",
            "type": "boolean"
          },
          "catalogTax": {
            "description": "Catalog-rate tax contributions by checkout line, separate from provider jurisdiction taxBreakdown. When the provider supplies a breakdown, both lists together sum to totalTax. Otherwise totalTax minus catalogTax amounts is unattributed provider tax.",
            "items": {
              "$ref": "#/components/schemas/CatalogTaxContribution"
            },
            "nullable": true,
            "type": "array"
          },
          "checkoutUrl": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "customerEmail": {
            "nullable": true,
            "type": "string"
          },
          "customerPrefill": {
            "$ref": "#/components/schemas/CheckoutCustomerPrefill",
            "nullable": true
          },
          "declaredSurchargeMaximumBps": {
            "description": "The location's configured merchant-declared customer surcharge maximum, in basis points. Null means not declared. This is a declared maximum, not the surcharge charged and not processor enrollment verification.",
            "format": "int64",
            "maximum": 400.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "expiresAt": {
            "type": "string"
          },
          "giftCardEnabled": {
            "type": "boolean"
          },
          "googlePaySupportedNetworks": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CheckoutLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "locale": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantBoundCardSave": {
            "type": "boolean"
          },
          "merchantLogoUrl": {
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "nullable": true,
            "type": "string"
          },
          "merchantPrimaryColor": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "paidAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "partiallyApproved": {
            "nullable": true,
            "type": "boolean"
          },
          "paymentAttemptId": {
            "nullable": true,
            "type": "string"
          },
          "paymentAttemptMessage": {
            "nullable": true,
            "type": "string"
          },
          "paymentAttemptStatus": {
            "type": "string"
          },
          "paymentCapabilities": {
            "$ref": "#/components/schemas/CheckoutPaymentCapabilities"
          },
          "paymentLifecycleState": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethodNotSaved": {
            "type": "boolean"
          },
          "paymentOutcomeEffectiveAt": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "paymentRetryAllowed": {
            "type": "boolean"
          },
          "paymentStatus": {
            "nullable": true,
            "type": "string"
          },
          "processedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "promotionCode": {
            "nullable": true,
            "type": "string"
          },
          "promotionCodes": {
            "items": {
              "$ref": "#/components/schemas/PromotionCodeSummary"
            },
            "nullable": true,
            "type": "array"
          },
          "reversals": {
            "items": {
              "$ref": "#/components/schemas/TransactionReversalEvidence"
            },
            "type": "array"
          },
          "selectedShippingRateId": {
            "nullable": true,
            "type": "string"
          },
          "selectedTender": {
            "nullable": true,
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "nullable": true,
            "type": "string"
          },
          "settlementFinal": {
            "nullable": true,
            "type": "boolean"
          },
          "shippingCost": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "shippingOptions": {
            "items": {
              "$ref": "#/components/schemas/ShippingOption"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "storeTimeZone": {
            "type": "string"
          },
          "successUrl": {
            "nullable": true,
            "type": "string"
          },
          "taxBreakdown": {
            "items": {
              "$ref": "#/components/schemas/JurisdictionTaxBreakdown"
            },
            "nullable": true,
            "type": "array"
          },
          "taxMode": {
            "$ref": "#/components/schemas/CheckoutTaxMode"
          },
          "tokenizationMode": {
            "$ref": "#/components/schemas/TokenizationMode"
          },
          "totalTax": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          },
          "voidedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "checkoutUrl",
          "expiresAt",
          "locationId",
          "reversals",
          "sessionId",
          "status"
        ],
        "type": "object"
      },
      "CheckoutSessionRequest": {
        "properties": {
          "allowedPaymentMethods": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "amount": {
            "description": "Base amount in minor currency units. Required when lineItems is empty. With lineItems, omit it to use their subtotal or send exactly that subtotal; discounts, shipping, and tax can change the final payable total.",
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "cancelUrl": {
            "nullable": true,
            "type": "string"
          },
          "captureMethod": {
            "nullable": true,
            "type": "string"
          },
          "createSubscription": {
            "$ref": "#/components/schemas/CreateSubscriptionAtCheckoutRequest",
            "nullable": true
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "customerBinding": {
            "$ref": "#/components/schemas/CheckoutCustomerBinding",
            "nullable": true
          },
          "customerEmail": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "customerPrefill": {
            "$ref": "#/components/schemas/CheckoutCustomerPrefill",
            "nullable": true
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "expiresIn": {
            "format": "int64",
            "minimum": 60.0,
            "nullable": true,
            "type": "integer"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CreateLineItemRequest"
            },
            "nullable": true,
            "type": "array"
          },
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "merchantReference": {
            "description": "Permanent idempotency identity for immutable, amount-only PRECOMPUTED commerce checkouts.",
            "nullable": true,
            "pattern": "[A-Za-z0-9_-]{16,64}",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "promotionCode": {
            "maxLength": 50,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "promotionCodes": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "saveCard": {
            "nullable": true,
            "type": "boolean"
          },
          "shippingAddressCollection": {
            "$ref": "#/components/schemas/ShippingAddressCollection",
            "nullable": true
          },
          "shippingOptions": {
            "items": {
              "$ref": "#/components/schemas/ShippingOption"
            },
            "nullable": true,
            "type": "array"
          },
          "successUrl": {
            "nullable": true,
            "type": "string"
          },
          "taxMode": {
            "$ref": "#/components/schemas/CheckoutTaxMode"
          },
          "totalTax": {
            "description": "Required in PRECOMPUTED mode: exact additional tax in minor units, equal to the sum of line taxAmount values. For an amount-only collection of an already tax-inclusive receivable, send 0; amount is then the entire payable balance.",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckoutShippingConfigRequest": {
        "properties": {
          "freeShippingThreshold": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "shippingMethods": {
            "items": {
              "$ref": "#/components/schemas/ShippingMethodConfig"
            },
            "type": "array"
          }
        },
        "required": [
          "shippingMethods"
        ],
        "type": "object"
      },
      "CheckoutSubscriptionInterval": {
        "enum": [
          "DAILY",
          "WEEKLY",
          "MONTHLY",
          "QUARTERLY",
          "YEARLY"
        ],
        "type": "string"
      },
      "CheckoutTaxMode": {
        "enum": [
          "AUTOMATIC",
          "PRECOMPUTED"
        ],
        "type": "string"
      },
      "CreateHostedButtonRequest": {
        "properties": {
          "cancelUrl": {
            "minLength": 1,
            "type": "string"
          },
          "createSubscription": {
            "$ref": "#/components/schemas/CreateSubscriptionAtCheckoutRequest",
            "nullable": true
          },
          "currency": {
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/HostedButtonLineItem"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "openAmount": {
            "type": "boolean"
          },
          "successUrl": {
            "minLength": 1,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "cancelUrl",
          "currency",
          "lineItems",
          "successUrl"
        ],
        "type": "object"
      },
      "CreateIframeSessionRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "cancelUrl": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CreateLineItemRequest"
            },
            "nullable": true,
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "successUrl": {
            "nullable": true,
            "type": "string"
          },
          "taxMode": {
            "$ref": "#/components/schemas/CheckoutTaxMode"
          },
          "theme": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "totalTax": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "CreateLineItemRequest": {
        "properties": {
          "categoryCode": {
            "description": "Tax-provider category code, matched against configured category tax rules.",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "description": "Catalog price identifier. The line is charged and stored at this price's unitAmount.",
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "taxAmount": {
            "description": "Exact line tax in minor units, required only in PRECOMPUTED mode. Not a per-unit amount.",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "taxable": {
            "description": "Whether a custom line is taxable. Catalog tax treatment is authoritative.",
            "nullable": true,
            "type": "boolean"
          },
          "unitPrice": {
            "description": "Unit price in minor currency units for a custom line without priceId. Must not be sent with priceId; catalog lines are charged at the catalog price.",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CreateSubscriptionAtCheckoutRequest": {
        "properties": {
          "endDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "interval": {
            "$ref": "#/components/schemas/CheckoutSubscriptionInterval"
          },
          "intervalCount": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "maxCycles": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "planName": {
            "minLength": 1,
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "type": "string"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "interval",
          "planName",
          "startDate"
        ],
        "type": "object"
      },
      "GiftCardPreviewRequest": {
        "properties": {
          "cardNumber": {
            "minLength": 1,
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          }
        },
        "required": [
          "cardNumber"
        ],
        "type": "object"
      },
      "GiftCardPreviewResponse": {
        "properties": {
          "appliedCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "paymentCapabilities": {
            "$ref": "#/components/schemas/CheckoutPaymentCapabilities"
          },
          "remainingDueCents": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "appliedCents",
          "balanceCents",
          "currency",
          "last4",
          "remainingDueCents"
        ],
        "type": "object"
      },
      "GiftCardTender": {
        "properties": {
          "cardNumber": {
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "cardNumber"
        ],
        "type": "object"
      },
      "GooglePayAuthorizeRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SaleLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "paymentToken": {
            "minLength": 1,
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "paymentToken"
        ],
        "type": "object"
      },
      "GooglePayChargeRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "paymentToken": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "paymentToken"
        ],
        "type": "object"
      },
      "GooglePayConfig": {
        "properties": {
          "environment": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          },
          "gatewayMerchantId": {
            "type": "string"
          },
          "googlePayMerchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "environment",
          "gateway",
          "gatewayMerchantId"
        ],
        "type": "object"
      },
      "HostedButton": {
        "properties": {
          "buttonId": {
            "type": "string"
          },
          "checkoutUrl": {
            "type": "string"
          },
          "createSubscription": {
            "$ref": "#/components/schemas/CreateSubscriptionAtCheckoutRequest",
            "nullable": true
          },
          "currency": {
            "description": "ISO 4217 currency of the payment link.",
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "embedCode": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/HostedButtonLineItemResponse"
            },
            "type": "array"
          },
          "openAmount": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentLinkStatus"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "buttonId",
          "checkoutUrl",
          "currency",
          "embedCode"
        ],
        "type": "object"
      },
      "HostedButtonLineItem": {
        "properties": {
          "name": {
            "description": "Merchant-entered description for a custom fixed-amount line without priceId (max 255 characters).",
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "description": "Catalog price identifier. Required for catalog lines; must not be sent with name or unitPrice.",
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "unitPrice": {
            "description": "Fixed unit price in minor units of the link's currency for a custom line without priceId. Must not be sent with priceId; a custom line has quantity 1 and cannot be combined with catalog lines, openAmount, or createSubscription.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "HostedButtonLineItemResponse": {
        "properties": {
          "name": {
            "description": "Description of a custom fixed-amount line; null for catalog lines.",
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "description": "Catalog price identifier; null for a custom fixed-amount line.",
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "unitPrice": {
            "description": "Unit price in minor units of the link's currency for a custom line; null for catalog lines.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "quantity"
        ],
        "type": "object"
      },
      "HostedButtonStats": {
        "properties": {
          "buttonId": {
            "type": "string"
          },
          "paymentCount": {
            "format": "int64",
            "type": "integer"
          },
          "revenue": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "buttonId",
          "paymentCount",
          "revenue"
        ],
        "type": "object"
      },
      "IframeSession": {
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "iframeUrl": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "expiresAt",
          "iframeUrl",
          "sessionId"
        ],
        "type": "object"
      },
      "JurisdictionTaxBreakdown": {
        "properties": {
          "jurisdictionCode": {
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "type": "string"
          },
          "rateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "sourceConfigId": {
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "jurisdictionCode",
          "jurisdictionType",
          "sourceConfigId",
          "taxAmount"
        ],
        "type": "object"
      },
      "PaymentLinkStatus": {
        "enum": [
          "ACTIVE",
          "PAUSED"
        ],
        "type": "string"
      },
      "PaymentResult": {
        "properties": {
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "autoVoided": {
            "nullable": true,
            "type": "boolean"
          },
          "cardBrand": {
            "$ref": "#/components/schemas/CardBrand",
            "nullable": true
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "correlationId": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "declineCategory": {
            "$ref": "#/components/schemas/CheckoutDeclineCategory",
            "nullable": true
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "partiallyApproved": {
            "nullable": true,
            "type": "boolean"
          },
          "paymentLifecycleState": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "nullable": true,
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "redirectUrl": {
            "nullable": true,
            "type": "string"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "retryAllowed": {
            "type": "boolean"
          },
          "retryable": {
            "nullable": true,
            "type": "boolean"
          },
          "selectedTender": {
            "nullable": true,
            "type": "string"
          },
          "settlementFinal": {
            "nullable": true,
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "terminalReason": {
            "$ref": "#/components/schemas/RoutingTerminalReason",
            "nullable": true
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "retryAllowed",
          "status"
        ],
        "type": "object"
      },
      "ProcessPaymentRequest": {
        "properties": {
          "achAccountNumber": {
            "nullable": true,
            "pattern": "\\d{4,17}",
            "type": "string"
          },
          "achAccountType": {
            "$ref": "#/components/schemas/CheckoutAchAccountType",
            "nullable": true
          },
          "achAuthorizationAccepted": {
            "nullable": true,
            "type": "boolean"
          },
          "achRoutingNumber": {
            "nullable": true,
            "pattern": "\\d{9}",
            "type": "string"
          },
          "billingCity": {
            "nullable": true,
            "type": "string"
          },
          "billingCountry": {
            "nullable": true,
            "type": "string"
          },
          "billingState": {
            "nullable": true,
            "type": "string"
          },
          "billingStreet": {
            "nullable": true,
            "type": "string"
          },
          "billingStreet2": {
            "nullable": true,
            "type": "string"
          },
          "billingZip": {
            "nullable": true,
            "type": "string"
          },
          "browserEvidence": {
            "$ref": "#/components/schemas/BrowserEvidence",
            "nullable": true
          },
          "cardEntryAttemptId": {
            "nullable": true,
            "type": "string"
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "format": "email",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "giftCard": {
            "$ref": "#/components/schemas/GiftCardTender",
            "nullable": true
          },
          "level2": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "level3": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SaleLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "partialAuthSupport": {
            "nullable": true,
            "type": "boolean"
          },
          "paymentMethodType": {
            "$ref": "#/components/schemas/CheckoutPaymentMethodType"
          },
          "recaptchaToken": {
            "nullable": true,
            "type": "string"
          },
          "saveCard": {
            "description": "The signed-in customer's explicit consent to save this new card. Requires an authenticated customer; only this consent enrolls the card as card-on-file, including on a session whose cardStorageRequested is true.",
            "nullable": true,
            "type": "boolean"
          },
          "savedPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/ShippingAddress",
            "nullable": true
          },
          "storedCredentialReason": {
            "$ref": "#/components/schemas/StoredCredentialReason",
            "nullable": true
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PromotionCodeSummary": {
        "properties": {
          "code": {
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "type": "integer"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "discountAmount",
          "ordinal"
        ],
        "type": "object"
      },
      "SaleLineItem": {
        "properties": {
          "commodityCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "description": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "productCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "unitCost": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "unitOfMeasure": {
            "maxLength": 16,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SelectShippingRateRequest": {
        "properties": {
          "rateId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "rateId"
        ],
        "type": "object"
      },
      "ShippingAddress": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "line1": {
            "nullable": true,
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShippingAddressCollection": {
        "properties": {
          "allowedCountries": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ShippingConfigResponse": {
        "properties": {
          "freeShippingThreshold": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "shippingMethods": {
            "items": {
              "$ref": "#/components/schemas/ShippingMethodConfig"
            },
            "type": "array"
          }
        },
        "required": [
          "merchantId",
          "shippingMethods"
        ],
        "type": "object"
      },
      "ShippingMethodConfig": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "estimatedDays": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "id",
          "name"
        ],
        "type": "object"
      },
      "ShippingOption": {
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estimatedDaysMax": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "estimatedDaysMin": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "id",
          "name"
        ],
        "type": "object"
      },
      "ShippingRate": {
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "estimatedDaysMax": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "estimatedDaysMin": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "id",
          "name"
        ],
        "type": "object"
      },
      "StoredCredentialReason": {
        "enum": [
          "RECURRING",
          "SUBSCRIPTION",
          "STANDING_ORDER",
          "INSTALLMENT",
          "UNSCHEDULED"
        ],
        "type": "string"
      },
      "TokenizationMode": {
        "enum": [
          "DIRECT",
          "EPG_HOSTED_PAYMENT_FIELDS",
          "EPG_HOSTED_FIELDS_UNAVAILABLE"
        ],
        "type": "string"
      },
      "UpdateHostedButtonRequest": {
        "properties": {
          "clearCreateSubscription": {
            "type": "boolean"
          },
          "clearExpiresAt": {
            "type": "boolean"
          },
          "createSubscription": {
            "$ref": "#/components/schemas/CreateSubscriptionAtCheckoutRequest",
            "nullable": true
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/HostedButtonLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "openAmount": {
            "nullable": true,
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentLinkStatus",
            "nullable": true
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateLineItemQuantityRequest": {
        "properties": {
          "quantity": {
            "format": "int32",
            "maximum": 99,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "quantity"
        ],
        "type": "object"
      },
      "UpsertShippingConfigRequest": {
        "properties": {
          "freeShippingThreshold": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "shippingMethods": {
            "items": {
              "$ref": "#/components/schemas/ShippingMethodConfig"
            },
            "type": "array"
          }
        },
        "required": [
          "shippingMethods"
        ],
        "type": "object"
      },
      "WalletChargeResult": {
        "properties": {
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "autoVoided": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "declineCategory": {
            "$ref": "#/components/schemas/CheckoutDeclineCategory",
            "nullable": true
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "partiallyApproved": {
            "type": "boolean"
          },
          "processedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "retryable": {
            "nullable": true,
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "terminalReason": {
            "$ref": "#/components/schemas/RoutingTerminalReason",
            "nullable": true
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "transactionId"
        ],
        "type": "object"
      },
      "CreateCreditNoteRequest": {
        "properties": {
          "creditAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "minLength": 1,
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteLineItemRequest"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "outOfBandAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "paymentId": {
            "minLength": 1,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "refundAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "refundedTipAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "lineItems",
          "paymentId"
        ],
        "type": "object"
      },
      "CreditNote": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "creditAmount": {
            "format": "int64",
            "type": "integer"
          },
          "creditNoteId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteLineItem"
            },
            "type": "array"
          },
          "merchantId": {
            "type": "string"
          },
          "number": {
            "nullable": true,
            "type": "string"
          },
          "outOfBandAmount": {
            "format": "int64",
            "type": "integer"
          },
          "paymentId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "refundAmount": {
            "format": "int64",
            "type": "integer"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/CreditNoteStatus"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "voidedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "creditAmount",
          "creditNoteId",
          "currency",
          "customerId",
          "lineItems",
          "merchantId",
          "outOfBandAmount",
          "paymentId",
          "refundAmount",
          "status",
          "total"
        ],
        "type": "object"
      },
      "CreditNoteLineItem": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "creditNoteId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "externalLineItemId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "creditNoteId",
          "description",
          "id",
          "quantity",
          "type",
          "unitAmount"
        ],
        "type": "object"
      },
      "CreditNoteLineItemRequest": {
        "properties": {
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "externalLineItemId": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "description",
          "unitAmount"
        ],
        "type": "object"
      },
      "CreditNoteStatus": {
        "enum": [
          "PENDING",
          "ISSUED",
          "FAILED",
          "VOID"
        ],
        "type": "string"
      },
      "AdjustCustomerBalanceRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "minLength": 1,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "description"
        ],
        "type": "object"
      },
      "CreateCustomerContactPaymentRequest": {
        "properties": {
          "allowedPaymentMethods": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "cancelUrl": {
            "minLength": 1,
            "pattern": "https://.*",
            "type": "string"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "expiresIn": {
            "format": "int64",
            "minimum": 60.0,
            "nullable": true,
            "type": "integer"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "saveCard": {
            "nullable": true,
            "type": "boolean"
          },
          "successUrl": {
            "minLength": 1,
            "pattern": "https://.*",
            "type": "string"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "cancelUrl",
          "currency",
          "successUrl"
        ],
        "type": "object"
      },
      "CreateCustomerContactRequest": {
        "properties": {
          "email": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateCustomerRequest": {
        "properties": {
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerBillingAddress",
            "nullable": true
          },
          "email": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "firstName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Customer": {
        "properties": {
          "archivedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerBillingAddress",
            "nullable": true
          },
          "createOutcome": {
            "$ref": "#/components/schemas/CustomerCreateOutcome",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "defaultPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "externalRef": {
            "nullable": true,
            "type": "string"
          },
          "externalRefSource": {
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "mergedIntoId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "merchantId",
          "syncVersion"
        ],
        "type": "object"
      },
      "CustomerActivityReference": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "displayLabel": {
            "type": "string"
          },
          "gatewayTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "sourceSystem": {
            "$ref": "#/components/schemas/CustomerActivitySourceSystem"
          },
          "sourceTransactionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "createdAt",
          "currency",
          "customerId",
          "displayLabel",
          "occurredAt",
          "sourceSystem",
          "sourceTransactionId",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "CustomerActivitySourceSystem": {
        "enum": [
          "PEAK_POS"
        ],
        "type": "string"
      },
      "CustomerBalance": {
        "properties": {
          "balance": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "balance",
          "currency"
        ],
        "type": "object"
      },
      "CustomerBalanceTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "creditNoteId": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "endingBalance": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "customerId",
          "endingBalance",
          "id",
          "merchantId",
          "type"
        ],
        "type": "object"
      },
      "CustomerBillingAddress": {
        "properties": {
          "addressLine1": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "city": {
            "maxLength": 120,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "company": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "country": {
            "maxLength": 3,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z]{2,3}$|^$",
            "type": "string"
          },
          "email": {
            "format": "email",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "maxLength": 120,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "maxLength": 120,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "maxLength": 40,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "state": {
            "maxLength": 120,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustomerContact": {
        "properties": {
          "contactId": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "organizationId",
          "source",
          "status"
        ],
        "type": "object"
      },
      "CustomerContactPaymentRequestResponse": {
        "properties": {
          "checkoutUrl": {
            "nullable": true,
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "customerEmail": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "customerPhone": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "merchantId",
          "organizationId",
          "sessionId"
        ],
        "type": "object"
      },
      "CustomerCreateOutcome": {
        "enum": [
          "CREATED",
          "MATCHED_EXISTING"
        ],
        "type": "string"
      },
      "CustomerMergeResponse": {
        "properties": {
          "identityMerged": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string"
          },
          "reparentedRowCounts": {
            "$ref": "#/components/schemas/ReparentedRowCounts"
          },
          "sourceCustomerId": {
            "type": "string"
          },
          "targetCustomerId": {
            "type": "string"
          },
          "targetIdentityId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "identityMerged",
          "organizationId",
          "reparentedRowCounts",
          "sourceCustomerId",
          "targetCustomerId"
        ],
        "type": "object"
      },
      "CustomerPaymentMethodResponse": {
        "properties": {
          "accountHolderName": {
            "nullable": true,
            "type": "string"
          },
          "accountType": {
            "$ref": "#/components/schemas/AchAccountType",
            "nullable": true
          },
          "bankLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardBin": {
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardExpMonth": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "cardExpYear": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardMetadata": {
            "$ref": "#/components/schemas/SavedCardCurrentBinMetadata",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerReconfirmationRequired": {
            "type": "boolean"
          },
          "fundingType": {
            "$ref": "#/components/schemas/SavedCardFundingType"
          },
          "id": {
            "type": "string"
          },
          "initialApprovedAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "initialNetworkTransactionReference": {
            "nullable": true,
            "type": "string"
          },
          "instrumentType": {
            "$ref": "#/components/schemas/SavedPaymentMethodInstrumentType"
          },
          "isDefault": {
            "type": "boolean"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantInitiatedChargeEligible": {
            "type": "boolean"
          },
          "merchantInitiatedChargeIneligibilityCode": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "originInvoiceId": {
            "nullable": true,
            "type": "string"
          },
          "originSetupIntentId": {
            "nullable": true,
            "type": "string"
          },
          "purpose": {
            "$ref": "#/components/schemas/SavedPaymentMethodPurpose",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "customerId",
          "fundingType",
          "id",
          "instrumentType",
          "isDefault",
          "organizationId",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "CustomerResponse": {
        "properties": {
          "archivedAt": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "merchantId"
        ],
        "type": "object"
      },
      "HostedCustomerUpdateRequest": {
        "properties": {
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerBillingAddress",
            "nullable": true
          },
          "email": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InviteCustomerContactRequest": {
        "properties": {
          "acceptBaseUrl": {
            "nullable": true,
            "pattern": "https://.*",
            "type": "string"
          },
          "email": {
            "format": "email",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "role": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaginatedResponseCustomer": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Customer"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseCustomerBalanceTransaction": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerBalanceTransaction"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseTransaction": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PosCustomerBindExistingRequest": {
        "properties": {
          "expectedPreviousExternalRef": {
            "maxLength": 255,
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "externalRef": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "merchantId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "mutationId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,64}$",
            "type": "string"
          }
        },
        "required": [
          "expectedSyncVersion",
          "externalRef",
          "merchantId",
          "mutationId",
          "organizationId"
        ],
        "type": "object"
      },
      "PosCustomerMergeRequest": {
        "properties": {
          "merchantId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,64}$",
            "type": "string"
          },
          "mutationId": {
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,64}$",
            "type": "string"
          },
          "sourceExternalRef": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "targetExternalRef": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "merchantId",
          "mutationId",
          "organizationId",
          "sourceExternalRef",
          "targetExternalRef"
        ],
        "type": "object"
      },
      "PosCustomerMergeResponse": {
        "properties": {
          "identityMerged": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string"
          },
          "reparentedRowCounts": {
            "$ref": "#/components/schemas/PosCustomerReparentedRowCounts"
          },
          "sourceCustomerId": {
            "type": "string"
          },
          "targetCustomerId": {
            "type": "string"
          },
          "targetIdentityId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "identityMerged",
          "organizationId",
          "reparentedRowCounts",
          "sourceCustomerId",
          "targetCustomerId"
        ],
        "type": "object"
      },
      "PosCustomerReparentedRowCounts": {
        "properties": {
          "creditNotes": {
            "format": "int64",
            "type": "integer"
          },
          "customerBalanceTransactions": {
            "format": "int64",
            "type": "integer"
          },
          "customerContacts": {
            "format": "int64",
            "type": "integer"
          },
          "customerPaymentMethods": {
            "format": "int64",
            "type": "integer"
          },
          "giftCards": {
            "format": "int64",
            "type": "integer"
          },
          "setupIntents": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptionSchedules": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptions": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "creditNotes",
          "customerBalanceTransactions",
          "customerContacts",
          "customerPaymentMethods",
          "giftCards",
          "setupIntents",
          "subscriptionSchedules",
          "subscriptions"
        ],
        "type": "object"
      },
      "PutCustomerActivityReferenceRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "displayLabel": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "gatewayTransactionId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "pattern": "^[A-Z][A-Z0-9_]{0,31}$",
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "displayLabel",
          "occurredAt",
          "status"
        ],
        "type": "object"
      },
      "ReparentedRowCounts": {
        "properties": {
          "creditNotes": {
            "format": "int64",
            "type": "integer"
          },
          "customerBalanceTransactions": {
            "format": "int64",
            "type": "integer"
          },
          "customerContacts": {
            "format": "int64",
            "type": "integer"
          },
          "customerPaymentMethods": {
            "format": "int64",
            "type": "integer"
          },
          "giftCards": {
            "format": "int64",
            "type": "integer"
          },
          "setupIntents": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptionSchedules": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptions": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "creditNotes",
          "customerBalanceTransactions",
          "customerContacts",
          "customerPaymentMethods",
          "giftCards",
          "setupIntents",
          "subscriptionSchedules",
          "subscriptions"
        ],
        "type": "object"
      },
      "SavedCardCurrentBinMetadata": {
        "properties": {
          "brand": {
            "type": "string"
          },
          "brandState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          },
          "fundingSource": {
            "type": "string"
          },
          "fundingSourceState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          },
          "issuerCountry": {
            "type": "string"
          },
          "issuerCountryState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          },
          "issuerName": {
            "type": "string"
          },
          "issuerNameState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          },
          "productCode": {
            "type": "string"
          },
          "productCodeState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          },
          "productName": {
            "type": "string"
          },
          "productNameState": {
            "$ref": "#/components/schemas/SavedCardMetadataState"
          }
        },
        "type": "object"
      },
      "SavedCardFundingType": {
        "enum": [
          "NETWORK_TOKEN",
          "PROCESSOR_TOKEN",
          "RETAINED_PAN",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "SavedCardMetadataState": {
        "enum": [
          "AVAILABLE",
          "AMBIGUOUS",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "SavedPaymentMethodInstrumentType": {
        "enum": [
          "CARD",
          "BANK_ACCOUNT"
        ],
        "type": "string"
      },
      "SavedPaymentMethodPurpose": {
        "enum": [
          "ORDINARY_PAYMENT",
          "INVOICE_ONLY",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "SetDefaultPaymentMethodRequest": {
        "properties": {
          "paymentMethodId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "paymentMethodId"
        ],
        "type": "object"
      },
      "UpdateCustomerRequest": {
        "properties": {
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerBillingAddress",
            "nullable": true
          },
          "defaultPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "firstName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DashboardCurrencySales": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "salesAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "salesAmount"
        ],
        "type": "object"
      },
      "DashboardCurrencyTotal": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "netAmount": {
            "description": "Refund-adjusted net: upstream operational gross minus refunds, in currency minor units; not settlement proceeds.",
            "format": "int64",
            "type": "integer"
          },
          "settlementPending": {
            "format": "int64",
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "totalRefunds": {
            "format": "int64",
            "type": "integer"
          },
          "totalSales": {
            "format": "int64",
            "type": "integer"
          },
          "transactionCount": {
            "description": "Upstream operational transaction count, including refunds; not completed-sale count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "netAmount",
          "settlementPending",
          "totalAmount",
          "totalRefunds",
          "totalSales",
          "transactionCount"
        ],
        "type": "object"
      },
      "DashboardDailySales": {
        "properties": {
          "date": {
            "format": "date",
            "type": "string"
          },
          "salesByCurrency": {
            "items": {
              "$ref": "#/components/schemas/DashboardCurrencySales"
            },
            "type": "array"
          },
          "transactionCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "salesByCurrency",
          "transactionCount"
        ],
        "type": "object"
      },
      "DashboardHourlyVolume": {
        "properties": {
          "hour": {
            "format": "int32",
            "type": "integer"
          },
          "transactionCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "hour",
          "transactionCount"
        ],
        "type": "object"
      },
      "DashboardMetrics": {
        "properties": {
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currencyTotals": {
            "items": {
              "$ref": "#/components/schemas/DashboardCurrencyTotal"
            },
            "type": "array"
          },
          "hourlyVolume": {
            "items": {
              "$ref": "#/components/schemas/DashboardHourlyVolume"
            },
            "type": "array"
          },
          "merchantCount": {
            "format": "int64",
            "type": "integer"
          },
          "recentTransactions": {
            "items": {
              "$ref": "#/components/schemas/RecentTransaction"
            },
            "type": "array"
          },
          "salesTrend": {
            "items": {
              "$ref": "#/components/schemas/DashboardDailySales"
            },
            "type": "array"
          },
          "settlementPending": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "timeZone": {
            "type": "string"
          },
          "totalVolumeToday": {
            "description": "Upstream operational transaction volume in currency minor units, including refunds; not completed-sale gross. Null for mixed currencies; use currencyTotals.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionCountToday": {
            "description": "Upstream operational transaction count, including refunds; not completed-sale count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "hourlyVolume",
          "merchantCount",
          "recentTransactions",
          "salesTrend",
          "timeZone",
          "transactionCountToday"
        ],
        "type": "object"
      },
      "RecentTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "id",
          "merchantId",
          "status"
        ],
        "type": "object"
      },
      "DeviceClass": {
        "enum": [
          "SMART_POS",
          "TTP_IOS_NATIVE",
          "TTP_IOS_NEARPAY",
          "TTP_ANDROID_NEARPAY",
          "TTP_ANDROID_NATIVE"
        ],
        "type": "string"
      },
      "DeviceClassEntitlementResponse": {
        "properties": {
          "deviceClass": {
            "$ref": "#/components/schemas/DeviceClass"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "deviceClass",
          "organizationId"
        ],
        "type": "object"
      },
      "AcquireTerminalClaimRequest": {
        "properties": {
          "gatewayDeviceId": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string"
          },
          "hardwareId": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string"
          },
          "merchantId": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "providerTerminalId": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string"
          },
          "requestedMerchantName": {
            "maxLength": 120,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "gatewayDeviceId",
          "hardwareId",
          "merchantId",
          "provider",
          "providerTerminalId"
        ],
        "type": "object"
      },
      "CardPresentDeviceCommand": {
        "enum": [
          "LOCK",
          "UNLOCK",
          "RESTART"
        ],
        "type": "string"
      },
      "CardPresentDeviceCommandRequest": {
        "properties": {
          "command": {
            "$ref": "#/components/schemas/CardPresentDeviceCommand"
          },
          "lockMessage": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "command"
        ],
        "type": "object"
      },
      "CardPresentDeviceMessageRequest": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "CardPresentDeviceProvider": {
        "enum": [
          "NEXGO"
        ],
        "type": "string"
      },
      "CardPresentRail": {
        "enum": [
          "NEXGO_SMART_POS",
          "TTP_IOS_NATIVE",
          "TTP_IOS_NEARPAY",
          "TTP_ANDROID_NEARPAY",
          "TTP_ANDROID_NATIVE"
        ],
        "type": "string"
      },
      "ConfigureSmartConnectTopologyRequest": {
        "properties": {
          "endpointHost": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "endpointPort": {
            "format": "int32",
            "maximum": 65535,
            "minimum": 1,
            "type": "integer"
          },
          "linkedSerial": {
            "maxLength": 120,
            "minLength": 0,
            "pattern": "[A-Za-z0-9._-]+",
            "type": "string"
          },
          "mutationVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "endpointHost",
          "endpointPort",
          "linkedSerial",
          "mutationVersion"
        ],
        "type": "object"
      },
      "DeviceCommandAckRequest": {
        "properties": {
          "detail": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "resultStatus": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "resultStatus"
        ],
        "type": "object"
      },
      "DeviceCommandResponse": {
        "properties": {
          "acknowledgedAt": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "nullable": true,
            "type": "string"
          },
          "commandId": {
            "type": "string"
          },
          "commandType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deliveredAt": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "dispatchedAt": {
            "nullable": true,
            "type": "string"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "failedAt": {
            "nullable": true,
            "type": "string"
          },
          "fcmMessageId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "retryCount": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "timedOutAt": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "commandId",
          "commandType",
          "createdAt",
          "deviceId",
          "merchantId",
          "retryCount",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "DeviceHeartbeatRequest": {
        "properties": {
          "appVersion": {
            "maxLength": 40,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "batteryLevel": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "fcmRegistrationToken": {
            "maxLength": 200,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "hasOfflineServerReplayBacklog": {
            "nullable": true,
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "needsReconciliationCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "networkType": {
            "maxLength": 40,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "offlineQueueSize": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "pendingOperationCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "readinessState": {
            "$ref": "#/components/schemas/DeviceReadinessState",
            "nullable": true
          },
          "recoveryBacklogCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DeviceHeartbeatResponse": {
        "properties": {
          "activeCommandId": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "lastHeartbeatAt": {
            "type": "string"
          },
          "pendingCommandCount": {
            "format": "int32",
            "type": "integer"
          },
          "readinessState": {
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "lastHeartbeatAt",
          "pendingCommandCount",
          "readinessState"
        ],
        "type": "object"
      },
      "DeviceIdentityResponse": {
        "properties": {
          "appPackage": {
            "type": "string"
          },
          "cardPresentRail": {
            "$ref": "#/components/schemas/CardPresentRail"
          },
          "deviceAlias": {
            "type": "string"
          },
          "deviceClass": {
            "$ref": "#/components/schemas/DeviceClass"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceModel": {
            "type": "string"
          },
          "enrolledAt": {
            "format": "date-time",
            "type": "string"
          },
          "hostSerialNumber": {
            "type": "string"
          },
          "installationId": {
            "type": "string"
          },
          "lastAttestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastAttestedBy": {
            "type": "string"
          },
          "lastOperatorUid": {
            "type": "string"
          },
          "lastOperatorUnlockAt": {
            "format": "date-time",
            "type": "string"
          },
          "linkedTerminalSerialNumber": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/EnrollmentDevicePlatform"
          },
          "publicKeySha256": {
            "type": "string"
          },
          "revocationReason": {
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "terminalProvider": {
            "$ref": "#/components/schemas/TerminalProvider"
          }
        },
        "required": [
          "deviceId",
          "enrolledAt",
          "organizationId",
          "platform",
          "status"
        ],
        "type": "object"
      },
      "DeviceKeyScopeRevocationRequest": {
        "properties": {
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "publicKeySha256": {
            "pattern": "[0-9a-f]{64}",
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "organizationId",
          "publicKeySha256"
        ],
        "type": "object"
      },
      "DevicePushResponse": {
        "properties": {
          "cloudStatus": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CardPresentDeviceProvider"
          },
          "pushId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "serialNumber": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "provider",
          "serialNumber",
          "status"
        ],
        "type": "object"
      },
      "DeviceReadinessState": {
        "enum": [
          "READY",
          "DEGRADED",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "DeviceRuntimeSnapshotResponse": {
        "properties": {
          "activeCommand": {
            "$ref": "#/components/schemas/DeviceCommandResponse",
            "nullable": true
          },
          "activeCommandId": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceStatus": {
            "nullable": true,
            "type": "string"
          },
          "hasOfflineReplayBacklog": {
            "type": "boolean"
          },
          "lastHeartbeatAt": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "needsReconciliationCount": {
            "format": "int32",
            "type": "integer"
          },
          "offlineQueueSize": {
            "format": "int32",
            "type": "integer"
          },
          "pendingCommandCount": {
            "format": "int32",
            "type": "integer"
          },
          "platform": {
            "nullable": true,
            "type": "string"
          },
          "pushTokenState": {
            "nullable": true,
            "type": "string"
          },
          "readinessState": {
            "type": "string"
          },
          "recentCommands": {
            "items": {
              "$ref": "#/components/schemas/DeviceCommandResponse"
            },
            "type": "array"
          },
          "recoveryBacklogCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "deviceId",
          "hasOfflineReplayBacklog",
          "locationId",
          "needsReconciliationCount",
          "offlineQueueSize",
          "pendingCommandCount",
          "readinessState",
          "recentCommands",
          "recoveryBacklogCount"
        ],
        "type": "object"
      },
      "DeviceRuntimeStateResponse": {
        "properties": {
          "activeCommandId": {
            "nullable": true,
            "type": "string"
          },
          "appVersion": {
            "nullable": true,
            "type": "string"
          },
          "batteryLevel": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "deviceId": {
            "type": "string"
          },
          "fcmTokenPresent": {
            "type": "boolean"
          },
          "hasOfflineReplayBacklog": {
            "type": "boolean"
          },
          "lastHeartbeatAt": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "needsReconciliationCount": {
            "format": "int32",
            "type": "integer"
          },
          "networkType": {
            "nullable": true,
            "type": "string"
          },
          "offlineQueueSize": {
            "format": "int32",
            "type": "integer"
          },
          "pendingCommandCount": {
            "format": "int32",
            "type": "integer"
          },
          "readinessState": {
            "type": "string"
          },
          "recoveryBacklogCount": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "fcmTokenPresent",
          "hasOfflineReplayBacklog",
          "merchantId",
          "needsReconciliationCount",
          "offlineQueueSize",
          "pendingCommandCount",
          "readinessState",
          "recoveryBacklogCount",
          "updatedAt"
        ],
        "type": "object"
      },
      "DeviceUpdateRequest": {
        "properties": {
          "appId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "appVersionId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "otaVersionId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "EasyDeployPushRequest": {
        "properties": {
          "serialNumbers": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "templateId": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "serialNumbers",
          "templateId"
        ],
        "type": "object"
      },
      "EasyDeployTemplateResponse": {
        "properties": {
          "detail": {
            "nullable": true,
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "remark": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "templateId"
        ],
        "type": "object"
      },
      "EasyDeployTemplateUpsertRequest": {
        "properties": {
          "apps": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "certs": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "otas": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "params": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "remark": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "EnqueueDeviceCommandRequest": {
        "properties": {
          "commandId": {
            "nullable": true,
            "type": "string"
          },
          "commandType": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string"
          },
          "data": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "commandType"
        ],
        "type": "object"
      },
      "EnrollmentDevicePlatform": {
        "enum": [
          "ANDROID",
          "IOS"
        ],
        "type": "string"
      },
      "InstallDeviceAppRequest": {
        "properties": {
          "appId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "appVersionId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LocationAlertRequest": {
        "properties": {
          "collectionFrequencySeconds": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "distanceMeters": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "mapType": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "notificationEmail": {
            "nullable": true,
            "type": "string"
          },
          "originLatitude": {
            "nullable": true,
            "type": "string"
          },
          "originLongitude": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "PaymentDeviceDiscoveryCandidate": {
        "properties": {
          "confidence": {
            "type": "string"
          },
          "connectionMode": {
            "nullable": true,
            "type": "string"
          },
          "endpoint": {
            "$ref": "#/components/schemas/PaymentDeviceNetworkEndpoint",
            "nullable": true
          },
          "identity": {
            "$ref": "#/components/schemas/PaymentDeviceIdentity"
          },
          "reachability": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "transport": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "confidence",
          "identity",
          "reachability"
        ],
        "type": "object"
      },
      "PaymentDeviceIdentity": {
        "properties": {
          "family": {
            "nullable": true,
            "type": "string"
          },
          "lastSeenAt": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "model": {
            "nullable": true,
            "type": "string"
          },
          "networkEndpoint": {
            "$ref": "#/components/schemas/PaymentDeviceNetworkEndpoint",
            "nullable": true
          },
          "observedEndpointMatches": {
            "nullable": true,
            "type": "boolean"
          },
          "provider": {
            "nullable": true,
            "type": "string"
          },
          "serialNumber": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "terminalDeviceId": {
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "terminalDeviceId"
        ],
        "type": "object"
      },
      "PaymentDeviceNetworkEndpoint": {
        "properties": {
          "address": {
            "nullable": true,
            "type": "string"
          },
          "endpoint": {
            "nullable": true,
            "type": "string"
          },
          "host": {
            "nullable": true,
            "type": "string"
          },
          "lastSeenAt": {
            "nullable": true,
            "type": "string"
          },
          "networkType": {
            "nullable": true,
            "type": "string"
          },
          "port": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "protocol": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentDeviceReadinessResponse": {
        "properties": {
          "bindingValid": {
            "type": "boolean"
          },
          "credentialsReady": {
            "type": "boolean"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "identity": {
            "$ref": "#/components/schemas/PaymentDeviceIdentity"
          },
          "identityVerified": {
            "type": "boolean"
          },
          "missingCapabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reachable": {
            "type": "boolean"
          },
          "ready": {
            "type": "boolean"
          },
          "refreshHint": {
            "$ref": "#/components/schemas/PaymentDeviceRefreshHint",
            "nullable": true
          },
          "routing": {
            "$ref": "#/components/schemas/PaymentDeviceRoutingContract",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "supportedCapabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "telemetry": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "transactionReady": {
            "type": "boolean"
          }
        },
        "required": [
          "bindingValid",
          "credentialsReady",
          "identity",
          "identityVerified",
          "reachable",
          "ready",
          "status",
          "transactionReady"
        ],
        "type": "object"
      },
      "PaymentDeviceRefreshHint": {
        "properties": {
          "configVersion": {
            "nullable": true,
            "type": "string"
          },
          "credentialVersion": {
            "nullable": true,
            "type": "string"
          },
          "refreshAfter": {
            "nullable": true,
            "type": "string"
          },
          "refreshRequired": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PaymentDeviceRoutingContract": {
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/PaymentDeviceNetworkEndpoint",
            "nullable": true
          },
          "issuedAt": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "provider": {
            "nullable": true,
            "type": "string"
          },
          "routingKey": {
            "type": "string"
          },
          "serialNumber": {
            "nullable": true,
            "type": "string"
          },
          "terminalDeviceId": {
            "type": "string"
          },
          "transactionMetadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "issuedAt",
          "locationId",
          "routingKey",
          "terminalDeviceId"
        ],
        "type": "object"
      },
      "RevokeDeviceRequest": {
        "properties": {
          "reason": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "SdkDeviceIdentityResponse": {
        "properties": {
          "appPackage": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceModel": {
            "nullable": true,
            "type": "string"
          },
          "enrolledAt": {
            "type": "string"
          },
          "hostSerialNumber": {
            "nullable": true,
            "type": "string"
          },
          "installationId": {
            "nullable": true,
            "type": "string"
          },
          "lastAttestedAt": {
            "nullable": true,
            "type": "string"
          },
          "lastAttestedBy": {
            "nullable": true,
            "type": "string"
          },
          "linkedTerminalSerialNumber": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "terminalProvider": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "enrolledAt",
          "organizationId",
          "platform",
          "status"
        ],
        "type": "object"
      },
      "SmartConnectTopologyResponse": {
        "properties": {
          "endpointHost": {
            "type": "string"
          },
          "endpointPort": {
            "format": "int32",
            "type": "integer"
          },
          "hostDeviceId": {
            "type": "string"
          },
          "linkedSerial": {
            "type": "string"
          }
        },
        "required": [
          "endpointHost",
          "endpointPort",
          "hostDeviceId",
          "linkedSerial"
        ],
        "type": "object"
      },
      "TerminalClaimActionResult": {
        "properties": {
          "claimId": {
            "format": "uuid",
            "type": "string"
          },
          "lifecycle": {
            "$ref": "#/components/schemas/TerminalDeviceClaimLifecycle"
          },
          "remoteMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "remoteTerminalId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "claimId",
          "lifecycle"
        ],
        "type": "object"
      },
      "TerminalClaimPreflightResponse": {
        "properties": {
          "claimId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "gatewayDeviceId": {
            "nullable": true,
            "type": "string"
          },
          "hardwareId": {
            "type": "string"
          },
          "lifecycle": {
            "$ref": "#/components/schemas/TerminalDeviceClaimLifecycle",
            "nullable": true
          },
          "merchantId": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CloudTerminalProvider"
          },
          "providerTerminalId": {
            "nullable": true,
            "type": "string"
          },
          "remoteMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "remoteTerminalId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TerminalClaimPreflightStatus"
          }
        },
        "required": [
          "hardwareId",
          "merchantId",
          "provider",
          "status"
        ],
        "type": "object"
      },
      "TerminalClaimPreflightStatus": {
        "enum": [
          "CLAIMABLE",
          "ALREADY_BOUND_TO_REQUESTED_LOCATION",
          "REQUIRES_RECOVERY",
          "UNSUPPORTED_FOR_BINDING",
          "BOUND_TO_ANOTHER_LOCATION",
          "UNKNOWN_SERIAL"
        ],
        "type": "string"
      },
      "TerminalDevice": {
        "properties": {
          "bindingStatus": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "credentialProfileId": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceInfo": {
            "$ref": "#/components/schemas/TerminalDeviceInfo",
            "nullable": true
          },
          "lastSeenAt": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "notificationPreferences": {
            "$ref": "#/components/schemas/TerminalDeviceNotificationPreferences",
            "nullable": true
          },
          "platform": {
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "nullable": true,
            "type": "string"
          },
          "providerTerminalId": {
            "nullable": true,
            "type": "string"
          },
          "pushTokenState": {
            "nullable": true,
            "type": "string"
          },
          "serialNumber": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "deviceId"
        ],
        "type": "object"
      },
      "TerminalDeviceBatchClosedRequest": {
        "properties": {
          "batchId": {
            "minLength": 1,
            "type": "string"
          },
          "batchNumber": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "nullable": true,
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "data": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "targetDeviceIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "batchId"
        ],
        "type": "object"
      },
      "TerminalDeviceClaimLifecycle": {
        "enum": [
          "UNBOUND",
          "CLAIMED",
          "PROVISIONING",
          "PENDING_CLOUD_SYNC",
          "BOUND",
          "CONFLICT",
          "FAILED_OPERATION",
          "REQUIRES_RECONCILIATION"
        ],
        "type": "string"
      },
      "TerminalDeviceCommandRequest": {
        "properties": {
          "command": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string"
          },
          "data": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "reason": {
            "maxLength": 200,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "command"
        ],
        "type": "object"
      },
      "TerminalDeviceCommandResult": {
        "properties": {
          "command": {
            "type": "string"
          },
          "deliveredAt": {
            "nullable": true,
            "type": "string"
          },
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "command",
          "deviceId",
          "status"
        ],
        "type": "object"
      },
      "TerminalDeviceCommandResultRequest": {
        "properties": {
          "detail": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TerminalDeviceCommandResultStatus"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "TerminalDeviceCommandResultStatus": {
        "enum": [
          "ACKNOWLEDGED",
          "COMPLETED",
          "FAILED"
        ],
        "type": "string"
      },
      "TerminalDeviceCommandStatus": {
        "properties": {
          "command": {
            "type": "string"
          },
          "commandId": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "deliveredAt": {
            "nullable": true,
            "type": "string"
          },
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "resultAt": {
            "nullable": true,
            "type": "string"
          },
          "resultDetail": {
            "nullable": true,
            "type": "string"
          },
          "resultStatus": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "command",
          "commandId",
          "deviceId",
          "status"
        ],
        "type": "object"
      },
      "TerminalDeviceCommandSummary": {
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "latestCommand": {
            "$ref": "#/components/schemas/TerminalDeviceCommandStatus",
            "nullable": true
          },
          "latestPendingCommand": {
            "$ref": "#/components/schemas/TerminalDeviceCommandStatus",
            "nullable": true
          },
          "pendingCommandCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalCommandCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "deviceId",
          "pendingCommandCount",
          "totalCommandCount"
        ],
        "type": "object"
      },
      "TerminalDeviceHeartbeatRequest": {
        "properties": {
          "deviceInfo": {
            "$ref": "#/components/schemas/TerminalDeviceInfo",
            "nullable": true
          },
          "hasOfflineServerReplayBacklog": {
            "nullable": true,
            "type": "boolean"
          },
          "hasOutstandingRecovery": {
            "nullable": true,
            "type": "boolean"
          },
          "needsReconciliationCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "offlineQueueSize": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "pendingOperationCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "pushToken": {
            "maxLength": 200,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TerminalDeviceHeartbeatResponse": {
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/TerminalDeviceNotification"
            },
            "type": "array"
          },
          "recordedAt": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "recordedAt",
          "status"
        ],
        "type": "object"
      },
      "TerminalDeviceInfo": {
        "properties": {
          "appBuild": {
            "nullable": true,
            "type": "string"
          },
          "appVersion": {
            "nullable": true,
            "type": "string"
          },
          "batteryLevel": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "deviceFamily": {
            "nullable": true,
            "type": "string"
          },
          "deviceModel": {
            "nullable": true,
            "type": "string"
          },
          "deviceName": {
            "nullable": true,
            "type": "string"
          },
          "gatewayName": {
            "nullable": true,
            "type": "string"
          },
          "isCharging": {
            "nullable": true,
            "type": "boolean"
          },
          "manufacturer": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "networkType": {
            "nullable": true,
            "type": "string"
          },
          "platformVersion": {
            "nullable": true,
            "type": "string"
          },
          "runtimeCapabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "runtimeFamily": {
            "nullable": true,
            "type": "string"
          },
          "runtimeName": {
            "nullable": true,
            "type": "string"
          },
          "screenResolution": {
            "nullable": true,
            "type": "string"
          },
          "timeZone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TerminalDeviceNotification": {
        "properties": {
          "batchId": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "data": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "deviceId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "notificationId": {
            "type": "string"
          },
          "readAt": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/TerminalDeviceNotificationType"
          }
        },
        "required": [
          "notificationId",
          "type"
        ],
        "type": "object"
      },
      "TerminalDeviceNotificationDispatchResult": {
        "properties": {
          "failedCount": {
            "format": "int32",
            "type": "integer"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/TerminalDeviceNotification"
            },
            "type": "array"
          },
          "sentCount": {
            "format": "int32",
            "type": "integer"
          },
          "skippedCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalTargets": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/TerminalDeviceNotificationType"
          }
        },
        "required": [
          "failedCount",
          "sentCount",
          "skippedCount",
          "totalTargets",
          "type"
        ],
        "type": "object"
      },
      "TerminalDeviceNotificationPreferences": {
        "properties": {
          "batchEventsEnabled": {
            "type": "boolean"
          },
          "commandsEnabled": {
            "type": "boolean"
          },
          "generalAnnouncementsEnabled": {
            "type": "boolean"
          },
          "recoveryAlertsEnabled": {
            "type": "boolean"
          },
          "settlementFailureEnabled": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "TerminalDeviceNotificationType": {
        "enum": [
          "BATCH_CLOSED",
          "BATCH_FAILED",
          "DEVICE_COMMAND",
          "RECOVERY_REQUIRED",
          "GENERAL_ANNOUNCEMENT"
        ],
        "type": "string"
      },
      "TerminalDeviceRegistrationRequest": {
        "properties": {
          "deviceId": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string"
          },
          "deviceInfo": {
            "$ref": "#/components/schemas/TerminalDeviceInfo",
            "nullable": true
          },
          "notificationPreferences": {
            "$ref": "#/components/schemas/TerminalDeviceNotificationPreferences",
            "nullable": true
          },
          "platform": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string"
          },
          "pushToken": {
            "maxLength": 200,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "platform"
        ],
        "type": "object"
      },
      "TerminalProvider": {
        "enum": [
          "NEXGO"
        ],
        "type": "string"
      },
      "UpdateDeviceAliasRequest": {
        "properties": {
          "alias": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "alias"
        ],
        "type": "object"
      },
      "UpdateDeviceClassRequest": {
        "properties": {
          "deviceClass": {
            "$ref": "#/components/schemas/DeviceClass"
          }
        },
        "required": [
          "deviceClass"
        ],
        "type": "object"
      },
      "XtmsAppPushAttemptListResponse": {
        "properties": {
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/XtmsAppPushAttemptResponse"
            },
            "type": "array"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "serialNumber": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "count",
          "limit",
          "locationId",
          "offset"
        ],
        "type": "object"
      },
      "XtmsAppPushAttemptResponse": {
        "properties": {
          "actor": {
            "nullable": true,
            "type": "string"
          },
          "actorType": {
            "nullable": true,
            "type": "string"
          },
          "appPackageName": {
            "nullable": true,
            "type": "string"
          },
          "appVersionId": {
            "nullable": true,
            "type": "string"
          },
          "attemptCount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "attemptId": {
            "type": "string"
          },
          "attemptedAt": {
            "type": "string"
          },
          "cloudStatus": {
            "nullable": true,
            "type": "string"
          },
          "easyDeployTemplateId": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "errorDetail": {
            "nullable": true,
            "type": "string"
          },
          "gatewayProvider": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "nextAttemptAt": {
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/CardPresentDeviceProvider"
          },
          "pushKind": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "serialNumber": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/XtmsAppPushSource"
          },
          "status": {
            "type": "string"
          },
          "terminalClaimId": {
            "nullable": true,
            "type": "string"
          },
          "terminalId": {
            "nullable": true,
            "type": "string"
          },
          "xtmsPushId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "attemptId",
          "attemptedAt",
          "locationId",
          "merchantId",
          "provider",
          "pushKind",
          "retryable",
          "serialNumber",
          "source",
          "status"
        ],
        "type": "object"
      },
      "XtmsAppPushSource": {
        "enum": [
          "CARD_PRESENT_DEVICE_ACTION",
          "CREDENTIAL_ROTATION"
        ],
        "type": "string"
      },
      "CheckoutRecaptchaDecisionTimeline": {
        "properties": {
          "legitimacyScore": {
            "format": "double",
            "type": "number"
          },
          "riskAnalysisReasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "riskReasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scoreThreshold": {
            "format": "double",
            "type": "number"
          },
          "transactionRisk": {
            "format": "double",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "legitimacyScore",
          "riskAnalysisReasons",
          "riskReasons",
          "scoreThreshold"
        ],
        "type": "object"
      },
      "DecisionTimelineEventKind": {
        "enum": [
          "ROUTE_DECISION",
          "FRAUD_DECISION",
          "PROCESSOR_ATTEMPT",
          "CASCADE_ADVICE",
          "POST_AUTH_ENFORCEMENT",
          "OUTCOME",
          "ROOT_STOP"
        ],
        "type": "string"
      },
      "DecisionTimelineEvidenceStatus": {
        "enum": [
          "UNKNOWN",
          "HISTORICAL_UNCLASSIFIED",
          "RECORDED"
        ],
        "type": "string"
      },
      "DecisionTimelineResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/MerchantDecisionTimelineEvent"
            },
            "type": "array"
          },
          "evidenceStatus": {
            "$ref": "#/components/schemas/DecisionTimelineEvidenceStatus"
          },
          "outcomeCode": {
            "$ref": "#/components/schemas/SmartRoutingMerchantOutcome",
            "nullable": true
          },
          "outcomeLabel": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "evidenceStatus",
          "reason",
          "transactionId"
        ],
        "type": "object"
      },
      "DunningCase": {
        "properties": {
          "amountAtRisk": {
            "format": "int64",
            "type": "integer"
          },
          "closedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "declineCategory": {
            "nullable": true,
            "type": "string"
          },
          "hostedSetupIntentId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "nextAction": {
            "description": "MERCHANT_RETRY: one explicit retry with openedCycle/retryCount as the exact selector; never automatic.",
            "nullable": true,
            "type": "string"
          },
          "nextActionAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "openedCycle": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "recoveredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recoveryMethod": {
            "nullable": true,
            "type": "string"
          },
          "retryCount": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "Case lifecycle. MERCHANT_RETRY_AVAILABLE is open: automatic retries stopped, but the merchant may retry or cancel.",
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountAtRisk",
          "currency",
          "customerId",
          "id",
          "merchantId",
          "openedCycle",
          "retryCount",
          "status",
          "subscriptionId"
        ],
        "type": "object"
      },
      "DunningCaseEvent": {
        "properties": {
          "billingEventId": {
            "nullable": true,
            "type": "string"
          },
          "caseId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "declineCategory": {
            "nullable": true,
            "type": "string"
          },
          "detail": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "eventType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "caseId",
          "eventType",
          "id"
        ],
        "type": "object"
      },
      "DunningCaseSendLinkResult": {
        "properties": {
          "channel": {
            "nullable": true,
            "type": "string"
          },
          "sent": {
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "type": "object"
      },
      "DunningCaseStatus": {
        "enum": [
          "OPEN",
          "RETRYING",
          "MERCHANT_RETRY_AVAILABLE",
          "AWAITING_PAYMENT_METHOD",
          "AUTHENTICATION_REQUIRED",
          "PENDING_UPDATER",
          "UPDATER_UNAVAILABLE",
          "RISK_REVIEW",
          "RECOVERED",
          "CLOSED_LOST",
          "CLOSED_MANUAL"
        ],
        "type": "string"
      },
      "DunningCaseWithEvents": {
        "properties": {
          "case": {
            "$ref": "#/components/schemas/DunningCase"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/DunningCaseEvent"
            },
            "type": "array"
          },
          "timelineSelector": {
            "$ref": "#/components/schemas/RecurringDecisionTimelineSelector",
            "nullable": true
          }
        },
        "required": [
          "case",
          "events"
        ],
        "type": "object"
      },
      "DunningConfig": {
        "properties": {
          "categoryRetryIntervals": {
            "additionalProperties": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            },
            "nullable": true,
            "type": "object"
          },
          "finalAction": {
            "type": "string"
          },
          "maxRetries": {
            "format": "int32",
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "notifyCustomer": {
            "type": "boolean"
          },
          "notifyMerchant": {
            "type": "boolean"
          },
          "retryIntervals": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": "array"
          },
          "stopOnHardDecline": {
            "type": "boolean"
          }
        },
        "required": [
          "finalAction",
          "maxRetries",
          "merchantId",
          "notifyCustomer",
          "notifyMerchant",
          "retryIntervals"
        ],
        "type": "object"
      },
      "MerchantDecisionTimelineEvent": {
        "properties": {
          "attemptOrdinal": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "checkoutRecaptcha": {
            "$ref": "#/components/schemas/CheckoutRecaptchaDecisionTimeline",
            "nullable": true
          },
          "evidenceStatus": {
            "$ref": "#/components/schemas/DecisionTimelineEvidenceStatus"
          },
          "kind": {
            "$ref": "#/components/schemas/DecisionTimelineEventKind"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "outcomeCode": {
            "$ref": "#/components/schemas/SmartRoutingMerchantOutcome",
            "nullable": true
          },
          "outcomeLabel": {
            "nullable": true,
            "type": "string"
          },
          "processorAccountDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "relatedRouteDecisionOrdinal": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "routeDecisionOrdinal": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "occurredAt",
          "reason"
        ],
        "type": "object"
      },
      "PaginatedResponseDunningCase": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DunningCase"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "RecurringDecisionTimelineSelector": {
        "properties": {
          "attempt": {
            "format": "int32",
            "type": "integer"
          },
          "cycle": {
            "format": "int32",
            "type": "integer"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "attempt",
          "cycle",
          "subscriptionId"
        ],
        "type": "object"
      },
      "SendDunningLinkRequest": {
        "properties": {
          "supportReason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "supportReason"
        ],
        "type": "object"
      },
      "SmartRoutingMerchantOutcome": {
        "enum": [
          "FIRST_ATTEMPT_APPROVAL",
          "RECOVERED_SALE",
          "SMART_RECOVERY_IN_PROGRESS",
          "NO_RECOVERY_ROUTE_AVAILABLE",
          "AUTHENTICATION_REQUIRED",
          "PROCESSOR_TEMPORARILY_UNAVAILABLE",
          "DECLINED",
          "PENDING"
        ],
        "type": "string"
      },
      "UpsertDunningConfigRequest": {
        "properties": {
          "categoryRetryIntervals": {
            "additionalProperties": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            },
            "nullable": true,
            "type": "object"
          },
          "finalAction": {
            "minLength": 1,
            "type": "string"
          },
          "maxRetries": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "notifyCustomer": {
            "type": "boolean"
          },
          "notifyMerchant": {
            "type": "boolean"
          },
          "retryIntervals": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "minItems": 1,
            "type": "array"
          },
          "stopOnHardDecline": {
            "type": "boolean"
          }
        },
        "required": [
          "finalAction",
          "maxRetries",
          "retryIntervals"
        ],
        "type": "object"
      },
      "CapabilityScope": {
        "enum": [
          "PLATFORM",
          "ORGANIZATION"
        ],
        "type": "string"
      },
      "ExternalCapability": {
        "enum": [
          "THREE_DS",
          "APPLE_PAY",
          "GOOGLE_PAY",
          "ACH_TENDER",
          "EBT_TENDER",
          "FRAUD",
          "TOKENIZATION",
          "NETWORK_TOKENIZATION",
          "SMART_ROUTING",
          "ACCOUNT_UPDATER",
          "AGENTIC_CHECKOUT",
          "AMEX_ENHANCED_AUTHORIZATION",
          "DISCOVER_ENHANCED_DECISIONING",
          "CARD_NOT_PRESENT",
          "SMART_POS",
          "TTP_IOS_NATIVE",
          "TTP_IOS_NEARPAY",
          "TTP_ANDROID_NEARPAY",
          "TTP_ANDROID_NATIVE"
        ],
        "type": "string"
      },
      "ExternalCapabilityState": {
        "properties": {
          "capability": {
            "$ref": "#/components/schemas/ExternalCapability"
          },
          "defaultGrant": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "granted": {
            "nullable": true,
            "type": "boolean"
          },
          "platformEnabled": {
            "nullable": true,
            "type": "boolean"
          },
          "provider": {
            "nullable": true,
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/CapabilityScope"
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "capability",
          "defaultGrant",
          "enabled",
          "scope"
        ],
        "type": "object"
      },
      "CardPresentIntegrityAvailability": {
        "enum": [
          "AVAILABLE",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "CardPresentIntegrityCaptureReason": {
        "enum": [
          "NOT_CAPTURED",
          "ENTRY_MODE_UNAVAILABLE",
          "POLICY_VERSION_UNAVAILABLE"
        ],
        "type": "string"
      },
      "CardPresentIntegrityEntryMode": {
        "enum": [
          "MANUAL",
          "SWIPE",
          "FALLBACK_SWIPE",
          "EMV",
          "CONTACTLESS",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "CardPresentIntegrityEvidence": {
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/CardPresentIntegrityAvailability"
          },
          "entryMode": {
            "$ref": "#/components/schemas/CardPresentIntegrityEntryMode",
            "nullable": true
          },
          "locationId": {
            "type": "string"
          },
          "matchedIndicators": {
            "items": {
              "enum": [
                "FALLBACK_SWIPE",
                "KEYED_ENTRY"
              ],
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "policyVersion": {
            "nullable": true,
            "type": "string"
          },
          "processorTerminalId": {
            "nullable": true,
            "type": "string"
          },
          "recorded": {
            "type": "boolean"
          },
          "score": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "scoreStatus": {
            "$ref": "#/components/schemas/CardPresentIntegrityScoreStatus"
          },
          "scoreUnavailableReason": {
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          },
          "unavailableReason": {
            "$ref": "#/components/schemas/CardPresentIntegrityCaptureReason",
            "nullable": true
          }
        },
        "required": [
          "availability",
          "entryMode",
          "locationId",
          "matchedIndicators",
          "observedAt",
          "organizationId",
          "policyVersion",
          "processorTerminalId",
          "recorded",
          "score",
          "scoreStatus",
          "scoreUnavailableReason",
          "transactionId",
          "unavailableReason"
        ],
        "type": "object"
      },
      "CardPresentIntegrityScoreStatus": {
        "enum": [
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "CardPresentIntegritySource": {
        "enum": [
          "NEARPAY",
          "SEMI_INTEGRATED",
          "BOLT"
        ],
        "type": "string"
      },
      "CardPresentIntegritySummary": {
        "properties": {
          "historicalCoverage": {
            "$ref": "#/components/schemas/CardPresentIntegrityAvailability"
          },
          "historicalCoverageReason": {
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "observedBefore": {
            "format": "date-time",
            "type": "string"
          },
          "observedFrom": {
            "format": "date-time",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "policyVersion": {
            "type": "string"
          },
          "scoreStatus": {
            "$ref": "#/components/schemas/CardPresentIntegrityScoreStatus"
          },
          "scoreUnavailableReason": {
            "type": "string"
          },
          "terminals": {
            "items": {
              "$ref": "#/components/schemas/CardPresentIntegrityTerminalSummary"
            },
            "type": "array"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "historicalCoverage",
          "historicalCoverageReason",
          "locationId",
          "observedBefore",
          "observedFrom",
          "organizationId",
          "policyVersion",
          "scoreStatus",
          "scoreUnavailableReason",
          "terminals",
          "truncated"
        ],
        "type": "object"
      },
      "CardPresentIntegrityTerminalSummary": {
        "properties": {
          "fallbackCount": {
            "format": "int64",
            "type": "integer"
          },
          "fallbackRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "keyedCount": {
            "format": "int64",
            "type": "integer"
          },
          "keyedRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "knownEntryModeCount": {
            "format": "int64",
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "processorTerminalId": {
            "nullable": true,
            "type": "string"
          },
          "recordedCount": {
            "format": "int64",
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/CardPresentIntegritySource"
          },
          "unavailableEntryModeCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "fallbackCount",
          "fallbackRate",
          "keyedCount",
          "keyedRate",
          "knownEntryModeCount",
          "merchantId",
          "processorTerminalId",
          "recordedCount",
          "source",
          "unavailableEntryModeCount"
        ],
        "type": "object"
      },
      "FraudAggregateDimension": {
        "enum": [
          "CREDENTIAL",
          "CUSTOMER",
          "IP"
        ],
        "type": "string"
      },
      "FraudCe3PriorCandidates": {
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "ids"
        ],
        "type": "object"
      },
      "FraudConsideredRule": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudDisposition"
          },
          "availability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability",
            "nullable": true
          },
          "consideration": {
            "$ref": "#/components/schemas/FraudRuleConsideration"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "observed": {
            "$ref": "#/components/schemas/FraudDecisionValue",
            "nullable": true
          },
          "operatorAction": {
            "$ref": "#/components/schemas/FraudRuleAction",
            "nullable": true
          },
          "priority": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "reasonCode": {
            "type": "string"
          },
          "ruleId": {
            "type": "string"
          },
          "ruleVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "scoreStatus": {
            "$ref": "#/components/schemas/FraudScoreStatus",
            "nullable": true
          },
          "threshold": {
            "$ref": "#/components/schemas/FraudDecisionValue",
            "nullable": true
          },
          "triggerResult": {
            "$ref": "#/components/schemas/FraudRuleTriggerResult"
          },
          "windowSeconds": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "action",
          "consideration",
          "reasonCode",
          "ruleId",
          "triggerResult"
        ],
        "type": "object"
      },
      "FraudDecisionChannel": {
        "enum": [
          "CARD_PRESENT",
          "CARD_NOT_PRESENT",
          "ACH",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudDecisionDetail": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "channel": {
            "$ref": "#/components/schemas/FraudDecisionChannel"
          },
          "consideredRules": {
            "items": {
              "$ref": "#/components/schemas/FraudConsideredRule"
            },
            "type": "array"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "disposition": {
            "$ref": "#/components/schemas/FraudDisposition"
          },
          "engineVersion": {
            "type": "string"
          },
          "evaluatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "finalScore": {
            "$ref": "#/components/schemas/FraudFinalScoreEvidence",
            "nullable": true
          },
          "historicalSignals": {
            "items": {
              "$ref": "#/components/schemas/FraudHistoricalSignalEvidence"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string"
          },
          "policyVersion": {
            "type": "string"
          },
          "precedencePath": {
            "items": {
              "$ref": "#/components/schemas/FraudPrecedenceStep"
            },
            "type": "array"
          },
          "processorProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "reasonCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "safeTransactionScore": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "scoreEvidenceSources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "scoreModelVersion": {
            "type": "string"
          },
          "scorePhase": {
            "$ref": "#/components/schemas/PaymentRiskScorePhase",
            "nullable": true
          },
          "scoreProvenance": {
            "$ref": "#/components/schemas/FraudScoreProvenance",
            "nullable": true
          },
          "scoreSourceDecisionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "scoreStatus": {
            "$ref": "#/components/schemas/FraudScoreStatus"
          },
          "signals": {
            "items": {
              "$ref": "#/components/schemas/FraudDecisionSignal"
            },
            "type": "array"
          },
          "supersededDecisionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "channel",
          "consideredRules",
          "decisionId",
          "disposition",
          "engineVersion",
          "evaluatedAt",
          "organizationId",
          "paymentReference",
          "policyVersion",
          "precedencePath",
          "reasonCodes",
          "scoreModelVersion",
          "scoreStatus",
          "signals"
        ],
        "type": "object"
      },
      "FraudDecisionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudDecisionSummary"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "unconfirmedReversalFilterApplied": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "organizationId",
          "total"
        ],
        "type": "object"
      },
      "FraudDecisionSignal": {
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "provenance": {
            "$ref": "#/components/schemas/FraudSignalProvenance"
          },
          "type": {
            "$ref": "#/components/schemas/FraudSignalType"
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "availability",
          "provenance",
          "type"
        ],
        "type": "object"
      },
      "FraudDecisionSummary": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "channel": {
            "$ref": "#/components/schemas/FraudDecisionChannel"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "disposition": {
            "$ref": "#/components/schemas/FraudDisposition"
          },
          "engineVersion": {
            "type": "string"
          },
          "evaluatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "finalScore": {
            "$ref": "#/components/schemas/FraudFinalScoreEvidence",
            "nullable": true
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "paymentReference": {
            "type": "string"
          },
          "policyVersion": {
            "type": "string"
          },
          "reasonCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "safeTransactionScore": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "scoreEvidenceSources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "scoreModelVersion": {
            "type": "string"
          },
          "scorePhase": {
            "$ref": "#/components/schemas/PaymentRiskScorePhase",
            "nullable": true
          },
          "scoreProvenance": {
            "$ref": "#/components/schemas/FraudScoreProvenance",
            "nullable": true
          },
          "scoreSourceDecisionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "scoreStatus": {
            "$ref": "#/components/schemas/FraudScoreStatus"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "channel",
          "decisionId",
          "disposition",
          "engineVersion",
          "evaluatedAt",
          "paymentReference",
          "policyVersion",
          "reasonCodes",
          "scoreModelVersion",
          "scoreStatus"
        ],
        "type": "object"
      },
      "FraudDecisionValue": {
        "properties": {
          "booleanValue": {
            "nullable": true,
            "type": "boolean"
          },
          "numericValue": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unit": {
            "$ref": "#/components/schemas/FraudDecisionValueUnit"
          }
        },
        "required": [
          "unit"
        ],
        "type": "object"
      },
      "FraudDecisionValueUnit": {
        "enum": [
          "COUNT",
          "AMOUNT_MINOR",
          "PRESENCE",
          "SECONDS",
          "SAFE_TRANSACTION_SCORE",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudDeviceComponentsEvidence": {
        "properties": {
          "language": {
            "nullable": true,
            "type": "string"
          },
          "platformDescription": {
            "nullable": true,
            "type": "string"
          },
          "screen": {
            "nullable": true,
            "type": "string"
          },
          "timezone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FraudDeviceSessionEvidence": {
        "properties": {
          "checkoutSessionId": {
            "nullable": true,
            "type": "string"
          },
          "deviceComponents": {
            "$ref": "#/components/schemas/FraudDeviceComponentsEvidence",
            "nullable": true
          },
          "deviceFingerprint": {
            "nullable": true,
            "type": "string"
          },
          "v": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "v"
        ],
        "type": "object"
      },
      "FraudDisposition": {
        "enum": [
          "ALLOW",
          "REVIEW",
          "BLOCK",
          "FAILED",
          "POST_AUTH_VOID",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudDispositionCounts": {
        "properties": {
          "allowCount": {
            "format": "int64",
            "type": "integer"
          },
          "blockCount": {
            "format": "int64",
            "type": "integer"
          },
          "holdCount": {
            "format": "int64",
            "type": "integer"
          },
          "postAuthVoidCount": {
            "format": "int64",
            "type": "integer"
          },
          "reviewCount": {
            "format": "int64",
            "type": "integer"
          },
          "unknownCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "allowCount",
          "blockCount",
          "holdCount",
          "postAuthVoidCount",
          "reviewCount",
          "unknownCount"
        ],
        "type": "object"
      },
      "FraudEvidenceAddress": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "line1": {
            "nullable": true,
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FraudEvidenceAvailability": {
        "enum": [
          "AVAILABLE",
          "UNAVAILABLE",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudEvidenceLineItem": {
        "properties": {
          "merchantAccountId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "value": {
            "format": "double",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "FraudEvidenceSummary": {
        "properties": {
          "accountLinkRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "cnpTransactionCount": {
            "format": "int32",
            "type": "integer"
          },
          "deviceFingerprintRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "ipRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "lineItemsRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "organizationId": {
            "type": "string"
          },
          "policyAckRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "shippingAddressRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "windowDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "accountLinkRate",
          "cnpTransactionCount",
          "deviceFingerprintRate",
          "ipRate",
          "lineItemsRate",
          "organizationId",
          "policyAckRate",
          "shippingAddressRate",
          "windowDays"
        ],
        "type": "object"
      },
      "FraudFinalScoreEvidence": {
        "properties": {
          "actualDelta": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "factor": {
            "type": "string"
          },
          "issuerAvsWeight": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "mappingVersion": {
            "type": "string"
          },
          "modelVersion": {
            "type": "string"
          },
          "nominalContribution": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "normalizedAvs": {
            "$ref": "#/components/schemas/IssuerPostAuthAvs"
          },
          "policyVersion": {
            "nullable": true,
            "type": "string"
          },
          "preAuthModelVersion": {
            "type": "string"
          },
          "preAuthScore": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "preAuthStatus": {
            "$ref": "#/components/schemas/FraudScoreStatus"
          },
          "processorAttemptId": {
            "format": "uuid",
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "recordedAt": {
            "format": "date-time",
            "type": "string"
          },
          "score": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/FraudFinalScoreEvidenceSource"
          },
          "sourceDecisionId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FraudScoreStatus"
          }
        },
        "required": [
          "factor",
          "mappingVersion",
          "modelVersion",
          "normalizedAvs",
          "preAuthModelVersion",
          "preAuthStatus",
          "processorAttemptId",
          "processorPlatform",
          "recordedAt",
          "source",
          "sourceDecisionId",
          "status"
        ],
        "type": "object"
      },
      "FraudFinalScoreEvidenceSource": {
        "enum": [
          "DURABLE_APPROVED_AUTHORIZATION"
        ],
        "type": "string"
      },
      "FraudHistoricalSignalEvidence": {
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "networkRiskLane": {
            "nullable": true,
            "type": "string"
          },
          "networkRiskMappingVersion": {
            "nullable": true,
            "type": "string"
          },
          "networkRiskOperationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "provenance": {
            "$ref": "#/components/schemas/FraudSignalProvenance"
          },
          "type": {
            "$ref": "#/components/schemas/FraudHistoricalSignalType"
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "availability",
          "provenance",
          "type"
        ],
        "type": "object"
      },
      "FraudHistoricalSignalType": {
        "enum": [
          "RISK_SCORE_RANGE_1",
          "RISK_SCORE_RANGE_2",
          "RISK_SCORE_RANGE_3",
          "RISK_SCORE_RANGE_4",
          "RISK_SCORE_RANGE_5",
          "RISK_SCORE_RANGE_6",
          "RISK_SCORE_RANGE_7",
          "RISK_SCORE_RANGE_8",
          "RISK_SCORE_UNAVAILABLE"
        ],
        "type": "string"
      },
      "FraudIdentityAccountEvidence": {
        "properties": {
          "accountCreatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "customerAccountId": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "emailVerified": {
            "nullable": true,
            "type": "boolean"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "v": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "v"
        ],
        "type": "object"
      },
      "FraudInstrumentEvidence": {
        "properties": {
          "bin": {
            "nullable": true,
            "type": "string"
          },
          "brand": {
            "nullable": true,
            "type": "string"
          },
          "funding": {
            "nullable": true,
            "type": "string"
          },
          "threeDs": {
            "$ref": "#/components/schemas/FraudThreeDsEvidence",
            "nullable": true
          },
          "v": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "v"
        ],
        "type": "object"
      },
      "FraudNetworkContextEvidence": {
        "properties": {
          "clientIp": {
            "nullable": true,
            "type": "string"
          },
          "userAgent": {
            "nullable": true,
            "type": "string"
          },
          "v": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "v"
        ],
        "type": "object"
      },
      "FraudOrderFulfillmentEvidence": {
        "properties": {
          "billingAddress": {
            "$ref": "#/components/schemas/FraudEvidenceAddress",
            "nullable": true
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/FraudEvidenceLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "policyAck": {
            "$ref": "#/components/schemas/FraudPolicyAckEvidence",
            "nullable": true
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/FraudEvidenceAddress",
            "nullable": true
          },
          "v": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "v"
        ],
        "type": "object"
      },
      "FraudOverview": {
        "properties": {
          "allowCount": {
            "format": "int64",
            "type": "integer"
          },
          "amountAvailability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "amountUnavailableReason": {
            "nullable": true,
            "type": "string"
          },
          "attentionCount": {
            "format": "int64",
            "type": "integer"
          },
          "blockCount": {
            "format": "int64",
            "type": "integer"
          },
          "blockRate": {
            "format": "double",
            "type": "number"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "evaluatedFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "evaluatedTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fraudCount": {
            "format": "int64",
            "type": "integer"
          },
          "fraudRate": {
            "format": "double",
            "type": "number"
          },
          "holdCount": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "postAuthVoidCount": {
            "format": "int64",
            "type": "integer"
          },
          "reviewCount": {
            "format": "int64",
            "type": "integer"
          },
          "reviewRate": {
            "format": "double",
            "type": "number"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "totalAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unknownCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "allowCount",
          "amountAvailability",
          "amountUnavailableReason",
          "attentionCount",
          "blockCount",
          "blockRate",
          "currency",
          "fraudCount",
          "fraudRate",
          "holdCount",
          "organizationId",
          "postAuthVoidCount",
          "reviewCount",
          "reviewRate",
          "total",
          "totalAmountMinor",
          "unknownCount"
        ],
        "type": "object"
      },
      "FraudPolicyAckEvidence": {
        "properties": {
          "acknowledgedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "version": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FraudPrecedenceStep": {
        "properties": {
          "disposition": {
            "$ref": "#/components/schemas/FraudDisposition"
          },
          "reasonCode": {
            "type": "string"
          },
          "ruleId": {
            "nullable": true,
            "type": "string"
          },
          "selected": {
            "type": "boolean"
          }
        },
        "required": [
          "disposition",
          "reasonCode",
          "selected"
        ],
        "type": "object"
      },
      "FraudRecentDecisionsResponse": {
        "properties": {
          "evaluatedFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "evaluatedTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudDecisionSummary"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "items",
          "organizationId"
        ],
        "type": "object"
      },
      "FraudRelatedActivity": {
        "properties": {
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "dimensions": {
            "items": {
              "$ref": "#/components/schemas/FraudRelatedDimension"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "decisionId",
          "dimensions",
          "organizationId"
        ],
        "type": "object"
      },
      "FraudRelatedAmount": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "totalAmountMinor": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "totalAmountMinor"
        ],
        "type": "object"
      },
      "FraudRelatedDimension": {
        "properties": {
          "amountAvailability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "amountUnavailableReason": {
            "nullable": true,
            "type": "string"
          },
          "amounts": {
            "items": {
              "$ref": "#/components/schemas/FraudRelatedAmount"
            },
            "type": "array"
          },
          "availability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "decisionCount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "dimension": {
            "$ref": "#/components/schemas/FraudAggregateDimension"
          },
          "dispositionCounts": {
            "$ref": "#/components/schemas/FraudDispositionCounts",
            "nullable": true
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          },
          "windowDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "amountAvailability",
          "amountUnavailableReason",
          "amounts",
          "availability",
          "decisionCount",
          "dimension",
          "dispositionCounts",
          "unavailableReason",
          "windowDays"
        ],
        "type": "object"
      },
      "FraudRuleAction": {
        "enum": [
          "ALLOW",
          "REVIEW",
          "BLOCK",
          "POST_AUTH_VOID",
          "MONITOR"
        ],
        "type": "string"
      },
      "FraudRuleConsideration": {
        "enum": [
          "CONSIDERED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudRuleMatchMode": {
        "enum": [
          "TRIGGERED",
          "CONSIDERED"
        ],
        "type": "string"
      },
      "FraudRuleTriggerResult": {
        "enum": [
          "TRIGGERED",
          "NOT_TRIGGERED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudScoreProvenance": {
        "enum": [
          "PRE_AUTH_DECISION"
        ],
        "type": "string"
      },
      "FraudScoreStatus": {
        "enum": [
          "AVAILABLE",
          "INSUFFICIENT_INPUT",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudSignalProvenance": {
        "enum": [
          "REQUEST",
          "POLICY_ENGINE",
          "VELOCITY_STORE",
          "NETWORK_RISK_ENRICHMENT",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudSignalType": {
        "enum": [
          "CARD_TESTING",
          "BANK_ACCOUNT_TESTING",
          "RECENT_DECLINE_BURST",
          "RECENT_HIGH_RISK_SCORE",
          "PRIOR_CHARGEBACK",
          "CVV_MISMATCH",
          "HIGH_RISK_COUNTRY",
          "ADDRESS_MATCH",
          "ADDRESS_MISMATCH",
          "ADDRESS_UNAVAILABLE",
          "ZIP_MATCH",
          "ZIP_MISMATCH",
          "ZIP_UNAVAILABLE",
          "NAME_MATCH",
          "NAME_MISMATCH",
          "NAME_UNAVAILABLE",
          "PHONE_MATCH",
          "PHONE_MISMATCH",
          "PHONE_UNAVAILABLE",
          "EMAIL_MATCH",
          "EMAIL_MISMATCH",
          "EMAIL_UNAVAILABLE",
          "IP_ADDRESS_MATCH",
          "IP_ADDRESS_MISMATCH",
          "IP_ADDRESS_UNAVAILABLE",
          "NETWORK_ENHANCED_AUTH_AVAILABLE",
          "NETWORK_ENHANCED_AUTH_UNAVAILABLE",
          "NETWORK_ENHANCED_AUTH_UNKNOWN",
          "RECAPTCHA_AUTOMATION",
          "RECAPTCHA_UNEXPECTED_ENVIRONMENT",
          "RECAPTCHA_TOO_MUCH_TRAFFIC",
          "RECAPTCHA_UNEXPECTED_USAGE_PATTERNS",
          "RECAPTCHA_LOW_CONFIDENCE",
          "RECAPTCHA_HIGH_TRANSACTION_VELOCITY",
          "RECAPTCHA_EXCESSIVE_ENUMERATION_PATTERN",
          "RECAPTCHA_SHORT_IDENTITY_HISTORY",
          "RECAPTCHA_GEOLOCATION_DISCREPANCY",
          "RECAPTCHA_ASSOCIATED_WITH_FRAUD_CLUSTER",
          "RECAPTCHA_STOLEN_INSTRUMENT_HIGH_RISK_V1",
          "RECAPTCHA_CARD_TESTING_HIGH_RISK_V1",
          "RECAPTCHA_LOW_BEHAVIORAL_TRUST_V1",
          "RECAPTCHA_UNKNOWN",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "FraudThreeDsEvidence": {
        "properties": {
          "authenticationStatusDescription": {
            "nullable": true,
            "type": "string"
          },
          "dsTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "eci": {
            "nullable": true,
            "type": "string"
          },
          "version": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FraudTopRule": {
        "properties": {
          "allowCount": {
            "format": "int64",
            "type": "integer"
          },
          "blockCount": {
            "format": "int64",
            "type": "integer"
          },
          "holdCount": {
            "format": "int64",
            "type": "integer"
          },
          "postAuthVoidCount": {
            "format": "int64",
            "type": "integer"
          },
          "reviewCount": {
            "format": "int64",
            "type": "integer"
          },
          "ruleId": {
            "type": "string"
          },
          "ruleVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "triggeredCount": {
            "format": "int64",
            "type": "integer"
          },
          "unknownCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "allowCount",
          "blockCount",
          "holdCount",
          "postAuthVoidCount",
          "reviewCount",
          "ruleId",
          "triggeredCount",
          "unknownCount"
        ],
        "type": "object"
      },
      "FraudTopRulesResponse": {
        "properties": {
          "evaluatedFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "evaluatedTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudTopRule"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "items",
          "organizationId"
        ],
        "type": "object"
      },
      "FraudTransactionEvidence": {
        "properties": {
          "ce3PriorCandidates": {
            "$ref": "#/components/schemas/FraudCe3PriorCandidates"
          },
          "evidence": {
            "$ref": "#/components/schemas/FraudTransactionSignals",
            "nullable": true
          },
          "organizationId": {
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "ce3PriorCandidates",
          "evidence",
          "organizationId",
          "transactionId"
        ],
        "type": "object"
      },
      "FraudTransactionSignals": {
        "properties": {
          "billingCountry": {
            "nullable": true,
            "type": "string"
          },
          "billingPostalCodePresent": {
            "nullable": true,
            "type": "boolean"
          },
          "billingShippingAddressMatch": {
            "nullable": true,
            "type": "boolean"
          },
          "billingStreetPresent": {
            "nullable": true,
            "type": "boolean"
          },
          "deviceSession": {
            "$ref": "#/components/schemas/FraudDeviceSessionEvidence",
            "nullable": true
          },
          "identityAccount": {
            "$ref": "#/components/schemas/FraudIdentityAccountEvidence",
            "nullable": true
          },
          "instrument": {
            "$ref": "#/components/schemas/FraudInstrumentEvidence",
            "nullable": true
          },
          "lineItemCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "lineItemTotalMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "merchantCreationMs": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "networkContext": {
            "$ref": "#/components/schemas/FraudNetworkContextEvidence",
            "nullable": true
          },
          "orderFulfillment": {
            "$ref": "#/components/schemas/FraudOrderFulfillmentEvidence",
            "nullable": true
          },
          "shippingAddressPresent": {
            "nullable": true,
            "type": "boolean"
          },
          "shippingCountry": {
            "nullable": true,
            "type": "string"
          },
          "shippingPostalCodePresent": {
            "nullable": true,
            "type": "boolean"
          },
          "shippingValueMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "userEmailVerified": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "IssuerPostAuthAvs": {
        "enum": [
          "MATCH",
          "NO_MATCH",
          "PARTIAL",
          "UNKNOWN",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "PaymentRiskScorePhase": {
        "enum": [
          "PRE_ROUTING_ACCOUNT_INDEPENDENT",
          "SELECTED_ROUTE_PRE_AUTH"
        ],
        "type": "string"
      },
      "ApprovalRateQualifyingOperation": {
        "enum": [
          "processSale",
          "processAuth",
          "processWalletSale",
          "processWalletAuth",
          "forceAuth",
          "processRecurring"
        ],
        "type": "string"
      },
      "CardHistoryAttemptSummary": {
        "properties": {
          "attemptId": {
            "format": "uuid",
            "type": "string"
          },
          "fraudDisposition": {
            "$ref": "#/components/schemas/CardHistoryFraudDisposition",
            "nullable": true
          },
          "operation": {
            "$ref": "#/components/schemas/ApprovalRateQualifyingOperation"
          },
          "outcomeCategory": {
            "$ref": "#/components/schemas/ProcessorOutcomeCategory"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform",
            "nullable": true
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType",
            "nullable": true
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "attemptId",
          "operation",
          "outcomeCategory",
          "startedAt",
          "transactionId"
        ],
        "type": "object"
      },
      "CardHistoryAvailability": {
        "enum": [
          "COMPLETE",
          "INCOMPLETE",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "CardHistoryFraudDisposition": {
        "enum": [
          "ALLOW",
          "REVIEW",
          "FAILED",
          "POST_AUTH_VOID",
          "BLOCK"
        ],
        "type": "string"
      },
      "CardHistoryQueryRequest": {
        "properties": {
          "asOf": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "selector": {
            "$ref": "#/components/schemas/CardHistorySelector"
          }
        },
        "required": [
          "organizationId",
          "selector"
        ],
        "type": "object"
      },
      "CardHistoryResponse": {
        "properties": {
          "asOf": {
            "format": "date-time",
            "type": "string"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/CardHistoryAttemptSummary"
            },
            "type": "array"
          },
          "availability": {
            "$ref": "#/components/schemas/CardHistoryAvailability"
          },
          "locationId": {
            "type": "string"
          },
          "newestTransactions": {
            "items": {
              "$ref": "#/components/schemas/CardHistoryTransactionSummary"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          },
          "unavailableReason": {
            "$ref": "#/components/schemas/CardHistoryUnavailableReason"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/CardHistoryWindowStats"
            },
            "type": "array"
          }
        },
        "required": [
          "asOf",
          "attempts",
          "availability",
          "newestTransactions",
          "organizationId",
          "windows"
        ],
        "type": "object"
      },
      "CardHistorySelector": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/CardHistorySelectorKind"
          },
          "reference": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "kind",
          "reference"
        ],
        "type": "object"
      },
      "CardHistorySelectorKind": {
        "enum": [
          "CUSTOMER",
          "SAVED_PAYMENT_METHOD"
        ],
        "type": "string"
      },
      "CardHistoryTransactionSummary": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "fraudDisposition": {
            "$ref": "#/components/schemas/CardHistoryFraudDisposition",
            "nullable": true
          },
          "locationId": {
            "type": "string"
          },
          "processorAttemptCount": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          },
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType"
          }
        },
        "required": [
          "createdAt",
          "locationId",
          "processorAttemptCount",
          "status",
          "transactionId",
          "transactionType"
        ],
        "type": "object"
      },
      "CardHistoryUnavailableReason": {
        "enum": [
          "CARD_METADATA_UNAVAILABLE",
          "CARD_METADATA_PAGE_INCOMPLETE",
          "CARD_HISTORY_UNAVAILABLE"
        ],
        "type": "string"
      },
      "CardHistoryWindow": {
        "enum": [
          "HOURS_24",
          "DAYS_7",
          "DAYS_30",
          "DAYS_365"
        ],
        "type": "string"
      },
      "CardHistoryWindowStats": {
        "properties": {
          "approvalRateBasisPoints": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "approvedAttempts": {
            "format": "int64",
            "type": "integer"
          },
          "declinedAttempts": {
            "format": "int64",
            "type": "integer"
          },
          "qualifyingAttempts": {
            "format": "int64",
            "type": "integer"
          },
          "window": {
            "$ref": "#/components/schemas/CardHistoryWindow"
          }
        },
        "required": [
          "approvalRateBasisPoints",
          "approvedAttempts",
          "declinedAttempts",
          "qualifyingAttempts",
          "window"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtection": {
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "currentMetrics": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionMetric"
          },
          "enabled": {
            "type": "boolean"
          },
          "evaluationPeriod": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionEvaluationPeriod"
          },
          "id": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "minimumApprovalRateBasisPoints": {
            "format": "int32",
            "type": "integer"
          },
          "minimumTransactions": {
            "format": "int32",
            "type": "integer"
          },
          "mutationAction": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionHistoryAction",
            "nullable": true
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "mutationVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "pastDay": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionMetric"
          },
          "pastHour": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionMetric"
          },
          "pastMonth": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionMetric"
          },
          "pastWeek": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionMetric"
          },
          "policySummary": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionPolicySummary"
          },
          "processorProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recentDeclineContributors": {
            "items": {
              "$ref": "#/components/schemas/FraudApprovalRateProtectionDeclineContributor"
            },
            "type": "array"
          },
          "recentDeclines": {
            "items": {
              "$ref": "#/components/schemas/FraudApprovalRateProtectionRecentDecline"
            },
            "type": "array"
          },
          "replayed": {
            "type": "boolean"
          },
          "restoredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "restriction": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionRestriction",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionScope"
          },
          "status": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionStatus"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "configured",
          "currentMetrics",
          "enabled",
          "evaluationPeriod",
          "id",
          "minimumApprovalRateBasisPoints",
          "minimumTransactions",
          "mutationAction",
          "mutationId",
          "mutationVersion",
          "organizationId",
          "pastDay",
          "pastHour",
          "pastMonth",
          "pastWeek",
          "policySummary",
          "processorProfileId",
          "recentDeclineContributors",
          "recentDeclines",
          "replayed",
          "restoredAt",
          "restriction",
          "scope",
          "status",
          "updatedAt",
          "updatedBy",
          "version"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionConfigSnapshot": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "evaluationPeriod": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionEvaluationPeriod"
          },
          "minimumApprovalRateBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 1,
            "type": "integer"
          },
          "minimumTransactions": {
            "format": "int32",
            "maximum": 100000.0,
            "minimum": 1,
            "type": "integer"
          },
          "restoredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "restrictedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionStatus"
          }
        },
        "required": [
          "enabled",
          "evaluationPeriod",
          "minimumApprovalRateBasisPoints",
          "minimumTransactions",
          "restoredAt",
          "restrictedAt",
          "status"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionDeclineContributor": {
        "properties": {
          "count": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "reasonCode": {
            "type": "string"
          },
          "shareBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "count",
          "reasonCode",
          "shareBasisPoints"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionEvaluationPeriod": {
        "enum": [
          "HOURLY",
          "DAILY",
          "WEEKLY",
          "MONTHLY"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionHistoryAction": {
        "enum": [
          "CONFIG_CREATED",
          "CONFIG_CHANGED",
          "ENABLED",
          "DISABLED",
          "RESTRICTED",
          "RESTORED"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionHistoryEntry": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionHistoryAction"
          },
          "actionId": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "fromVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "snapshot": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionConfigSnapshot",
            "nullable": true
          },
          "snapshotAvailable": {
            "type": "boolean"
          },
          "toVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "action",
          "actionId",
          "actor",
          "createdAt",
          "fromVersion",
          "reason",
          "snapshot",
          "snapshotAvailable",
          "toVersion"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionHistoryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudApprovalRateProtectionHistoryEntry"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionMetric": {
        "properties": {
          "approvalRateBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "approvedAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "declinedAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "period": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionEvaluationPeriod"
          },
          "qualifyingAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "windowEndedAt": {
            "format": "date-time",
            "type": "string"
          },
          "windowMinutes": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "windowStartedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "approvalRateBasisPoints",
          "approvedAttempts",
          "declinedAttempts",
          "period",
          "qualifyingAttempts",
          "windowEndedAt",
          "windowMinutes",
          "windowStartedAt"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionPolicySummary": {
        "properties": {
          "qualifyingOperations": {
            "items": {
              "$ref": "#/components/schemas/FraudApprovalRateProtectionQualifyingOperation"
            },
            "type": "array"
          },
          "sentence": {
            "type": "string"
          },
          "stickyRestriction": {
            "type": "boolean"
          }
        },
        "required": [
          "qualifyingOperations",
          "sentence",
          "stickyRestriction"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionProcessorPlatform": {
        "enum": [
          "TRANSIT",
          "SIERRA",
          "RAPID_CONNECT",
          "CARDPOINTE",
          "EPG",
          "ECPI",
          "SERVER_POST",
          "MAVERICK_ACH"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionProcessorType": {
        "enum": [
          "TSYS",
          "FISERV",
          "ELAVON",
          "CHASE",
          "WORLDPAY",
          "HEARTLAND",
          "EPX",
          "MAVERICK"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionQualifyingOperation": {
        "enum": [
          "processSale",
          "processAuth",
          "processWalletSale",
          "processWalletAuth",
          "forceAuth",
          "processRecurring"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionRecentDecline": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionProcessorPlatform",
            "nullable": true
          },
          "processorProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionProcessorType",
            "nullable": true
          },
          "reasonCode": {
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "occurredAt",
          "processorPlatform",
          "processorProfileId",
          "processorType",
          "reasonCode",
          "transactionId"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionRestoreRequest": {
        "properties": {
          "expectedVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedVersion",
          "reason"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionRestriction": {
        "properties": {
          "approvalRateBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          },
          "approvedAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "declinedAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "evaluationPeriod": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionEvaluationPeriod"
          },
          "qualifyingAttempts": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "restrictedAt": {
            "format": "date-time",
            "type": "string"
          },
          "thresholdBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "approvalRateBasisPoints",
          "approvedAttempts",
          "declinedAttempts",
          "evaluationPeriod",
          "qualifyingAttempts",
          "restrictedAt",
          "thresholdBasisPoints"
        ],
        "type": "object"
      },
      "FraudApprovalRateProtectionScope": {
        "enum": [
          "ORGANIZATION",
          "PROCESSOR_PROFILE"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionStatus": {
        "enum": [
          "HEALTHY",
          "RESTRICTED"
        ],
        "type": "string"
      },
      "FraudApprovalRateProtectionUpdateRequest": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "evaluationPeriod": {
            "$ref": "#/components/schemas/FraudApprovalRateProtectionEvaluationPeriod"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "minimumApprovalRateBasisPoints": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 1,
            "type": "integer"
          },
          "minimumTransactions": {
            "format": "int32",
            "maximum": 100000.0,
            "minimum": 1,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "evaluationPeriod",
          "expectedVersion",
          "minimumApprovalRateBasisPoints",
          "minimumTransactions",
          "reason"
        ],
        "type": "object"
      },
      "FraudListAllowScope": {
        "properties": {
          "broadBypassConfirmed": {
            "type": "boolean"
          },
          "ruleIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 0,
            "type": "array",
            "uniqueItems": true
          },
          "type": {
            "$ref": "#/components/schemas/FraudListAllowScopeType"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "FraudListAllowScopeType": {
        "enum": [
          "SELECTED_RULES",
          "BROAD_BYPASS"
        ],
        "type": "string"
      },
      "FraudListBlockAction": {
        "enum": [
          "REVIEW",
          "DENY"
        ],
        "type": "string"
      },
      "FraudListBulkCreateRequest": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/FraudListBulkLineRequest"
            },
            "maxItems": 1000,
            "minItems": 0,
            "type": "array"
          }
        },
        "required": [
          "entries"
        ],
        "type": "object"
      },
      "FraudListBulkError": {
        "properties": {
          "field": {
            "type": "string"
          },
          "line": {
            "format": "int32",
            "type": "integer"
          },
          "reasonCode": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "line",
          "reasonCode"
        ],
        "type": "object"
      },
      "FraudListBulkLineRequest": {
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/FraudListCreateRequest"
          },
          "line": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "entry",
          "line"
        ],
        "type": "object"
      },
      "FraudListBulkResponse": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/FraudListEntry"
            },
            "type": "array"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/FraudListBulkError"
            },
            "type": "array"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "entries",
          "errors"
        ],
        "type": "object"
      },
      "FraudListCreateRequest": {
        "properties": {
          "allowScope": {
            "$ref": "#/components/schemas/FraudListAllowScope",
            "nullable": true
          },
          "blockAction": {
            "$ref": "#/components/schemas/FraudListBlockAction",
            "nullable": true
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FraudListKind"
          },
          "notes": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "reasonCode": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "value": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          },
          "valueType": {
            "$ref": "#/components/schemas/FraudListValueType"
          }
        },
        "required": [
          "kind",
          "reasonCode",
          "value",
          "valueType"
        ],
        "type": "object"
      },
      "FraudListDisableRequest": {
        "properties": {
          "expectedRevision": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reasonCode": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedRevision",
          "reasonCode"
        ],
        "type": "object"
      },
      "FraudListEffectiveStatus": {
        "enum": [
          "ACTIVE",
          "DISABLED",
          "EXPIRED"
        ],
        "type": "string"
      },
      "FraudListEntry": {
        "properties": {
          "allowScope": {
            "$ref": "#/components/schemas/FraudListAllowScope",
            "nullable": true
          },
          "blockAction": {
            "$ref": "#/components/schemas/FraudListBlockAction",
            "nullable": true
          },
          "canonicalValue": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdByActorId": {
            "type": "string"
          },
          "effectiveStatus": {
            "$ref": "#/components/schemas/FraudListEffectiveStatus"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FraudListKind"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reasonCode": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/FraudListEntryStatus"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedByActorId": {
            "type": "string"
          },
          "valueType": {
            "$ref": "#/components/schemas/FraudListValueType"
          }
        },
        "required": [
          "canonicalValue",
          "createdAt",
          "createdByActorId",
          "effectiveStatus",
          "id",
          "kind",
          "organizationId",
          "reasonCode",
          "revision",
          "status",
          "updatedAt",
          "updatedByActorId",
          "valueType"
        ],
        "type": "object"
      },
      "FraudListEntryStatus": {
        "enum": [
          "ACTIVE",
          "DISABLED"
        ],
        "type": "string"
      },
      "FraudListIpProvenance": {
        "enum": [
          "TRUSTED_CLIENT_IP_RESOLVER"
        ],
        "type": "string"
      },
      "FraudListKind": {
        "enum": [
          "ALLOW",
          "BLOCK"
        ],
        "type": "string"
      },
      "FraudListMatchRequest": {
        "properties": {
          "binIin": {
            "maxLength": 8,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "candidateRuleIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "minItems": 0,
            "type": "array",
            "uniqueItems": true
          },
          "country": {
            "maxLength": 2,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "credentialFingerprint": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "customerReference": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "emailDomain": {
            "maxLength": 253,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "ipAddress": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "ipProvenance": {
            "$ref": "#/components/schemas/FraudListIpProvenance",
            "nullable": true
          },
          "tokenReference": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FraudListMatchResponse": {
        "properties": {
          "broadBypass": {
            "type": "boolean"
          },
          "bypassedRuleIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "denied": {
            "type": "boolean"
          },
          "matchedEntryIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "reviewed": {
            "type": "boolean"
          }
        },
        "required": [
          "broadBypass",
          "bypassedRuleIds",
          "denied",
          "matchedEntryIds",
          "reviewed"
        ],
        "type": "object"
      },
      "FraudListPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudListEntry"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "FraudListUpdateRequest": {
        "properties": {
          "allowScope": {
            "$ref": "#/components/schemas/FraudListAllowScope",
            "nullable": true
          },
          "blockAction": {
            "$ref": "#/components/schemas/FraudListBlockAction",
            "nullable": true
          },
          "clearExpiration": {
            "type": "boolean"
          },
          "clearNotes": {
            "type": "boolean"
          },
          "expectedRevision": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "reasonCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FraudListEntryStatus",
            "nullable": true
          }
        },
        "required": [
          "expectedRevision"
        ],
        "type": "object"
      },
      "FraudListValueType": {
        "enum": [
          "IP_ADDRESS",
          "IP_CIDR",
          "IP_RANGE",
          "CREDENTIAL_FINGERPRINT",
          "TOKEN_REFERENCE",
          "BIN_IIN",
          "CUSTOMER",
          "EMAIL",
          "EMAIL_DOMAIN",
          "COUNTRY"
        ],
        "type": "string"
      },
      "FraudReviewAction": {
        "enum": [
          "ASSIGN",
          "ADD_NOTE",
          "START_INVESTIGATION",
          "ESCALATE",
          "CLEAR",
          "CONFIRM_FRAUD"
        ],
        "type": "string"
      },
      "FraudReviewActionRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudReviewAction"
          },
          "assignee": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "commandKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "expectedVersion": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "action",
          "commandKey",
          "expectedVersion",
          "reason"
        ],
        "type": "object"
      },
      "FraudReviewActionResponse": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudReviewActionTimelineItem"
          },
          "addToListHandoff": {
            "$ref": "#/components/schemas/FraudReviewAddToListHandoff",
            "nullable": true
          },
          "availableActions": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewAction"
            },
            "type": "array",
            "uniqueItems": true
          },
          "replayed": {
            "type": "boolean"
          },
          "reviewCase": {
            "$ref": "#/components/schemas/FraudReviewCase"
          }
        },
        "required": [
          "action",
          "addToListHandoff",
          "availableActions",
          "replayed",
          "reviewCase"
        ],
        "type": "object"
      },
      "FraudReviewActionTimelineItem": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudReviewAction"
          },
          "actor": {
            "type": "string"
          },
          "assignee": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resultingResolution": {
            "$ref": "#/components/schemas/FraudReviewResolution",
            "nullable": true
          },
          "resultingStatus": {
            "$ref": "#/components/schemas/FraudReviewStatus"
          },
          "resultingVersion": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "action",
          "actor",
          "assignee",
          "createdAt",
          "id",
          "reason",
          "resultingResolution",
          "resultingStatus",
          "resultingVersion"
        ],
        "type": "object"
      },
      "FraudReviewAddToListHandoff": {
        "properties": {
          "allowedDestination": {
            "$ref": "#/components/schemas/FraudReviewListDestination"
          },
          "serverReference": {
            "type": "string"
          },
          "valueType": {
            "$ref": "#/components/schemas/FraudReviewListValueType"
          }
        },
        "required": [
          "allowedDestination",
          "serverReference",
          "valueType"
        ],
        "type": "object"
      },
      "FraudReviewCaptureRequest": {
        "properties": {
          "amount": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "commandKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "expectedVersion": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "commandKey",
          "expectedVersion",
          "reason"
        ],
        "type": "object"
      },
      "FraudReviewCaptureResponse": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "caseId": {
            "format": "uuid",
            "type": "string"
          },
          "commandKey": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FraudReviewCaptureStatus"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "caseId",
          "commandKey",
          "organizationId",
          "status",
          "transactionId"
        ],
        "type": "object"
      },
      "FraudReviewCaptureStatus": {
        "enum": [
          "PENDING",
          "UNKNOWN",
          "SUCCEEDED",
          "DECLINED"
        ],
        "type": "string"
      },
      "FraudReviewCase": {
        "properties": {
          "assignee": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "matchedRuleCount": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "originalDisposition": {
            "$ref": "#/components/schemas/FraudReviewDisposition"
          },
          "paymentReference": {
            "type": "string"
          },
          "resolution": {
            "$ref": "#/components/schemas/FraudReviewResolution",
            "nullable": true
          },
          "riskLevel": {
            "$ref": "#/components/schemas/FraudReviewRiskLevel"
          },
          "status": {
            "$ref": "#/components/schemas/FraudReviewStatus"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "assignee",
          "createdAt",
          "id",
          "matchedRuleCount",
          "organizationId",
          "originalDisposition",
          "paymentReference",
          "resolution",
          "riskLevel",
          "status",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "FraudReviewCaseDetail": {
        "properties": {
          "addToListHandoff": {
            "$ref": "#/components/schemas/FraudReviewAddToListHandoff",
            "nullable": true
          },
          "availableActions": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewAction"
            },
            "type": "array",
            "uniqueItems": true
          },
          "explanation": {
            "$ref": "#/components/schemas/FraudReviewDecisionExplanation"
          },
          "reviewCase": {
            "$ref": "#/components/schemas/FraudReviewCase"
          },
          "timeline": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewActionTimelineItem"
            },
            "type": "array"
          }
        },
        "required": [
          "addToListHandoff",
          "availableActions",
          "explanation",
          "reviewCase",
          "timeline"
        ],
        "type": "object"
      },
      "FraudReviewDecisionAction": {
        "enum": [
          "ALLOW",
          "REVIEW",
          "BLOCK",
          "POST_AUTH_VOID"
        ],
        "type": "string"
      },
      "FraudReviewDecisionExplanation": {
        "properties": {
          "decisionAt": {
            "format": "date-time",
            "type": "string"
          },
          "fraudDecisionId": {
            "format": "uuid",
            "type": "string"
          },
          "historicalSignals": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewHistoricalSignalEvidence"
            },
            "type": "array"
          },
          "matchedRules": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewMatchedRule"
            },
            "type": "array"
          },
          "signals": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "decisionAt",
          "fraudDecisionId",
          "matchedRules",
          "signals",
          "summary"
        ],
        "type": "object"
      },
      "FraudReviewDisposition": {
        "enum": [
          "REVIEW",
          "BLOCK"
        ],
        "type": "string"
      },
      "FraudReviewHistoricalSignalEvidence": {
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/FraudEvidenceAvailability"
          },
          "networkRiskLane": {
            "nullable": true,
            "type": "string"
          },
          "networkRiskMappingVersion": {
            "nullable": true,
            "type": "string"
          },
          "networkRiskOperationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "provenance": {
            "$ref": "#/components/schemas/FraudSignalProvenance"
          },
          "type": {
            "$ref": "#/components/schemas/FraudHistoricalSignalType"
          },
          "unavailableReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "availability",
          "provenance",
          "type"
        ],
        "type": "object"
      },
      "FraudReviewListDestination": {
        "enum": [
          "ALLOW",
          "BLOCK"
        ],
        "type": "string"
      },
      "FraudReviewListValueType": {
        "enum": [
          "IP_ADDRESS",
          "IP_CIDR",
          "IP_RANGE",
          "CREDENTIAL_FINGERPRINT",
          "TOKEN_REFERENCE",
          "BIN_IIN",
          "CUSTOMER",
          "EMAIL",
          "EMAIL_DOMAIN",
          "COUNTRY"
        ],
        "type": "string"
      },
      "FraudReviewMatchedRule": {
        "properties": {
          "contribution": {
            "$ref": "#/components/schemas/FraudReviewDecisionAction"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "ruleId": {
            "type": "string"
          }
        },
        "required": [
          "contribution",
          "displayName",
          "reason",
          "ruleId"
        ],
        "type": "object"
      },
      "FraudReviewPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudReviewCase"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "nextCursor",
          "pageSize",
          "total"
        ],
        "type": "object"
      },
      "FraudReviewResolution": {
        "enum": [
          "CLEAR",
          "CONFIRMED_FRAUD"
        ],
        "type": "string"
      },
      "FraudReviewRiskLevel": {
        "enum": [
          "INFO",
          "CRITICAL"
        ],
        "type": "string"
      },
      "FraudReviewStatus": {
        "enum": [
          "NEEDS_REVIEW",
          "INVESTIGATING",
          "ESCALATED",
          "RESOLVED"
        ],
        "type": "string"
      },
      "FraudRule": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudRuleAction"
          },
          "applicability": {
            "$ref": "#/components/schemas/FraudRuleApplicabilityResponse",
            "nullable": true
          },
          "baseRuleId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "channels": {
            "items": {
              "$ref": "#/components/schemas/FraudRuleChannel"
            },
            "nullable": true,
            "type": "array",
            "uniqueItems": true
          },
          "condition": {
            "$ref": "#/components/schemas/FraudRuleCondition"
          },
          "definedScope": {
            "$ref": "#/components/schemas/FraudRuleScope"
          },
          "effectiveRule": {
            "$ref": "#/components/schemas/FraudRule",
            "nullable": true
          },
          "effectiveVersion": {
            "format": "int64",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "inherited": {
            "type": "boolean"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "projectionDeleted": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean"
          },
          "requestedScope": {
            "$ref": "#/components/schemas/FraudRuleScope"
          },
          "ruleId": {
            "format": "uuid",
            "type": "string"
          },
          "sentence": {
            "type": "string"
          },
          "sourceRuleId": {
            "format": "uuid",
            "type": "string"
          },
          "sourceVersion": {
            "format": "int64",
            "type": "integer"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "action",
          "baseRuleId",
          "condition",
          "definedScope",
          "effectiveVersion",
          "enabled",
          "inherited",
          "name",
          "organizationId",
          "priority",
          "projectionDeleted",
          "replayed",
          "requestedScope",
          "ruleId",
          "sentence",
          "sourceRuleId",
          "sourceVersion",
          "version"
        ],
        "type": "object"
      },
      "FraudRuleApplicabilityResponse": {
        "properties": {
          "methods": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "producer": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "requiredCapabilities": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "status": {
            "$ref": "#/components/schemas/FraudRuleApplicabilityStatus"
          }
        },
        "required": [
          "methods",
          "requiredCapabilities",
          "status"
        ],
        "type": "object"
      },
      "FraudRuleApplicabilityStatus": {
        "enum": [
          "AUTHORITATIVE",
          "ADVISORY",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "FraudRuleChannel": {
        "enum": [
          "CNP",
          "CARD_PRESENT",
          "KEYED",
          "RECURRING"
        ],
        "type": "string"
      },
      "FraudRuleCondition": {
        "properties": {
          "currency": {
            "nullable": true,
            "pattern": "[A-Za-z]{3}",
            "type": "string"
          },
          "entity": {
            "$ref": "#/components/schemas/FraudRuleEntity"
          },
          "metric": {
            "$ref": "#/components/schemas/FraudRuleMetric"
          },
          "modelVersion": {
            "description": "Required for SAFE_TRANSACTION_SCORE: payment-risk-v1, 0 lowest risk and 100 highest. Not an approval probability.",
            "enum": [
              "payment-risk-v1"
            ],
            "nullable": true,
            "type": "string"
          },
          "operator": {
            "$ref": "#/components/schemas/FraudRuleOperator"
          },
          "signal": {
            "$ref": "#/components/schemas/FraudRuleSignal",
            "nullable": true
          },
          "state": {
            "$ref": "#/components/schemas/FraudRuleState",
            "nullable": true
          },
          "threshold": {
            "nullable": true,
            "type": "string"
          },
          "window": {
            "$ref": "#/components/schemas/FraudRuleWindow",
            "nullable": true
          }
        },
        "required": [
          "entity",
          "metric",
          "operator"
        ],
        "type": "object"
      },
      "FraudRuleCreateRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudRuleAction"
          },
          "baseRuleId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "channels": {
            "description": "Creation omission uses all channels. Nonempty server-authoritative channel scope.",
            "items": {
              "$ref": "#/components/schemas/FraudRuleChannel"
            },
            "maxItems": 4,
            "minItems": 1,
            "nullable": true,
            "type": "array",
            "uniqueItems": true
          },
          "condition": {
            "$ref": "#/components/schemas/FraudRuleCondition"
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "maximum": 1000000.0,
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/FraudRuleScope"
          }
        },
        "required": [
          "action",
          "condition",
          "enabled",
          "name",
          "priority",
          "reason",
          "scope"
        ],
        "type": "object"
      },
      "FraudRuleEntity": {
        "enum": [
          "TRANSACTION",
          "PAYMENT_CREDENTIAL",
          "SOURCE_IP",
          "CUSTOMER",
          "BIN_IIN"
        ],
        "type": "string"
      },
      "FraudRuleMetric": {
        "enum": [
          "AMOUNT",
          "VELOCITY_COUNT",
          "VELOCITY_AMOUNT",
          "VELOCITY_DISTINCT_CREDENTIALS",
          "SIGNAL",
          "SAFE_TRANSACTION_SCORE"
        ],
        "type": "string"
      },
      "FraudRuleMutationRequest": {
        "properties": {
          "expectedVersion": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedVersion",
          "reason"
        ],
        "type": "object"
      },
      "FraudRuleOperator": {
        "enum": [
          "GREATER_THAN_OR_EQUAL",
          "LESS_THAN_OR_EQUAL",
          "PRESENT"
        ],
        "type": "string"
      },
      "FraudRulePack": {
        "properties": {
          "createdRuleCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "initializedRuleIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          },
          "packVersion": {
            "type": "string"
          },
          "preservedDeletedRuleCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "preservedExistingRuleCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "initializedRuleIds",
          "organizationId",
          "packVersion",
          "reason"
        ],
        "type": "object"
      },
      "FraudRulePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FraudRule"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "ruleChannelsMonitorWritesEnabled": {
            "type": "boolean"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "FraudRuleScope": {
        "properties": {
          "processorProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/FraudRuleScopeType"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "FraudRuleScopeType": {
        "enum": [
          "DEFAULT",
          "PROCESSOR_PROFILE"
        ],
        "type": "string"
      },
      "FraudRuleSignal": {
        "enum": [
          "CARD_TESTING",
          "BANK_ACCOUNT_TESTING",
          "RECENT_DECLINE_BURST",
          "RECENT_HIGH_RISK_SCORE",
          "PRIOR_CHARGEBACK",
          "CVV_MISMATCH",
          "HIGH_RISK_COUNTRY",
          "ADDRESS_MATCH",
          "ADDRESS_MISMATCH",
          "ADDRESS_UNAVAILABLE",
          "ZIP_MATCH",
          "ZIP_MISMATCH",
          "ZIP_UNAVAILABLE",
          "NAME_MATCH",
          "NAME_MISMATCH",
          "NAME_UNAVAILABLE",
          "PHONE_MATCH",
          "PHONE_MISMATCH",
          "PHONE_UNAVAILABLE",
          "EMAIL_MATCH",
          "EMAIL_MISMATCH",
          "EMAIL_UNAVAILABLE",
          "IP_ADDRESS_MATCH",
          "IP_ADDRESS_MISMATCH",
          "IP_ADDRESS_UNAVAILABLE",
          "NETWORK_ENHANCED_AUTH_AVAILABLE",
          "NETWORK_ENHANCED_AUTH_UNAVAILABLE",
          "NETWORK_ENHANCED_AUTH_UNKNOWN",
          "RECAPTCHA_AUTOMATION",
          "RECAPTCHA_UNEXPECTED_ENVIRONMENT",
          "RECAPTCHA_TOO_MUCH_TRAFFIC",
          "RECAPTCHA_UNEXPECTED_USAGE_PATTERNS",
          "RECAPTCHA_LOW_CONFIDENCE",
          "RECAPTCHA_HIGH_TRANSACTION_VELOCITY",
          "RECAPTCHA_EXCESSIVE_ENUMERATION_PATTERN",
          "RECAPTCHA_SHORT_IDENTITY_HISTORY",
          "RECAPTCHA_GEOLOCATION_DISCREPANCY",
          "RECAPTCHA_ASSOCIATED_WITH_FRAUD_CLUSTER",
          "RECAPTCHA_STOLEN_INSTRUMENT_HIGH_RISK_V1",
          "RECAPTCHA_CARD_TESTING_HIGH_RISK_V1",
          "RECAPTCHA_LOW_BEHAVIORAL_TRUST_V1",
          "RECAPTCHA_UNKNOWN"
        ],
        "type": "string"
      },
      "FraudRuleState": {
        "enum": [
          "ATTEMPTED",
          "APPROVED",
          "DECLINED",
          "VERIFICATION_MISMATCH"
        ],
        "type": "string"
      },
      "FraudRuleUpdateRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FraudRuleAction"
          },
          "baseRuleId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "channels": {
            "description": "Omission or null retains channels under expectedVersion. Empty sets are rejected.",
            "items": {
              "$ref": "#/components/schemas/FraudRuleChannel"
            },
            "maxItems": 4,
            "minItems": 1,
            "nullable": true,
            "type": "array",
            "uniqueItems": true
          },
          "condition": {
            "$ref": "#/components/schemas/FraudRuleCondition"
          },
          "enabled": {
            "type": "boolean"
          },
          "expectedVersion": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "maximum": 1000000.0,
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/FraudRuleScope"
          }
        },
        "required": [
          "action",
          "condition",
          "enabled",
          "expectedVersion",
          "name",
          "priority",
          "reason",
          "scope"
        ],
        "type": "object"
      },
      "FraudRuleWindow": {
        "properties": {
          "duration": {
            "exclusiveMinimum": true,
            "format": "int32",
            "maximum": 2678400.0,
            "minimum": 0,
            "type": "integer"
          },
          "unit": {
            "$ref": "#/components/schemas/FraudRuleWindowUnit"
          }
        },
        "required": [
          "duration",
          "unit"
        ],
        "type": "object"
      },
      "FraudRuleWindowUnit": {
        "enum": [
          "SECONDS",
          "MINUTES",
          "HOURS",
          "DAYS"
        ],
        "type": "string"
      },
      "ProcessorOutcomeCategory": {
        "enum": [
          "APPROVED",
          "DECLINED",
          "VALIDATION_REJECTED",
          "HOST_VALIDATION_REJECTED",
          "CREDENTIALS_REJECTED",
          "NOT_FOUND",
          "STATE_CONFLICT",
          "NO_ELIGIBLE_ROUTE",
          "NOT_CERTIFIED",
          "PRE_DISPATCH_UNAVAILABLE",
          "IN_FLIGHT",
          "RATE_LIMITED",
          "SOFT_DECLINE",
          "TIMEOUT_UNKNOWN_OUTCOME",
          "RETRYABLE_PROVIDER_ERROR",
          "NON_RETRYABLE_PROVIDER_ERROR"
        ],
        "type": "string"
      },
      "AdjustGiftCardRequest": {
        "properties": {
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "amountCents",
          "reason"
        ],
        "type": "object"
      },
      "BatchRevokeUnusedGiftCardsRequest": {
        "properties": {
          "cards": {
            "description": "At most 1000 same-organization cards in the requested original-sale currency are revoked atomically only if active with matching original/current balances and no redemption ever. Exact batch replay returns the revoked cards; larger whole operations are unsupported.",
            "items": {
              "$ref": "#/components/schemas/UnusedGiftCardLoad"
            },
            "maxItems": 1000,
            "minItems": 1,
            "type": "array"
          },
          "currency": {
            "description": "ISO uppercase three-letter currency of the original sale; every card must match, including on replay.",
            "minLength": 1,
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "idempotencyKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "cards",
          "currency",
          "idempotencyKey",
          "reason"
        ],
        "type": "object"
      },
      "BulkImportGiftCardLine": {
        "properties": {
          "error": {
            "nullable": true,
            "type": "string"
          },
          "giftCard": {
            "$ref": "#/components/schemas/GiftCard",
            "nullable": true
          },
          "last4": {
            "nullable": true,
            "type": "string"
          },
          "rowIndex": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "rowIndex"
        ],
        "type": "object"
      },
      "BulkImportGiftCardRequest": {
        "properties": {
          "organizationId": {
            "minLength": 1,
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/BulkImportGiftCardRow"
            },
            "type": "array"
          }
        },
        "required": [
          "organizationId",
          "rows"
        ],
        "type": "object"
      },
      "BulkImportGiftCardRow": {
        "properties": {
          "cardNumber": {
            "minLength": 1,
            "type": "string"
          },
          "currency": {
            "minLength": 1,
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "initialBalanceCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "issuedAtLocationId": {
            "nullable": true,
            "type": "string"
          },
          "issuedToCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "pin": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          }
        },
        "required": [
          "cardNumber",
          "initialBalanceCents"
        ],
        "type": "object"
      },
      "BulkIssueGiftCardLine": {
        "properties": {
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "giftCard": {
            "$ref": "#/components/schemas/GiftCard",
            "nullable": true
          }
        },
        "type": "object"
      },
      "BulkIssueGiftCardRequest": {
        "properties": {
          "count": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "minLength": 1,
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "initialBalanceCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "issuedAtLocationId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "count",
          "initialBalanceCents",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCard": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "currentBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "initialBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "issuedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "issuedAtLocationId": {
            "nullable": true,
            "type": "string"
          },
          "issuedByActorId": {
            "type": "string"
          },
          "issuedByActorType": {
            "type": "string"
          },
          "issuedToCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "issuedViaTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "lastActivityAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "usable": {
            "type": "boolean"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "currentBalanceCents",
          "id",
          "initialBalanceCents",
          "issuedByActorId",
          "issuedByActorType",
          "last4",
          "metadata",
          "status",
          "usable",
          "version"
        ],
        "type": "object"
      },
      "GiftCardActivityBucket": {
        "properties": {
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "amountCents",
          "currency",
          "periodEnd",
          "periodStart"
        ],
        "type": "object"
      },
      "GiftCardActivityReport": {
        "properties": {
          "buckets": {
            "items": {
              "$ref": "#/components/schemas/GiftCardActivityBucket"
            },
            "type": "array"
          },
          "currencyTotals": {
            "additionalProperties": {
              "format": "int64",
              "type": "integer"
            },
            "type": "object"
          },
          "granularity": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "buckets",
          "currencyTotals",
          "granularity",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCardBalance": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "currentBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "currentBalanceCents",
          "id",
          "last4",
          "status"
        ],
        "type": "object"
      },
      "GiftCardConfig": {
        "properties": {
          "allowOnlineRedemption": {
            "type": "boolean"
          },
          "cardNumberLength": {
            "format": "int32",
            "type": "integer"
          },
          "cardNumberPrefix": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "expiryDefaultDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "lowBalanceThresholdCents": {
            "format": "int64",
            "type": "integer"
          },
          "maxIssuanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "maxRedeemPerDayCents": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "minIssuanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "minRedeemCents": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "pinRequired": {
            "type": "boolean"
          },
          "reloadEnabled": {
            "type": "boolean"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "velocityMaxAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "velocityWindowMinutes": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "allowOnlineRedemption",
          "cardNumberLength",
          "lowBalanceThresholdCents",
          "maxIssuanceCents",
          "minIssuanceCents",
          "minRedeemCents",
          "organizationId",
          "pinRequired",
          "reloadEnabled",
          "velocityMaxAttempts",
          "velocityWindowMinutes"
        ],
        "type": "object"
      },
      "GiftCardIssueResponse": {
        "properties": {
          "cardNumber": {
            "type": "string"
          },
          "giftCard": {
            "$ref": "#/components/schemas/GiftCard"
          },
          "pinRequired": {
            "type": "boolean"
          }
        },
        "required": [
          "cardNumber",
          "giftCard",
          "pinRequired"
        ],
        "type": "object"
      },
      "GiftCardLiabilitySummary": {
        "properties": {
          "activeCardCount": {
            "format": "int32",
            "type": "integer"
          },
          "activeOutstandingBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "expiredCardCount": {
            "format": "int32",
            "type": "integer"
          },
          "expiredOutstandingBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "expiringIn30DaysCount": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "redeemedCardCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalCardCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalOutstandingBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "voidedCardCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "activeCardCount",
          "activeOutstandingBalanceCents",
          "currency",
          "expiredCardCount",
          "expiredOutstandingBalanceCents",
          "expiringIn30DaysCount",
          "organizationId",
          "redeemedCardCount",
          "totalCardCount",
          "totalOutstandingBalanceCents",
          "voidedCardCount"
        ],
        "type": "object"
      },
      "GiftCardLocationRestriction": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          },
          "restrictedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MerchantStatus",
            "nullable": true
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "restricted"
        ],
        "type": "object"
      },
      "GiftCardLocationRestrictionUpdate": {
        "properties": {
          "locationId": {
            "minLength": 1,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          }
        },
        "required": [
          "locationId"
        ],
        "type": "object"
      },
      "GiftCardTransaction": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "externalRefundReference": {
            "nullable": true,
            "type": "string"
          },
          "giftCardId": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "originalRedemptionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "amountCents",
          "balanceAfterCents",
          "currency",
          "giftCardId",
          "metadata",
          "type"
        ],
        "type": "object"
      },
      "IssueGiftCardRequest": {
        "properties": {
          "currency": {
            "minLength": 1,
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fundingTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "initialBalanceCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "issuedAtLocationId": {
            "nullable": true,
            "type": "string"
          },
          "issuedToCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "minLength": 1,
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          }
        },
        "required": [
          "initialBalanceCents",
          "organizationId"
        ],
        "type": "object"
      },
      "LookupGiftCardRequest": {
        "properties": {
          "cardNumber": {
            "minLength": 1,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "pin": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          }
        },
        "required": [
          "cardNumber"
        ],
        "type": "object"
      },
      "MarkLostGiftCardRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "MerchantGiftCardRedemptionRequest": {
        "properties": {
          "amountCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "idempotencyKey": {
            "minLength": 1,
            "type": "string"
          },
          "locationId": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "pin": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountCents",
          "idempotencyKey",
          "locationId"
        ],
        "type": "object"
      },
      "MerchantStatus": {
        "enum": [
          "ACTIVE",
          "SUSPENDED",
          "INACTIVE",
          "DELETED"
        ],
        "type": "string"
      },
      "PaginatedResponseGiftCard": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GiftCard"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseGiftCardTransaction": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GiftCardTransaction"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PublicGiftCardBalance": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "currentBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "storeTimeZone": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "currentBalanceCents",
          "last4",
          "organizationId",
          "status",
          "storeTimeZone"
        ],
        "type": "object"
      },
      "RedeemGiftCardRequest": {
        "properties": {
          "amountCents": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "idempotencyKey": {
            "minLength": 1,
            "type": "string"
          },
          "locationId": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "pin": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountCents",
          "idempotencyKey",
          "locationId"
        ],
        "type": "object"
      },
      "ReloadGiftCardRequest": {
        "properties": {
          "amountCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "fundingTransactionId": {
            "format": "uuid",
            "type": "string"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          }
        },
        "required": [
          "amountCents",
          "fundingTransactionId",
          "locationId"
        ],
        "type": "object"
      },
      "RestoreLostGiftCardRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "RevokeGiftCardRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "UnusedGiftCardLoad": {
        "properties": {
          "expectedUnusedBalanceCents": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "giftCardId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          }
        },
        "required": [
          "expectedUnusedBalanceCents",
          "giftCardId"
        ],
        "type": "object"
      },
      "UpdateGiftCardConfigRequest": {
        "properties": {
          "allowOnlineRedemption": {
            "nullable": true,
            "type": "boolean"
          },
          "cardNumberLength": {
            "format": "int32",
            "maximum": 32,
            "minimum": 8,
            "nullable": true,
            "type": "integer"
          },
          "cardNumberPrefix": {
            "maxLength": 8,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Z0-9]{0,8}$",
            "type": "string"
          },
          "cardNumberPrefixCleared": {
            "nullable": true,
            "type": "boolean"
          },
          "expiryDefaultDays": {
            "format": "int32",
            "maximum": 3650.0,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "expiryDefaultDaysCleared": {
            "nullable": true,
            "type": "boolean"
          },
          "lowBalanceThresholdCents": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "maxIssuanceCents": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "maxRedeemPerDayCents": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "maxRedeemPerDayCentsCleared": {
            "nullable": true,
            "type": "boolean"
          },
          "minIssuanceCents": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "minRedeemCents": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "pinRequired": {
            "nullable": true,
            "type": "boolean"
          },
          "reloadEnabled": {
            "nullable": true,
            "type": "boolean"
          },
          "velocityMaxAttempts": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "velocityWindowMinutes": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UpdateGiftCardLocationRestrictionsRequest": {
        "properties": {
          "restrictions": {
            "items": {
              "$ref": "#/components/schemas/GiftCardLocationRestrictionUpdate"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "CardEntryAttemptStatus": {
        "enum": [
          "PENDING",
          "READY",
          "EXPIRED",
          "UNRESOLVED"
        ],
        "type": "string"
      },
      "CardEntryProvider": {
        "enum": [
          "ELAVON_EPG"
        ],
        "type": "string"
      },
      "CardEntrySessionCreateRequest": {
        "properties": {
          "selectedShippingRateId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/ShippingAddress",
            "nullable": true
          }
        },
        "type": "object"
      },
      "CardEntrySessionCreateResponse": {
        "properties": {
          "cardEntryAttemptId": {
            "type": "string"
          },
          "hostedFields": {
            "$ref": "#/components/schemas/HostedFields"
          },
          "provider": {
            "$ref": "#/components/schemas/CardEntryProvider"
          }
        },
        "required": [
          "cardEntryAttemptId",
          "hostedFields",
          "provider"
        ],
        "type": "object"
      },
      "CardEntrySessionStatusResponse": {
        "properties": {
          "cardEntryAttemptId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CardEntryAttemptStatus"
          }
        },
        "required": [
          "cardEntryAttemptId",
          "expiresAt",
          "status"
        ],
        "type": "object"
      },
      "HostedFields": {
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "paymentSessionUrl": {
            "type": "string"
          }
        },
        "required": [
          "expiresAt",
          "paymentSessionUrl"
        ],
        "type": "object"
      },
      "CreateImpersonationSessionRequest": {
        "properties": {
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "readWrite": {
            "type": "boolean"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "targetAgentId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateUserRequest": {
        "properties": {
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "format": "email",
            "minLength": 1,
            "type": "string"
          },
          "locationAccess": {
            "items": {
              "$ref": "#/components/schemas/LocationAccessRequest"
            },
            "type": "array"
          },
          "organizationAccess": {
            "items": {
              "$ref": "#/components/schemas/OrganizationAccessRequest"
            },
            "type": "array"
          },
          "role": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "email"
        ],
        "type": "object"
      },
      "ImpersonationSession": {
        "properties": {
          "actorCredential": {
            "nullable": true,
            "type": "string"
          },
          "actorEmail": {
            "nullable": true,
            "type": "string"
          },
          "actorUserId": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "readWrite": {
            "type": "boolean"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "nullable": true,
            "type": "string"
          },
          "targetAgentId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "actorUserId",
          "expiresAt",
          "readWrite",
          "sessionId"
        ],
        "type": "object"
      },
      "LocationAccessRequest": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "locationId"
        ],
        "type": "object"
      },
      "LocationAccessResponse": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "role"
        ],
        "type": "object"
      },
      "OrganizationAccessRequest": {
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "OrganizationAccessResponse": {
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "role"
        ],
        "type": "object"
      },
      "PasswordResetResponse": {
        "properties": {
          "emailSent": {
            "type": "boolean"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "emailSent",
          "userId"
        ],
        "type": "object"
      },
      "UpdateUserRequest": {
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "locationAccess": {
            "items": {
              "$ref": "#/components/schemas/LocationAccessRequest"
            },
            "nullable": true,
            "type": "array"
          },
          "organizationAccess": {
            "items": {
              "$ref": "#/components/schemas/OrganizationAccessRequest"
            },
            "nullable": true,
            "type": "array"
          },
          "role": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "locationAccess": {
            "items": {
              "$ref": "#/components/schemas/LocationAccessResponse"
            },
            "type": "array"
          },
          "organizationAccess": {
            "items": {
              "$ref": "#/components/schemas/OrganizationAccessResponse"
            },
            "type": "array"
          },
          "role": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "email",
          "locationAccess",
          "status",
          "userId"
        ],
        "type": "object"
      },
      "BrandingRequest": {
        "properties": {
          "logoUrl": {
            "nullable": true,
            "type": "string"
          },
          "primaryColor": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "GiftCardRedemptionOutcome": {
        "properties": {
          "amountCents": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "giftCardId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "operationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "redemptionId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/GiftCardRedemptionOutcomeStatus"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "operationId",
          "organizationId",
          "status"
        ],
        "type": "object"
      },
      "GiftCardRedemptionOutcomeStatus": {
        "enum": [
          "REDEEMED",
          "NOT_FOUND",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "Location": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/LocationAddress",
            "nullable": true
          },
          "billingSuspended": {
            "type": "boolean"
          },
          "businessName": {
            "type": "string"
          },
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "countryCode": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "dba": {
            "nullable": true,
            "type": "string"
          },
          "defaultCurrency": {
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "googlePayMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "logoUrl": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "primaryColor": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MerchantStatus",
            "nullable": true
          },
          "supportedCurrencies": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "businessName",
          "locationId"
        ],
        "type": "object"
      },
      "LocationAddress": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "street": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "zip"
        ],
        "type": "object"
      },
      "LocationSurchargeDisclosureResponse": {
        "description": "Merchant declaration of the maximum surcharge disclosed to customers at this location. This is not verification of processor enrollment.",
        "properties": {
          "declarationVersion": {
            "description": "Exact declaration revision. Supply it as expectedDeclarationVersion on every update to reject stale changes.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "declaredMaximumRateBps": {
            "description": "Declared customer/location maximum in basis points; null means no declaration. Explicit zero declares a zero maximum, not that processor surcharge enrollment is off.",
            "format": "int64",
            "maximum": 400.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "declarationVersion"
        ],
        "type": "object"
      },
      "NexgoManualCredentialPackageResponse": {
        "properties": {
          "appPackageName": {
            "nullable": true,
            "type": "string"
          },
          "generatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "parameterSetName": {
            "type": "string"
          },
          "parameters": {
            "items": {
              "$ref": "#/components/schemas/NexgoManualCredentialParameter"
            },
            "type": "array"
          },
          "useCase": {
            "type": "string"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "generatedAt",
          "merchantId",
          "parameterSetName",
          "parameters",
          "useCase"
        ],
        "type": "object"
      },
      "NexgoManualCredentialParameter": {
        "properties": {
          "copyLabel": {
            "type": "string"
          },
          "isSecret": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "maskedValue": {
            "type": "string"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "copyLabel",
          "isSecret",
          "key",
          "maskedValue"
        ],
        "type": "object"
      },
      "PaginatedResponseLocation": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Location"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "RefundGiftCardRequest": {
        "properties": {
          "amountCents": {
            "exclusiveMinimum": true,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "idempotencyKey": {
            "minLength": 1,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "redemptionId": {
            "description": "UUID of the original Gateway REDEEM gift-card ledger entry, not a payment transaction ID.",
            "minLength": 1,
            "type": "string"
          },
          "refundReference": {
            "description": "Durable caller-owned refund reference, such as the POS refund UUID; not a Gateway transaction foreign key.",
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "amountCents",
          "idempotencyKey",
          "redemptionId",
          "refundReference"
        ],
        "type": "object"
      },
      "UpdateLocationRequest": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/LocationAddress",
            "nullable": true
          },
          "branding": {
            "$ref": "#/components/schemas/BrandingRequest",
            "nullable": true
          },
          "businessName": {
            "nullable": true,
            "type": "string"
          },
          "contactEmail": {
            "format": "email",
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "countryCode": {
            "nullable": true,
            "pattern": "^[A-Za-z]{2}$",
            "type": "string"
          },
          "dba": {
            "nullable": true,
            "type": "string"
          },
          "defaultCurrency": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "googlePayMerchantId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "locale": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "supportedCurrencies": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateLocationStatusRequest": {
        "properties": {
          "status": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "UpdateLocationSurchargeDisclosureRequest": {
        "properties": {
          "clear": {
            "description": "Explicitly remove the declaration. Must not be combined with a declaredMaximumRateBps value.",
            "type": "boolean"
          },
          "declaredMaximumRateBps": {
            "description": "Declare the customer/location posted maximum, 0\u2013400 basis points. Omission or null retains the stored value. Never automatically populated from processor/profile rates.",
            "format": "int64",
            "maximum": 400.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "expectedDeclarationVersion": {
            "description": "The declarationVersion returned by the latest location disclosure read. A stale version is rejected, never overwritten.",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedDeclarationVersion",
          "reason"
        ],
        "type": "object"
      },
      "MerchantPaymentMethodSupport": {
        "properties": {
          "ach": {
            "type": "boolean"
          },
          "applePay": {
            "type": "boolean"
          },
          "googlePay": {
            "type": "boolean"
          }
        },
        "required": [
          "ach",
          "applePay",
          "googlePay"
        ],
        "type": "object"
      },
      "MerchantSelfServiceConfig": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "paymentMethods": {
            "$ref": "#/components/schemas/PaymentMethodConfig"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "webhookRetry": {
            "$ref": "#/components/schemas/WebhookRetryConfig"
          }
        },
        "required": [
          "merchantId",
          "paymentMethods",
          "webhookRetry"
        ],
        "type": "object"
      },
      "PaymentMethodConfig": {
        "properties": {
          "ach": {
            "type": "boolean"
          },
          "applePay": {
            "type": "boolean"
          },
          "card": {
            "type": "boolean"
          },
          "googlePay": {
            "type": "boolean"
          }
        },
        "required": [
          "ach",
          "card",
          "googlePay"
        ],
        "type": "object"
      },
      "UpdateMerchantSelfServiceConfigRequest": {
        "properties": {
          "paymentMethods": {
            "$ref": "#/components/schemas/UpdatePaymentMethodConfigRequest",
            "nullable": true
          },
          "webhookRetry": {
            "$ref": "#/components/schemas/UpdateWebhookRetryConfigRequest",
            "nullable": true
          }
        },
        "type": "object"
      },
      "UpdatePaymentMethodConfigRequest": {
        "properties": {
          "ach": {
            "nullable": true,
            "type": "boolean"
          },
          "applePay": {
            "nullable": true,
            "type": "boolean"
          },
          "card": {
            "nullable": true,
            "type": "boolean"
          },
          "googlePay": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UpdateWebhookRetryConfigRequest": {
        "properties": {
          "backoffMinutes": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "maxAttempts": {
            "format": "int32",
            "maximum": 10.0,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WebhookRetryConfig": {
        "properties": {
          "backoffMinutes": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "maxAttempts": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "backoffMinutes",
          "maxAttempts"
        ],
        "type": "object"
      },
      "OAuthClient": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "appId": {
            "nullable": true,
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdByUserId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "ownerType": {
            "$ref": "#/components/schemas/OAuthClientOwnerType"
          },
          "productAudience": {
            "$ref": "#/components/schemas/OAuthClientProductAudience",
            "nullable": true
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "status": {
            "$ref": "#/components/schemas/OAuthClientStatus"
          }
        },
        "required": [
          "clientId",
          "createdAt",
          "displayName",
          "scopes",
          "status"
        ],
        "type": "object"
      },
      "OAuthClientOwnerType": {
        "enum": [
          "PLATFORM",
          "CUSTOMER"
        ],
        "type": "string"
      },
      "OAuthClientProductAudience": {
        "enum": [
          "three-ds-api",
          "three-ds-management"
        ],
        "type": "string"
      },
      "OAuthClientStatus": {
        "enum": [
          "ACTIVE",
          "REVOKED"
        ],
        "type": "string"
      },
      "RegisterOAuthClientRequest": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "appId": {
            "nullable": true,
            "type": "string"
          },
          "createdByUserId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "ownerType": {
            "$ref": "#/components/schemas/OAuthClientOwnerType"
          },
          "productAudience": {
            "$ref": "#/components/schemas/OAuthClientProductAudience",
            "nullable": true
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "displayName",
          "scopes"
        ],
        "type": "object"
      },
      "RegisterOAuthClientResponse": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "appId": {
            "nullable": true,
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdByUserId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "ownerType": {
            "$ref": "#/components/schemas/OAuthClientOwnerType"
          },
          "productAudience": {
            "$ref": "#/components/schemas/OAuthClientProductAudience",
            "nullable": true
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "status": {
            "$ref": "#/components/schemas/OAuthClientStatus"
          }
        },
        "required": [
          "clientId",
          "clientSecret",
          "createdAt",
          "displayName",
          "scopes",
          "status"
        ],
        "type": "object"
      },
      "RotateOAuthClientSecretResponse": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/OAuthClientStatus"
          }
        },
        "required": [
          "clientId",
          "clientSecret",
          "status"
        ],
        "type": "object"
      },
      "UpdateClientScopesRequest": {
        "properties": {
          "expectedRevision": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "scopes"
        ],
        "type": "object"
      },
      "AssignOrganizationRateCardRequest": {
        "properties": {
          "rateCardGroupId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "rateCardGroupId"
        ],
        "type": "object"
      },
      "AttestOrganizationOwnerHistoryBaselineRequest": {
        "properties": {
          "expectedCurrentOwnerAgentId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "expectedCurrentSellAssignment": {
            "$ref": "#/components/schemas/BaselineSellAssignment"
          },
          "ownerAndSellUnchangedSinceCreation": {
            "type": "boolean"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 10,
            "type": "string"
          }
        },
        "required": [
          "expectedCurrentOwnerAgentId",
          "expectedCurrentSellAssignment",
          "ownerAndSellUnchangedSinceCreation",
          "reason"
        ],
        "type": "object"
      },
      "BaselineSellAssignment": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/BaselineSellAssignmentKind"
          },
          "rateGroupId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "BaselineSellAssignmentKind": {
        "enum": [
          "INHERITED",
          "EXPLICIT"
        ],
        "type": "string"
      },
      "CapacityFreshness": {
        "enum": [
          "FRESH",
          "STALE"
        ],
        "type": "string"
      },
      "CapacitySnapshot": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "freshness": {
            "$ref": "#/components/schemas/CapacityFreshness"
          },
          "headroomMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "limitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "mtdVolumeMinor": {
            "format": "int64",
            "type": "integer"
          },
          "observedAt": {
            "format": "date-time",
            "type": "string"
          },
          "projectedRunRateMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "credentialProfileId",
          "currency",
          "freshness",
          "mtdVolumeMinor",
          "observedAt"
        ],
        "type": "object"
      },
      "CreateCredentialProfileRequest": {
        "properties": {
          "acceptsAch": {
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "type": "boolean"
          },
          "acceptsCardPresent": {
            "type": "boolean"
          },
          "allowAsBackup": {
            "nullable": true,
            "type": "boolean"
          },
          "credentialPayload": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "existingPassword": {
            "nullable": true,
            "type": "string"
          },
          "integrationDepth": {
            "nullable": true,
            "type": "string"
          },
          "mcc": {
            "minLength": 1,
            "pattern": "^\\d{4}$",
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "perTransactionFeeCurrencyCode": {
            "nullable": true,
            "type": "string"
          },
          "perTransactionFeeMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "processingFeeBps": {
            "format": "int64",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "processorPlatform": {
            "nullable": true,
            "type": "string"
          },
          "processorReportTimeZone": {
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "settlementMode": {
            "nullable": true,
            "type": "string"
          },
          "settlementScheduledTime": {
            "nullable": true,
            "type": "string"
          },
          "surchargeRateBps": {
            "format": "int64",
            "maximum": 400.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "transitDeviceId": {
            "nullable": true,
            "type": "string"
          },
          "transitMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "transitTerminalNumber": {
            "nullable": true,
            "type": "string"
          },
          "transitUserId": {
            "nullable": true,
            "type": "string"
          },
          "transitVNumber": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "mcc",
          "name"
        ],
        "type": "object"
      },
      "CreateLocationRequest": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/LocationAddress"
          },
          "branding": {
            "$ref": "#/components/schemas/BrandingRequest",
            "nullable": true
          },
          "businessName": {
            "minLength": 1,
            "type": "string"
          },
          "contactEmail": {
            "format": "email",
            "minLength": 1,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "countryCode": {
            "nullable": true,
            "pattern": "^[A-Za-z]{2}$",
            "type": "string"
          },
          "dba": {
            "nullable": true,
            "type": "string"
          },
          "defaultCurrency": {
            "nullable": true,
            "pattern": "[A-Za-z]{3}",
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "locale": {
            "maxLength": 35,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "supportedCurrencies": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "webhookUrl": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "address",
          "businessName",
          "contactEmail"
        ],
        "type": "object"
      },
      "CreateOrganizationRequest": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "legalName": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Organization metadata. timeZone is required and must be an IANA timezone identifier or UTC.",
            "nullable": true,
            "type": "object"
          }
        },
        "required": [
          "legalName"
        ],
        "type": "object"
      },
      "CredentialProfile": {
        "properties": {
          "acceptsAch": {
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "type": "boolean"
          },
          "acceptsCardPresent": {
            "type": "boolean"
          },
          "activatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "allowAsBackup": {
            "type": "boolean"
          },
          "applePayEligible": {
            "nullable": true,
            "type": "boolean"
          },
          "approvedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "approvedBy": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialPayloadPresent": {
            "type": "boolean"
          },
          "deactivatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "integrationDepth": {
            "nullable": true,
            "type": "string"
          },
          "keyVersion": {
            "format": "int32",
            "type": "integer"
          },
          "lastRotatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "mcc": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "perTransactionFeeCurrencyCode": {
            "nullable": true,
            "type": "string"
          },
          "perTransactionFeeMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "postAuthVoidSupported": {
            "nullable": true,
            "type": "boolean"
          },
          "processingFeeBps": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processorPlatform": {
            "nullable": true,
            "type": "string"
          },
          "processorReportTimeZone": {
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "rejectedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "rejectedBy": {
            "nullable": true,
            "type": "string"
          },
          "rejectionReason": {
            "nullable": true,
            "type": "string"
          },
          "routeUseCases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "routingRole": {
            "nullable": true,
            "type": "string"
          },
          "settlementMode": {
            "type": "string"
          },
          "settlementScheduledTime": {
            "type": "string"
          },
          "settlementTimezone": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CredentialProfileStatus",
            "nullable": true
          },
          "submittedForApprovalAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "submittedForApprovalBy": {
            "nullable": true,
            "type": "string"
          },
          "supportedTenders": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "surchargeRateBps": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transitMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "transitTerminalNumber": {
            "nullable": true,
            "type": "string"
          },
          "transitUserIdPresent": {
            "type": "boolean"
          },
          "transitVNumber": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "acceptsAch",
          "acceptsCardNotPresent",
          "acceptsCardPresent",
          "createdAt",
          "credentialPayloadPresent",
          "id",
          "keyVersion",
          "mcc",
          "name",
          "organizationId",
          "processorType",
          "routeUseCases",
          "settlementMode",
          "settlementScheduledTime",
          "settlementTimezone",
          "supportedTenders",
          "transitUserIdPresent",
          "updatedAt"
        ],
        "type": "object"
      },
      "CredentialProfileLimit": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "idleThresholdMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "monthlyVolumeLimitMinor": {
            "format": "int64",
            "type": "integer"
          },
          "softLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "credentialProfileId",
          "currency",
          "id",
          "monthlyVolumeLimitMinor",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "CredentialProfileStatus": {
        "enum": [
          "STAGED",
          "PENDING_APPROVAL",
          "ACTIVE",
          "REJECTED",
          "ROTATING",
          "DEACTIVATING",
          "REVOKED",
          "DELETED"
        ],
        "type": "string"
      },
      "DeviceClassEntitlement": {
        "properties": {
          "deviceClass": {
            "$ref": "#/components/schemas/DeviceClass"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "deviceClass",
          "organizationId"
        ],
        "type": "object"
      },
      "FraudHeldDeclineRequest": {
        "properties": {
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "FraudHeldDeclineResponse": {
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "responseCode": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "transactionId"
        ],
        "type": "object"
      },
      "LocationProcessorRoute": {
        "properties": {
          "acceptsAch": {
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "type": "boolean"
          },
          "acceptsCardPresent": {
            "type": "boolean"
          },
          "applePayEligible": {
            "nullable": true,
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialPayloadPresent": {
            "type": "boolean"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "credentialProfileName": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "integrationDepth": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "mcc": {
            "nullable": true,
            "type": "string"
          },
          "processorPlatform": {
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "profileStatus": {
            "$ref": "#/components/schemas/CredentialProfileStatus",
            "nullable": true
          },
          "supportedTenders": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "useCase": {
            "type": "string"
          }
        },
        "required": [
          "acceptsAch",
          "acceptsCardNotPresent",
          "acceptsCardPresent",
          "createdAt",
          "credentialPayloadPresent",
          "credentialProfileId",
          "credentialProfileName",
          "id",
          "integrationDepth",
          "locationId",
          "processorPlatform",
          "processorType",
          "supportedTenders",
          "updatedAt",
          "useCase"
        ],
        "type": "object"
      },
      "LocationProcessorRouteTargetProfile": {
        "properties": {
          "acceptsAch": {
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "type": "boolean"
          },
          "credentialPayloadPresent": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "status": {
            "$ref": "#/components/schemas/CredentialProfileStatus"
          }
        },
        "required": [
          "acceptsAch",
          "acceptsCardNotPresent",
          "credentialPayloadPresent",
          "id",
          "name",
          "processorPlatform",
          "processorType",
          "status"
        ],
        "type": "object"
      },
      "LocationSurchargeDisclosure": {
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "credentialProfilesConsidered": {
            "format": "int32",
            "type": "integer"
          },
          "credentialProfilesWithUnknownRate": {
            "format": "int32",
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "maximumSurchargeRateBps": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "complete",
          "credentialProfilesConsidered",
          "credentialProfilesWithUnknownRate",
          "locationId"
        ],
        "type": "object"
      },
      "MidUtilization": {
        "properties": {
          "atLimit": {
            "type": "boolean"
          },
          "capacity": {
            "$ref": "#/components/schemas/CapacitySnapshot"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "credentialProfileName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "cycleResetsAt": {
            "format": "date-time",
            "type": "string"
          },
          "headroomMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "idle": {
            "type": "boolean"
          },
          "idleThresholdMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "limitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "mcc": {
            "type": "string"
          },
          "mtdVolumeMinor": {
            "format": "int64",
            "type": "integer"
          },
          "overLimit": {
            "type": "boolean"
          },
          "recommendedAction": {
            "$ref": "#/components/schemas/RebalanceHint",
            "nullable": true
          },
          "runRateProjectionMinor": {
            "format": "int64",
            "type": "integer"
          },
          "softLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "utilizationPct": {
            "format": "double",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "atLimit",
          "capacity",
          "credentialProfileId",
          "credentialProfileName",
          "currency",
          "cycleResetsAt",
          "idle",
          "mcc",
          "mtdVolumeMinor",
          "overLimit",
          "runRateProjectionMinor"
        ],
        "type": "object"
      },
      "OrganizationOwnerHistoryBaselineReceipt": {
        "properties": {
          "acceptedExistingBaselines": {
            "items": {
              "$ref": "#/components/schemas/RateHistoryBaselineObservation"
            },
            "type": "array"
          },
          "actorEmail": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "alreadyCovered": {
            "type": "boolean"
          },
          "auditId": {
            "type": "string"
          },
          "creationPriceVersionId": {
            "type": "string"
          },
          "effectiveAt": {
            "format": "date-time",
            "type": "string"
          },
          "historicalSellPriceGroupId": {
            "type": "string"
          },
          "ownerAgentId": {
            "type": "string"
          },
          "pricingPredecessorTransitionId": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "recordedAt": {
            "format": "date-time",
            "type": "string"
          },
          "replay": {
            "type": "boolean"
          },
          "resourceId": {
            "type": "string"
          },
          "sellAssignment": {
            "$ref": "#/components/schemas/BaselineSellAssignment"
          },
          "transitionId": {
            "type": "string"
          }
        },
        "required": [
          "acceptedExistingBaselines",
          "actorEmail",
          "actorId",
          "alreadyCovered",
          "auditId",
          "creationPriceVersionId",
          "effectiveAt",
          "historicalSellPriceGroupId",
          "ownerAgentId",
          "reason",
          "recordedAt",
          "replay",
          "resourceId",
          "sellAssignment",
          "transitionId"
        ],
        "type": "object"
      },
      "OrganizationSubtreePresence": {
        "properties": {
          "appAccessEnabled": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "string"
          },
          "rootAgentId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OrganizationSubtreePresenceState"
          }
        },
        "required": [
          "appAccessEnabled",
          "organizationId",
          "rootAgentId",
          "state"
        ],
        "type": "object"
      },
      "OrganizationSubtreePresenceState": {
        "enum": [
          "PRESENT_ACTIVE",
          "DELETED_TOMBSTONE",
          "NOT_FOUND_IN_SUBTREE"
        ],
        "type": "string"
      },
      "OrganizationTimeZoneAddressRequest": {
        "properties": {
          "city": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "state": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "street": {
            "maxLength": 1024,
            "minLength": 0,
            "type": "string"
          },
          "zip": {
            "maxLength": 32,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "street"
        ],
        "type": "object"
      },
      "OrganizationTimeZonePreviewRequest": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/OrganizationTimeZoneAddressRequest"
          }
        },
        "required": [
          "address"
        ],
        "type": "object"
      },
      "OrganizationTimeZonePreviewResponse": {
        "properties": {
          "timeZone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RebalanceHint": {
        "properties": {
          "action": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "message"
        ],
        "type": "object"
      },
      "ReconcileOnboardingCardPresentProfileRequest": {
        "properties": {
          "allowDefaultReplacement": {
            "type": "boolean"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedDefaultCredentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "expectedRouteCredentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "expectedRouteId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId"
        ],
        "type": "object"
      },
      "RefreshCredentialProfileRoutingScopeRequest": {
        "properties": {
          "apply": {
            "type": "boolean"
          },
          "expectedKeyVersion": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "expectedKeyVersion"
        ],
        "type": "object"
      },
      "RefreshCredentialProfileRoutingScopeResponse": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "keyVersion": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "readiness": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "keyVersion",
          "organizationId",
          "readiness"
        ],
        "type": "object"
      },
      "RotateCredentialProfileRequest": {
        "properties": {
          "credentialPayload": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "existingPassword": {
            "nullable": true,
            "type": "string"
          },
          "transitDeviceId": {
            "nullable": true,
            "type": "string"
          },
          "transitUserId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SmartRoutingCoverageEvidence": {
        "properties": {
          "evidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingCoverageGroup"
            },
            "type": "array"
          }
        },
        "required": [
          "evidenceStatus",
          "groups"
        ],
        "type": "object"
      },
      "SmartRoutingCoverageGroup": {
        "properties": {
          "asOf": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "distinctCertifiedPairs": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "eligibleMids": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "excludedProfilesByReason": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportCount"
            },
            "type": "array"
          },
          "segmentLabel": {
            "type": "string"
          },
          "sessions": {
            "format": "int64",
            "type": "integer"
          },
          "useCaseLabel": {
            "type": "string"
          },
          "verifiedIndependentFamilies": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "excludedProfilesByReason",
          "segmentLabel",
          "sessions",
          "useCaseLabel"
        ],
        "type": "object"
      },
      "SmartRoutingCurrencyAmount": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency"
        ],
        "type": "object"
      },
      "SmartRoutingFinancialSourceCoverage": {
        "properties": {
          "assignedPurchases": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "censusAvailable": {
            "type": "boolean"
          },
          "completeCashPurchases": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "completeFeePurchases": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "contiguousCompleteThrough": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "feeCoverageReason": {
            "nullable": true,
            "type": "string"
          },
          "missingActualAmounts": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unknownHorizonTimes": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unresolvedOwnedObligations": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unresolvedSettlementMemberships": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unsupportedCashSources": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unsupportedFeeSources": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "censusAvailable"
        ],
        "type": "object"
      },
      "SmartRoutingGapEvidenceStatus": {
        "enum": [
          "COMPLETE",
          "PARTIAL",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "SmartRoutingProcessorAvailability": {
        "properties": {
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SmartRoutingProcessorAvailabilityStatus"
          },
          "windowSeconds": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "SmartRoutingProcessorAvailabilityStatus": {
        "enum": [
          "UNKNOWN"
        ],
        "type": "string"
      },
      "SmartRoutingReportAmount": {
        "properties": {
          "authorizationEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "authorizedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "captureEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "capturedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "netCapturedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredAuthorizationEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "recoveredAuthorizedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredCaptureEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "recoveredCapturedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredNetCapturedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredRefundEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "recoveredRefundedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredSettledMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "recoveredSettlementEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "refundEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "refundedMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "settledMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "settlementEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "sourceCoverage": {
            "$ref": "#/components/schemas/SmartRoutingFinancialSourceCoverage"
          }
        },
        "required": [
          "authorizationEvidenceStatus",
          "captureEvidenceStatus",
          "currency",
          "recoveredAuthorizationEvidenceStatus",
          "recoveredCaptureEvidenceStatus",
          "recoveredRefundEvidenceStatus",
          "recoveredSettlementEvidenceStatus",
          "refundEvidenceStatus",
          "settlementEvidenceStatus",
          "sourceCoverage"
        ],
        "type": "object"
      },
      "SmartRoutingReportBreakdown": {
        "properties": {
          "bucket": {
            "type": "string"
          },
          "dimension": {
            "type": "string"
          },
          "recoveredAuthorizations": {
            "format": "int64",
            "type": "integer"
          },
          "sessions": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "bucket",
          "dimension",
          "recoveredAuthorizations",
          "sessions"
        ],
        "type": "object"
      },
      "SmartRoutingReportCount": {
        "properties": {
          "code": {
            "type": "string"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "count",
          "label"
        ],
        "type": "object"
      },
      "SmartRoutingReportFreshness": {
        "properties": {
          "dirtySessions": {
            "format": "int64",
            "type": "integer"
          },
          "projectedThrough": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "dirtySessions"
        ],
        "type": "object"
      },
      "SmartRoutingReportGap": {
        "properties": {
          "code": {
            "type": "string"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "declinedAmounts": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingCurrencyAmount"
            },
            "nullable": true,
            "type": "array"
          },
          "declinedAmountsEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "label": {
            "type": "string"
          },
          "merchantAction": {
            "nullable": true,
            "type": "string"
          },
          "reasonEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "sourceCoverageEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          }
        },
        "required": [
          "code",
          "count",
          "declinedAmountsEvidenceStatus",
          "label",
          "reasonEvidenceStatus",
          "sourceCoverageEvidenceStatus"
        ],
        "type": "object"
      },
      "SmartRoutingReportResponse": {
        "properties": {
          "amounts": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportAmount"
            },
            "type": "array"
          },
          "breakdowns": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportBreakdown"
            },
            "type": "array"
          },
          "coverageEvidence": {
            "$ref": "#/components/schemas/SmartRoutingCoverageEvidence"
          },
          "freshness": {
            "$ref": "#/components/schemas/SmartRoutingReportFreshness"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "generatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "independentRouteCoverage": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportCount"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "nextTimelineCursor": {
            "nullable": true,
            "type": "string"
          },
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportCount"
            },
            "type": "array"
          },
          "processorAvailability": {
            "$ref": "#/components/schemas/SmartRoutingProcessorAvailability"
          },
          "recoveryGaps": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportGap"
            },
            "type": "array"
          },
          "recoveryGapsEvidenceStatus": {
            "$ref": "#/components/schemas/SmartRoutingGapEvidenceStatus"
          },
          "summary": {
            "$ref": "#/components/schemas/SmartRoutingReportSummary"
          },
          "timeline": {
            "items": {
              "$ref": "#/components/schemas/SmartRoutingReportTimelineItem"
            },
            "type": "array"
          },
          "to": {
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "amounts",
          "breakdowns",
          "coverageEvidence",
          "freshness",
          "from",
          "generatedAt",
          "independentRouteCoverage",
          "outcomes",
          "processorAvailability",
          "recoveryGaps",
          "recoveryGapsEvidenceStatus",
          "summary",
          "timeline",
          "to"
        ],
        "type": "object"
      },
      "SmartRoutingReportSummary": {
        "properties": {
          "awaitingRetryOrAuthentication": {
            "format": "int64",
            "type": "integer"
          },
          "cancelled": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "definitiveFirstApprovalCount": {
            "format": "int64",
            "type": "integer"
          },
          "definitiveFirstApprovalRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "definitiveFirstSessions": {
            "format": "int64",
            "type": "integer"
          },
          "exhaustedWithoutApproval": {
            "format": "int64",
            "type": "integer"
          },
          "firstApprovalCount": {
            "format": "int64",
            "type": "integer"
          },
          "firstApprovalRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "firstDispatchSessions": {
            "format": "int64",
            "type": "integer"
          },
          "initialPendingSessions": {
            "format": "int64",
            "type": "integer"
          },
          "matureFinalApprovalCount": {
            "format": "int64",
            "type": "integer"
          },
          "matureFinalAuthorizationRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "matureFinalSessions": {
            "format": "int64",
            "type": "integer"
          },
          "noCurrentAlternate": {
            "format": "int64",
            "type": "integer"
          },
          "pendingSessions": {
            "format": "int64",
            "type": "integer"
          },
          "provisionalFinalApprovalCount": {
            "format": "int64",
            "type": "integer"
          },
          "provisionalFinalAuthorizationRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "provisionalPendingUnknownSessions": {
            "format": "int64",
            "type": "integer"
          },
          "provisionalSessions": {
            "format": "int64",
            "type": "integer"
          },
          "recoveredAuthorizations": {
            "format": "int64",
            "type": "integer"
          },
          "recoveredEligible": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "routedSessions": {
            "format": "int64",
            "type": "integer"
          },
          "safeRecoveryEligible": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unknownFirstSessions": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "awaitingRetryOrAuthentication",
          "definitiveFirstApprovalCount",
          "definitiveFirstSessions",
          "exhaustedWithoutApproval",
          "firstApprovalCount",
          "firstDispatchSessions",
          "initialPendingSessions",
          "matureFinalApprovalCount",
          "matureFinalSessions",
          "noCurrentAlternate",
          "pendingSessions",
          "provisionalFinalApprovalCount",
          "provisionalPendingUnknownSessions",
          "provisionalSessions",
          "recoveredAuthorizations",
          "routedSessions",
          "unknownFirstSessions"
        ],
        "type": "object"
      },
      "SmartRoutingReportTimelineItem": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "attemptOrdinal": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "evidenceStatus": {
            "$ref": "#/components/schemas/DecisionTimelineEvidenceStatus"
          },
          "message": {
            "type": "string"
          },
          "outcomeCode": {
            "$ref": "#/components/schemas/SmartRoutingMerchantOutcome",
            "nullable": true
          },
          "outcomeLabel": {
            "nullable": true,
            "type": "string"
          },
          "processorAccountDisplayName": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "at",
          "message"
        ],
        "type": "object"
      },
      "SoftLimitNotification": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "agentName": {
            "nullable": true,
            "type": "string"
          },
          "approvedMinorAtCrossing": {
            "format": "int64",
            "type": "integer"
          },
          "crossedAt": {
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "emailStatus": {
            "type": "string"
          },
          "notifiedAt": {
            "nullable": true,
            "type": "string"
          },
          "periodStart": {
            "type": "string"
          },
          "recipientEmail": {
            "nullable": true,
            "type": "string"
          },
          "softLimitMinor": {
            "format": "int64",
            "type": "integer"
          },
          "webhookEventId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "approvedMinorAtCrossing",
          "crossedAt",
          "emailStatus",
          "periodStart",
          "softLimitMinor"
        ],
        "type": "object"
      },
      "UpdateCredentialProfileRequest": {
        "properties": {
          "acceptsAch": {
            "nullable": true,
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "nullable": true,
            "type": "boolean"
          },
          "acceptsCardPresent": {
            "nullable": true,
            "type": "boolean"
          },
          "activationPassword": {
            "maxLength": 200,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "allowAsBackup": {
            "nullable": true,
            "type": "boolean"
          },
          "clearPerTransactionFee": {
            "type": "boolean"
          },
          "clearProcessingFee": {
            "type": "boolean"
          },
          "credentialPayload": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "integrationDepth": {
            "nullable": true,
            "type": "string"
          },
          "mcc": {
            "nullable": true,
            "pattern": "^\\d{4}$",
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "originLocationId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "perTransactionFeeCurrencyCode": {
            "nullable": true,
            "type": "string"
          },
          "perTransactionFeeMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "processingFeeBps": {
            "format": "int64",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "processorPlatform": {
            "nullable": true,
            "type": "string"
          },
          "processorReportTimeZone": {
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "nullable": true,
            "type": "string"
          },
          "settlementMode": {
            "nullable": true,
            "type": "string"
          },
          "settlementScheduledTime": {
            "nullable": true,
            "type": "string"
          },
          "surchargeRateBps": {
            "format": "int64",
            "maximum": 400.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "transitDeviceId": {
            "nullable": true,
            "type": "string"
          },
          "transitMerchantId": {
            "nullable": true,
            "type": "string"
          },
          "transitTerminalNumber": {
            "maxLength": 50,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "transitUserId": {
            "nullable": true,
            "type": "string"
          },
          "transitVNumber": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateOrganizationRequest": {
        "properties": {
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contactName": {
            "nullable": true,
            "type": "string"
          },
          "contactPhone": {
            "nullable": true,
            "type": "string"
          },
          "defaultLocationId": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Replaces metadata, preserving the existing timeZone if omitted. Explicit invalid or null timeZone is rejected.",
            "nullable": true,
            "type": "object"
          }
        },
        "type": "object"
      },
      "UpsertCredentialProfileLimitRequest": {
        "properties": {
          "currency": {
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "idleThresholdMinor": {
            "description": "Idle alert threshold in minor units: 0 <= idle <= hard. Omit to keep the stored value; null clears it.",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "monthlyVolumeLimitMinor": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "softLimitMinor": {
            "description": "Soft limit in minor units: 0 < soft < hard. Omit to keep the stored value; null clears it.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "monthlyVolumeLimitMinor"
        ],
        "type": "object"
      },
      "UpsertLocationProcessorRouteRequest": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId"
        ],
        "type": "object"
      },
      "VolumeLimitChange": {
        "properties": {
          "actorEmail": {
            "nullable": true,
            "type": "string"
          },
          "changedAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "newCurrency": {
            "nullable": true,
            "type": "string"
          },
          "newHardLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "newSoftLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "previousCurrency": {
            "nullable": true,
            "type": "string"
          },
          "previousHardLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "previousSoftLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "changedAt",
          "id",
          "reason"
        ],
        "type": "object"
      },
      "VolumeLimitStatus": {
        "properties": {
          "admittedMinor": {
            "format": "int64",
            "type": "integer"
          },
          "approvedMinor": {
            "format": "int64",
            "type": "integer"
          },
          "configured": {
            "type": "boolean"
          },
          "credentialProfileId": {
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "hardLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/VolumeLimitChange"
            },
            "type": "array"
          },
          "idleThresholdMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "lastSoftLimitNotification": {
            "$ref": "#/components/schemas/SoftLimitNotification",
            "nullable": true
          },
          "periodEnd": {
            "type": "string"
          },
          "periodStart": {
            "type": "string"
          },
          "softLimitMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "admittedMinor",
          "approvedMinor",
          "configured",
          "credentialProfileId",
          "history",
          "periodEnd",
          "periodStart"
        ],
        "type": "object"
      },
      "AttachedCredentialProfileSummary": {
        "properties": {
          "acceptsAch": {
            "type": "boolean"
          },
          "acceptsCardNotPresent": {
            "type": "boolean"
          },
          "acceptsCardPresent": {
            "type": "boolean"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "mcc": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "routeUseCases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/CredentialProfileStatus",
            "nullable": true
          }
        },
        "required": [
          "acceptsAch",
          "acceptsCardNotPresent",
          "acceptsCardPresent",
          "credentialProfileId",
          "name",
          "routeUseCases"
        ],
        "type": "object"
      },
      "EffectivePaymentAcceptanceEntry": {
        "properties": {
          "capability": {
            "$ref": "#/components/schemas/PaymentAcceptanceCapability"
          },
          "configuredState": {
            "$ref": "#/components/schemas/PaymentAcceptanceOverrideState"
          },
          "effectiveEnabled": {
            "type": "boolean"
          },
          "featureAvailable": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/PaymentAcceptanceScope",
            "nullable": true
          }
        },
        "required": [
          "capability",
          "configuredState",
          "effectiveEnabled"
        ],
        "type": "object"
      },
      "EffectivePaymentAcceptancePolicy": {
        "properties": {
          "attachedProfiles": {
            "items": {
              "$ref": "#/components/schemas/AttachedCredentialProfileSummary"
            },
            "type": "array"
          },
          "brandSupport": {
            "items": {
              "$ref": "#/components/schemas/PaymentAcceptanceBrandSupport"
            },
            "type": "array"
          },
          "diagnostics": {
            "items": {
              "$ref": "#/components/schemas/PaymentAcceptanceDiagnostic"
            },
            "type": "array"
          },
          "effectiveDefaultProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/EffectivePaymentAcceptanceEntry"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "providerStates": {
            "items": {
              "$ref": "#/components/schemas/PaymentAcceptanceProviderStateSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "attachedProfiles",
          "entries",
          "organizationId"
        ],
        "type": "object"
      },
      "PaymentAcceptanceBlockReason": {
        "enum": [
          "DISABLED_BY_SETTING",
          "BLOCKED_BY_MCC",
          "UNSUPPORTED_CARD_BRAND",
          "UNKNOWN_CARD_BRAND",
          "NO_ELIGIBLE_ROUTE"
        ],
        "type": "string"
      },
      "PaymentAcceptanceBrandSupport": {
        "properties": {
          "blockReason": {
            "$ref": "#/components/schemas/PaymentAcceptanceBlockReason",
            "nullable": true
          },
          "brand": {
            "$ref": "#/components/schemas/PaymentAcceptanceCapability"
          },
          "concreteNetworks": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "effectiveEnabled": {
            "type": "boolean"
          },
          "supported": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "brand",
          "concreteNetworks",
          "effectiveEnabled"
        ],
        "type": "object"
      },
      "PaymentAcceptanceCapability": {
        "enum": [
          "CARD",
          "ACH",
          "APPLE_PAY",
          "GOOGLE_PAY",
          "VISA",
          "MASTERCARD",
          "AMEX",
          "DISCOVER",
          "AVS"
        ],
        "type": "string"
      },
      "PaymentAcceptanceDiagnostic": {
        "properties": {
          "blockReason": {
            "$ref": "#/components/schemas/PaymentAcceptanceBlockReason",
            "nullable": true
          },
          "brand": {
            "$ref": "#/components/schemas/PaymentAcceptanceCapability",
            "nullable": true
          },
          "capability": {
            "$ref": "#/components/schemas/PaymentAcceptanceCapability"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "mcc": {
            "nullable": true,
            "type": "string"
          },
          "policyVersion": {
            "nullable": true,
            "type": "string"
          },
          "providerState": {
            "$ref": "#/components/schemas/PaymentAcceptanceProviderState",
            "nullable": true
          }
        },
        "required": [
          "capability",
          "detail"
        ],
        "type": "object"
      },
      "PaymentAcceptanceOverrideState": {
        "enum": [
          "ENABLED",
          "DISABLED",
          "INHERIT"
        ],
        "type": "string"
      },
      "PaymentAcceptancePolicyCommand": {
        "properties": {
          "capability": {
            "$ref": "#/components/schemas/PaymentAcceptanceCapability"
          },
          "locationId": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string"
          },
          "requestKey": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/PaymentAcceptanceOverrideState"
          }
        },
        "required": [
          "capability",
          "reason",
          "state"
        ],
        "type": "object"
      },
      "PaymentAcceptancePolicyCommandResponse": {
        "properties": {
          "fingerprint": {
            "type": "string"
          },
          "outcome": {
            "enum": [
              "UPDATED",
              "CLEARED"
            ],
            "type": "string"
          },
          "policy": {
            "$ref": "#/components/schemas/EffectivePaymentAcceptancePolicy"
          }
        },
        "required": [
          "fingerprint",
          "outcome",
          "policy"
        ],
        "type": "object"
      },
      "PaymentAcceptanceProviderState": {
        "enum": [
          "PROVISIONED",
          "NOT_PROVISIONED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "PaymentAcceptanceProviderStateSummary": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/PaymentAcceptanceProviderState"
          }
        },
        "required": [
          "credentialProfileId",
          "state"
        ],
        "type": "object"
      },
      "PaymentAcceptanceScope": {
        "enum": [
          "ORGANIZATION",
          "LOCATION"
        ],
        "type": "string"
      },
      "Billing": {
        "properties": {
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CancelSetupIntentRequest": {
        "properties": {
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardEntryRouteProvider": {
        "enum": [
          "DIRECT",
          "ELAVON_EPG",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "ConfirmSetupIntentRequest": {
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/Billing"
          },
          "cardEntryAttemptId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "cardHolderName": {
            "type": "string"
          },
          "cardNumber": {
            "type": "string"
          },
          "cvv": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string"
          },
          "hostedCard": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfirmSetupIntentWithSecretRequest": {
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/Billing",
            "nullable": true
          },
          "cardEntryAttemptId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "clientSecret": {
            "minLength": 1,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "futureUseNoticeVersion": {
            "maxLength": 80,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "hostedCard": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "clientSecret"
        ],
        "type": "object"
      },
      "CreateBankAccountPaymentMethodRequest": {
        "properties": {
          "accountHolderName": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[^\\p{Cc}]+$",
            "type": "string"
          },
          "accountNumber": {
            "minLength": 1,
            "pattern": "\\d{4,17}",
            "type": "string"
          },
          "accountType": {
            "$ref": "#/components/schemas/AchAccountType"
          },
          "customerId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "mandateAccepted": {
            "type": "boolean"
          },
          "mandateVersion": {
            "description": "Authorization version: ach-mandate-v1 for merchant attestation of customer-authorized storage and ACH debits; platform-fee-ach-debit-v1 only for the existing merchant fee-billing enrollment flow. Other versions are rejected.",
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "routingNumber": {
            "minLength": 1,
            "pattern": "\\d{9}",
            "type": "string"
          }
        },
        "required": [
          "accountHolderName",
          "accountNumber",
          "accountType",
          "customerId",
          "mandateAccepted",
          "mandateVersion",
          "routingNumber"
        ],
        "type": "object"
      },
      "CreateSetupIntentRequest": {
        "properties": {
          "consentActor": {
            "nullable": true,
            "type": "string"
          },
          "consentSource": {
            "$ref": "#/components/schemas/StoredCredentialConsentSource"
          },
          "consentVersion": {
            "type": "string"
          },
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "externalCustomerRef": {
            "nullable": true,
            "type": "string"
          },
          "invoiceId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "ownerType": {
            "$ref": "#/components/schemas/StoredCredentialOwnerType"
          },
          "purpose": {
            "$ref": "#/components/schemas/SavedPaymentMethodPurpose",
            "nullable": true
          },
          "replacementPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "usageType": {
            "type": "string"
          },
          "verifiedFirebaseUid": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustomerExternalRefSource": {
        "enum": [
          "PEAK_POS"
        ],
        "type": "string"
      },
      "HostedSetupLinkDeliveryMode": {
        "enum": [
          "EMAIL",
          "IFRAME"
        ],
        "type": "string"
      },
      "IssueHostedSetupLinkRequest": {
        "properties": {
          "consentActor": {
            "nullable": true,
            "type": "string"
          },
          "consentSource": {
            "$ref": "#/components/schemas/SetupIntentConsentSource",
            "nullable": true
          },
          "consentVersion": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "deliveryMode": {
            "$ref": "#/components/schemas/HostedSetupLinkDeliveryMode",
            "nullable": true
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "externalCustomerRef": {
            "nullable": true,
            "type": "string"
          },
          "externalRefSource": {
            "$ref": "#/components/schemas/SetupIntentExternalRefSource",
            "nullable": true
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "ownerType": {
            "$ref": "#/components/schemas/SetupIntentOwnerType",
            "nullable": true
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "recipientEmail": {
            "nullable": true,
            "type": "string"
          },
          "replacementPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "usageType": {
            "$ref": "#/components/schemas/SetupIntentUsageType",
            "nullable": true
          }
        },
        "type": "object"
      },
      "IssueHostedSetupLinkResponse": {
        "properties": {
          "deliveryMode": {
            "$ref": "#/components/schemas/HostedSetupLinkDeliveryMode"
          },
          "deliveryUnconfirmed": {
            "type": "boolean"
          },
          "embedTokenExpiresInSeconds": {
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "type": "string"
          },
          "hostedUrl": {
            "type": "string"
          },
          "sent": {
            "type": "boolean"
          },
          "setupIntentId": {
            "type": "string"
          }
        },
        "required": [
          "deliveryMode",
          "setupIntentId"
        ],
        "type": "object"
      },
      "PaginatedResponseSetupIntent": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SetupIntent"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaymentMethodStatusUpdate": {
        "enum": [
          "ACTIVE",
          "DISABLED"
        ],
        "type": "string"
      },
      "RecoveryConfirmCardRequest": {
        "properties": {
          "cardEntryAttemptId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "confirmationAttemptId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "hostedCard": {
            "nullable": true,
            "type": "string"
          },
          "recaptchaToken": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "confirmationAttemptId"
        ],
        "type": "object"
      },
      "RecoveryConfirmResult": {
        "properties": {
          "attemptId": {
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardSaved": {
            "type": "boolean"
          },
          "retried": {
            "type": "boolean"
          },
          "retryAllowed": {
            "type": "boolean"
          },
          "retryApproved": {
            "nullable": true,
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/RecoveryConfirmStatus"
          }
        },
        "required": [
          "attemptId",
          "cardSaved",
          "retried",
          "status"
        ],
        "type": "object"
      },
      "RecoveryConfirmStatus": {
        "enum": [
          "PENDING",
          "UNKNOWN",
          "SUCCEEDED",
          "DEFINITIVE_FAILURE"
        ],
        "type": "string"
      },
      "RecoveryContext": {
        "properties": {
          "amountDue": {
            "format": "int64",
            "type": "integer"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardEntryProvider": {
            "$ref": "#/components/schemas/CardEntryRouteProvider"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "confirmationAttemptId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "merchantName": {
            "type": "string"
          },
          "recoveryAttempt": {
            "$ref": "#/components/schemas/RecoveryConfirmResult",
            "nullable": true
          },
          "updatable": {
            "type": "boolean"
          }
        },
        "required": [
          "amountDue",
          "confirmationAttemptId",
          "currency",
          "locale",
          "merchantName",
          "updatable"
        ],
        "type": "object"
      },
      "ReplacePaymentMethodRequest": {
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/Billing",
            "nullable": true
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "clientSecret": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "hostedCard": {
            "nullable": true,
            "type": "string"
          },
          "setupIntentId": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "clientSecret",
          "setupIntentId"
        ],
        "type": "object"
      },
      "ResolveCustomerBindingRequest": {
        "properties": {
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerBillingAddress",
            "nullable": true
          },
          "email": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "expectedSyncVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "externalRef": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "externalRefSource": {
            "$ref": "#/components/schemas/CustomerExternalRefSource"
          },
          "firstName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "externalRef"
        ],
        "type": "object"
      },
      "SetupError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "declineCode": {
            "nullable": true,
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "networkStatus": {
            "nullable": true,
            "type": "string"
          },
          "networkTransactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "SetupIntent": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "billingAddressRequired": {
            "nullable": true,
            "type": "boolean"
          },
          "cancellationReason": {
            "nullable": true,
            "type": "string"
          },
          "cardEntryProvider": {
            "$ref": "#/components/schemas/CardEntryRouteProvider"
          },
          "clientSecret": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "externalCustomerRef": {
            "nullable": true,
            "type": "string"
          },
          "failedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "failureReason": {
            "nullable": true,
            "type": "string"
          },
          "futureUseNotice": {
            "nullable": true,
            "type": "string"
          },
          "futureUseNoticeVersion": {
            "nullable": true,
            "type": "string"
          },
          "lastSetupError": {
            "$ref": "#/components/schemas/SetupError",
            "nullable": true
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "maxAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "nextAction": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "originInvoiceId": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "purpose": {
            "$ref": "#/components/schemas/SavedPaymentMethodPurpose",
            "nullable": true
          },
          "setupIntentId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SetupIntentStatus"
          },
          "succeededAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "usageType": {
            "type": "string"
          },
          "verification": {
            "$ref": "#/components/schemas/SetupIntentVerification",
            "nullable": true
          },
          "verificationCurrency": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "merchantId",
          "metadata",
          "organizationId",
          "setupIntentId",
          "status",
          "usageType"
        ],
        "type": "object"
      },
      "SetupIntentConsentSource": {
        "enum": [
          "CHECKOUT",
          "VIRTUAL_TERMINAL",
          "CUSTOMER_PORTAL",
          "IMPORTED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "SetupIntentExternalRefSource": {
        "enum": [
          "PEAK_POS"
        ],
        "type": "string"
      },
      "SetupIntentListPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SetupIntent"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "total": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SetupIntentOwnerType": {
        "enum": [
          "CUSTOMER_MANAGED",
          "MERCHANT_MANAGED"
        ],
        "type": "string"
      },
      "SetupIntentStatus": {
        "enum": [
          "REQUIRES_PAYMENT_METHOD",
          "REQUIRES_CONFIRMATION",
          "REQUIRES_ACTION",
          "PROCESSING",
          "SUCCEEDED",
          "CANCELED",
          "FAILED"
        ],
        "type": "string"
      },
      "SetupIntentUsageType": {
        "enum": [
          "OFF_SESSION",
          "ON_SESSION"
        ],
        "type": "string"
      },
      "SetupIntentVerification": {
        "properties": {
          "avsResult": {
            "nullable": true,
            "type": "string"
          },
          "cvvResult": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoredCredentialConsentSource": {
        "enum": [
          "CHECKOUT",
          "VIRTUAL_TERMINAL",
          "CUSTOMER_PORTAL",
          "ACH_MANDATE",
          "IMPORTED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "StoredCredentialOwnerType": {
        "enum": [
          "MERCHANT_MANAGED",
          "CUSTOMER_MANAGED"
        ],
        "type": "string"
      },
      "UpdatePaymentMethodStatusRequest": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PaymentMethodStatusUpdate"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "AcceptCustomerContactInviteRequest": {
        "properties": {
          "inviteToken": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "inviteToken"
        ],
        "type": "object"
      },
      "PausePortalSubscriptionRequest": {
        "properties": {
          "resumeDate": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalConfirmSetupIntentRequest": {
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/Billing"
          },
          "cardEntryAttemptId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "cardHolderName": {
            "type": "string"
          },
          "cardNumber": {
            "type": "string"
          },
          "cvv": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string"
          },
          "hostedCard": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalCustomerResponse": {
        "properties": {
          "contactId": {
            "type": "string"
          },
          "contactStatus": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "identityId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "contactStatus",
          "customerId",
          "identityId",
          "merchantId",
          "organizationId"
        ],
        "type": "object"
      },
      "PortalOrganizationSummary": {
        "properties": {
          "displayName": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "organizationId"
        ],
        "type": "object"
      },
      "PortalPaymentMethod": {
        "properties": {
          "accountType": {
            "nullable": true,
            "type": "string"
          },
          "bankLast4": {
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "customerReconfirmationRequired": {
            "type": "boolean"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "instrumentType": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "nullable": true,
            "type": "string"
          },
          "paymentMethodId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PortalPaymentMethodStatus"
          }
        },
        "required": [
          "isDefault",
          "paymentMethodId"
        ],
        "type": "object"
      },
      "PortalPaymentMethodStatus": {
        "enum": [
          "ACTIVE",
          "DISABLED",
          "EXPIRED",
          "ATTENTION_REQUIRED"
        ],
        "type": "string"
      },
      "PortalProfile": {
        "properties": {
          "activeOrganizationId": {
            "nullable": true,
            "type": "string"
          },
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/PortalOrganizationSummary"
            },
            "type": "array"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalProrationPreviewRequest": {
        "properties": {
          "newAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "newAmount"
        ],
        "type": "object"
      },
      "PortalSession": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "locale": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "storeTimeZone": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "sessionId",
          "status"
        ],
        "type": "object"
      },
      "PortalSetupIntent": {
        "properties": {
          "cardEntryProvider": {
            "$ref": "#/components/schemas/CardEntryRouteProvider"
          },
          "setupIntentId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "setupIntentId",
          "status"
        ],
        "type": "object"
      },
      "PortalSwitchPlanRequest": {
        "properties": {
          "newAmount": {
            "format": "int64",
            "type": "integer"
          },
          "planName": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "newAmount"
        ],
        "type": "object"
      },
      "PortalTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "autoVoided": {
            "type": "boolean"
          },
          "capturedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "cashDiscountAmount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/PortalTransactionLineItem"
            },
            "type": "array"
          },
          "partiallyApproved": {
            "type": "boolean"
          },
          "processedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "remainingAuthorizedAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "settledAt": {
            "description": "Settlement anchor used for billing; this is not necessarily the time the settlement batch closed. The anchor may be midnight on the settlement business date in the merchant time zone.",
            "nullable": true,
            "type": "string"
          },
          "settlementObservedAt": {
            "description": "Instant when Gateway observed settlement. May be null for historical transactions.",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PortalTransactionStatus"
          },
          "surchargeAmount": {
            "format": "int64",
            "type": "integer"
          },
          "tipAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/PortalTransactionType"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "autoVoided",
          "cashDiscountAmount",
          "currency",
          "lineItems",
          "partiallyApproved",
          "status",
          "surchargeAmount",
          "tipAmount",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "PortalTransactionLineItem": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "lineTotal": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unitPrice": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PortalTransactionStatus": {
        "enum": [
          "PENDING",
          "APPROVED",
          "DECLINED",
          "ERROR",
          "VOIDED",
          "CAPTURED",
          "TIP_ADJUSTED",
          "ENRICHED",
          "SETTLED",
          "REFUNDED"
        ],
        "type": "string"
      },
      "PortalTransactionType": {
        "enum": [
          "SALE",
          "AUTH",
          "CAPTURE",
          "VOID",
          "REFUND",
          "RECURRING",
          "FORCE_AUTH"
        ],
        "type": "string"
      },
      "ProrationChargeStatus": {
        "enum": [
          "CHARGED",
          "DECLINED",
          "DEFERRED",
          "CREDITED",
          "NOT_REQUIRED",
          "NO_PAYMENT_METHOD"
        ],
        "type": "string"
      },
      "ProrationPreview": {
        "properties": {
          "breakdown": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionItemProration"
            },
            "type": "array"
          },
          "currentAmount": {
            "format": "int64",
            "type": "integer"
          },
          "daysInCycle": {
            "format": "int32",
            "type": "integer"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "newAmount": {
            "format": "int64",
            "type": "integer"
          },
          "prorationAmount": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "breakdown",
          "currentAmount",
          "daysInCycle",
          "daysRemaining",
          "newAmount",
          "prorationAmount",
          "subscriptionId"
        ],
        "type": "object"
      },
      "Subscription": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "billingPausedReason": {
            "nullable": true,
            "type": "string"
          },
          "cancellationReason": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "currentCycle": {
            "format": "int32",
            "type": "integer"
          },
          "customerCode": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "failedAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "interval": {
            "$ref": "#/components/schemas/SubscriptionInterval"
          },
          "intervalCount": {
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionItem"
            },
            "type": "array"
          },
          "lastBillingDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "lastBillingStatus": {
            "nullable": true,
            "type": "string"
          },
          "maxCycles": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "nextBillingDate": {
            "format": "date",
            "type": "string"
          },
          "planName": {
            "nullable": true,
            "type": "string"
          },
          "purchaseOrder": {
            "nullable": true,
            "type": "string"
          },
          "savedPaymentMethodId": {
            "type": "string"
          },
          "scheduledResumeDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "subscriptionId": {
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "trialEnd": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "trialPeriodDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "trialStart": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "currentCycle",
          "customerId",
          "failedAttempts",
          "interval",
          "intervalCount",
          "merchantId",
          "nextBillingDate",
          "savedPaymentMethodId",
          "startDate",
          "status",
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionInterval": {
        "enum": [
          "DAILY",
          "WEEKLY",
          "MONTHLY",
          "QUARTERLY",
          "YEARLY"
        ],
        "type": "string"
      },
      "SubscriptionItem": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "priceId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "subscriptionId": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "metadata",
          "priceId",
          "productId",
          "quantity",
          "subscriptionId",
          "unitAmount"
        ],
        "type": "object"
      },
      "SubscriptionItemMutationResponse": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/SubscriptionItem"
          },
          "proration": {
            "$ref": "#/components/schemas/SubscriptionItemProration"
          },
          "prorationChargeMessage": {
            "nullable": true,
            "type": "string"
          },
          "prorationChargeStatus": {
            "$ref": "#/components/schemas/ProrationChargeStatus"
          },
          "subscriptionAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "item",
          "proration",
          "subscriptionAmount"
        ],
        "type": "object"
      },
      "SubscriptionItemProration": {
        "properties": {
          "currentPeriodEnd": {
            "format": "date",
            "type": "string"
          },
          "currentPeriodStart": {
            "format": "date",
            "type": "string"
          },
          "daysInCycle": {
            "format": "int32",
            "type": "integer"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "itemId": {
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "nullable": true,
            "type": "string"
          },
          "prorationAmount": {
            "format": "int64",
            "type": "integer"
          },
          "quantityDelta": {
            "format": "int32",
            "type": "integer"
          },
          "resultingQuantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currentPeriodEnd",
          "currentPeriodStart",
          "daysInCycle",
          "daysRemaining",
          "prorationAmount",
          "quantityDelta",
          "unitAmount"
        ],
        "type": "object"
      },
      "SubscriptionStatus": {
        "enum": [
          "TRIALING",
          "ACTIVE",
          "PAUSED",
          "PAST_DUE",
          "SUSPENDED",
          "CANCELLING",
          "CANCELLED",
          "COMPLETED"
        ],
        "type": "string"
      },
      "UpdateItemQuantityRequest": {
        "properties": {
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "quantity"
        ],
        "type": "object"
      },
      "UpdateProfileRequest": {
        "properties": {
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalDeviceTrustExchangeRequest": {
        "properties": {
          "googleIdToken": {
            "maxLength": 16384,
            "minLength": 0,
            "type": "string"
          },
          "tenantId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "googleIdToken",
          "tenantId"
        ],
        "type": "object"
      },
      "PortalDeviceTrustExchangeResponse": {
        "properties": {
          "customToken": {
            "type": "string"
          }
        },
        "required": [
          "customToken"
        ],
        "type": "object"
      },
      "PortalLockStateResponse": {
        "properties": {
          "locked": {
            "type": "boolean"
          },
          "lockedUntil": {
            "type": "string"
          },
          "remainingAttempts": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "locked"
        ],
        "type": "object"
      },
      "PortalLockStatusRequest": {
        "properties": {
          "email": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          },
          "tenantId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "email",
          "tenantId"
        ],
        "type": "object"
      },
      "PortalMfaFailureRequest": {
        "properties": {
          "googleIdToken": {
            "maxLength": 8192,
            "minLength": 0,
            "type": "string"
          },
          "tenantId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "googleIdToken",
          "tenantId"
        ],
        "type": "object"
      },
      "ApplyDiscountRequest": {
        "properties": {
          "checkoutSessionId": {
            "nullable": true,
            "type": "string"
          },
          "couponId": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "subscriptionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "couponId"
        ],
        "type": "object"
      },
      "Coupon": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "amountOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "duration": {
            "type": "string"
          },
          "durationInMonths": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "percentOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "stackable": {
            "type": "boolean"
          },
          "timesRedeemed": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "currency",
          "duration",
          "id",
          "merchantId",
          "metadata",
          "name",
          "stackable",
          "timesRedeemed"
        ],
        "type": "object"
      },
      "CreateCouponRequest": {
        "properties": {
          "amountOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "duration": {
            "type": "string"
          },
          "durationInMonths": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "percentOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreatePromotionCodeRequest": {
        "properties": {
          "code": {
            "nullable": true,
            "type": "string"
          },
          "couponId": {
            "minLength": 1,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "couponId"
        ],
        "type": "object"
      },
      "DiscountResponse": {
        "properties": {
          "amountOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "checkoutSessionId": {
            "nullable": true,
            "type": "string"
          },
          "couponId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "percentOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "subscriptionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "couponId",
          "id",
          "merchantId"
        ],
        "type": "object"
      },
      "PromotionCode": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "couponId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "timesRedeemed": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "active",
          "code",
          "couponId",
          "id",
          "merchantId",
          "metadata",
          "timesRedeemed"
        ],
        "type": "object"
      },
      "CreateProvisioningJobRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ProvisioningJobAction"
          },
          "callbackUrl": {
            "nullable": true,
            "type": "string"
          },
          "deviceSerial": {
            "minLength": 1,
            "type": "string"
          },
          "merchantId": {
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ProvisioningJobMetadata"
          },
          "requestedBy": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "action",
          "deviceSerial",
          "merchantId",
          "metadata",
          "requestedBy"
        ],
        "type": "object"
      },
      "PaginatedProvisioningResponse": {
        "properties": {
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/ProvisioningJob"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "totalElements": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "jobs",
          "page",
          "size",
          "totalElements"
        ],
        "type": "object"
      },
      "ProvisioningJob": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ProvisioningJobAction"
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deviceSerial": {
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "estimatedCompletionSeconds": {
            "format": "int32",
            "type": "integer"
          },
          "jobId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProvisioningJobStatus"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/ProvisioningJobStep"
            },
            "type": "array"
          }
        },
        "required": [
          "action",
          "createdAt",
          "deviceSerial",
          "jobId",
          "merchantId",
          "status"
        ],
        "type": "object"
      },
      "ProvisioningJobAction": {
        "enum": [
          "ACTIVATE",
          "ROTATE_KEY",
          "PERSIST_ACTIVATION"
        ],
        "type": "string"
      },
      "ProvisioningJobMetadata": {
        "properties": {
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "providerTerminalId": {
            "nullable": true,
            "pattern": ".*\\S.*",
            "type": "string"
          },
          "storeId": {
            "minLength": 1,
            "type": "string"
          },
          "terminalId": {
            "nullable": true,
            "pattern": ".*\\S.*",
            "type": "string"
          }
        },
        "required": [
          "storeId"
        ],
        "type": "object"
      },
      "ProvisioningJobStatus": {
        "enum": [
          "QUEUED",
          "IN_PROGRESS",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ],
        "type": "string"
      },
      "ProvisioningJobStep": {
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProvisioningJobStatus"
          },
          "step": {
            "$ref": "#/components/schemas/ProvisioningStep"
          }
        },
        "required": [
          "status",
          "step"
        ],
        "type": "object"
      },
      "ProvisioningStep": {
        "enum": [
          "TRANSIT_ACTIVATION",
          "CREDENTIAL_STORAGE",
          "XTMS_PUSH"
        ],
        "type": "string"
      },
      "PaginatedResponseReconciliationDiscrepancy": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationDiscrepancy"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseReconciliationRun": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationRun"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "ReconciliationDiscrepancy": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "gatewayAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "gatewayStatus": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "resolutionNotes": {
            "nullable": true,
            "type": "string"
          },
          "resolutionStatus": {
            "type": "string"
          },
          "resolvedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolvedBy": {
            "nullable": true,
            "type": "string"
          },
          "runId": {
            "format": "uuid",
            "type": "string"
          },
          "transactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "transitAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transitStatus": {
            "nullable": true,
            "type": "string"
          },
          "transitTxnId": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "resolutionStatus",
          "runId",
          "type"
        ],
        "type": "object"
      },
      "ReconciliationRun": {
        "properties": {
          "batchId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "batchStatus": {
            "$ref": "#/components/schemas/BatchStatus",
            "nullable": true
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "discrepancyCount": {
            "format": "int32",
            "type": "integer"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "gatewayTotalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "gatewayTxnCount": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "matchedCount": {
            "format": "int32",
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "retryCount": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "transitTotalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transitTxnCount": {
            "format": "int32",
            "type": "integer"
          },
          "triggerType": {
            "type": "string"
          },
          "windowEnd": {
            "format": "date-time",
            "type": "string"
          },
          "windowStart": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "discrepancyCount",
          "gatewayTotalAmount",
          "gatewayTxnCount",
          "id",
          "matchedCount",
          "merchantId",
          "retryCount",
          "status",
          "transitTotalAmount",
          "transitTxnCount",
          "triggerType",
          "windowEnd",
          "windowStart"
        ],
        "type": "object"
      },
      "CardBrandBreakdown": {
        "properties": {
          "amount": {
            "nullable": true,
            "type": "number"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currencyTotals": {
            "items": {
              "$ref": "#/components/schemas/CardBrandCurrencyBreakdown"
            },
            "type": "array"
          }
        },
        "required": [
          "count"
        ],
        "type": "object"
      },
      "CardBrandCurrencyBreakdown": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "count",
          "currency"
        ],
        "type": "object"
      },
      "CardBrandReport": {
        "properties": {
          "amex": {
            "$ref": "#/components/schemas/CardBrandBreakdown"
          },
          "discover": {
            "$ref": "#/components/schemas/CardBrandBreakdown"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "mastercard": {
            "$ref": "#/components/schemas/CardBrandBreakdown"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "visa": {
            "$ref": "#/components/schemas/CardBrandBreakdown"
          }
        },
        "required": [
          "amex",
          "discover",
          "from",
          "mastercard",
          "to",
          "visa"
        ],
        "type": "object"
      },
      "ChurnReport": {
        "properties": {
          "activeBaseAtWindowStart": {
            "format": "int64",
            "type": "integer"
          },
          "cancelledCount": {
            "format": "int64",
            "type": "integer"
          },
          "churnRate": {
            "format": "double",
            "type": "number"
          },
          "from": {
            "type": "string"
          },
          "involuntaryCancelledCount": {
            "format": "int64",
            "type": "integer"
          },
          "involuntaryChurnRate": {
            "format": "double",
            "type": "number"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "voluntaryCancelledCount": {
            "format": "int64",
            "type": "integer"
          },
          "voluntaryChurnRate": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "activeBaseAtWindowStart",
          "cancelledCount",
          "churnRate",
          "from",
          "involuntaryCancelledCount",
          "involuntaryChurnRate",
          "to",
          "voluntaryCancelledCount",
          "voluntaryChurnRate"
        ],
        "type": "object"
      },
      "DailyReport": {
        "properties": {
          "averageTicket": {
            "description": "Gross per upstream-reported transaction, including refunds; not a completed-sale average. Null at zero count.",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currencyTotals": {
            "items": {
              "$ref": "#/components/schemas/ReportCurrencyTotals"
            },
            "type": "array"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "netAmount": {
            "description": "Refund-adjusted net: upstream gross minus refunds, in currency minor units. Null for mixed currencies.",
            "nullable": true,
            "type": "number"
          },
          "totalRefunds": {
            "nullable": true,
            "type": "number"
          },
          "totalSales": {
            "nullable": true,
            "type": "number"
          },
          "transactionCount": {
            "description": "Upstream operational transaction count, including refunds; not completed-sale count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "transactionCount"
        ],
        "type": "object"
      },
      "DeclineCategoryOutcome": {
        "properties": {
          "closedLostCount": {
            "format": "int64",
            "type": "integer"
          },
          "declineCategory": {
            "type": "string"
          },
          "recoveredCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "closedLostCount",
          "declineCategory",
          "recoveredCount"
        ],
        "type": "object"
      },
      "MonthlyReport": {
        "properties": {
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "month": {
            "example": "2026-01",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/MonthlyReportTotals"
          }
        },
        "required": [
          "month",
          "totals"
        ],
        "type": "object"
      },
      "MonthlyReportTotals": {
        "properties": {
          "averageTicket": {
            "description": "Gross per upstream-reported transaction, including refunds; not a completed-sale average. Null at zero count.",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currencyTotals": {
            "items": {
              "$ref": "#/components/schemas/ReportCurrencyTotals"
            },
            "type": "array"
          },
          "netAmount": {
            "description": "Refund-adjusted net: upstream gross minus refunds, in currency minor units. Null for mixed currencies.",
            "nullable": true,
            "type": "number"
          },
          "totalRefunds": {
            "nullable": true,
            "type": "number"
          },
          "totalSales": {
            "nullable": true,
            "type": "number"
          },
          "transactionCount": {
            "description": "Upstream operational transaction count, including refunds; not completed-sale count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "transactionCount"
        ],
        "type": "object"
      },
      "MrrCurrencyBreakdown": {
        "properties": {
          "activeSubscriptionCount": {
            "format": "int64",
            "type": "integer"
          },
          "atRiskSubscriptionCount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "currentMrr": {
            "format": "int64",
            "type": "integer"
          },
          "mrrAtRisk": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "activeSubscriptionCount",
          "atRiskSubscriptionCount",
          "currency",
          "currentMrr",
          "mrrAtRisk"
        ],
        "type": "object"
      },
      "MrrReport": {
        "properties": {
          "activeSubscriptionCount": {
            "format": "int64",
            "type": "integer"
          },
          "atRiskSubscriptionCount": {
            "format": "int64",
            "type": "integer"
          },
          "byCurrency": {
            "items": {
              "$ref": "#/components/schemas/MrrCurrencyBreakdown"
            },
            "type": "array"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currentMrr": {
            "format": "int64",
            "type": "integer"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "mrrAtRisk": {
            "format": "int64",
            "type": "integer"
          },
          "openDunningCaseCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "activeSubscriptionCount",
          "atRiskSubscriptionCount",
          "byCurrency",
          "currentMrr",
          "mrrAtRisk",
          "openDunningCaseCount"
        ],
        "type": "object"
      },
      "PaginatedResponseReportExportJob": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReportExportJob"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseReportRun": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReportRun"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaymentMethodUpdaterProvider": {
        "enum": [
          "CARDPOINTE_CAU",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "RecoveredRevenueByCurrency": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "recoveredRevenue": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "recoveredRevenue"
        ],
        "type": "object"
      },
      "RecoveryFunnelStage": {
        "properties": {
          "cardUpdated": {
            "format": "int64",
            "type": "integer"
          },
          "closedLost": {
            "format": "int64",
            "type": "integer"
          },
          "linkSent": {
            "format": "int64",
            "type": "integer"
          },
          "opened": {
            "format": "int64",
            "type": "integer"
          },
          "recovered": {
            "format": "int64",
            "type": "integer"
          },
          "retryScheduled": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "cardUpdated",
          "closedLost",
          "linkSent",
          "opened",
          "recovered",
          "retryScheduled"
        ],
        "type": "object"
      },
      "RecoveryMethodBreakdown": {
        "properties": {
          "caseCount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "recoveredAmount": {
            "format": "int64",
            "type": "integer"
          },
          "recoveryMethod": {
            "type": "string"
          }
        },
        "required": [
          "caseCount",
          "currency",
          "recoveredAmount",
          "recoveryMethod"
        ],
        "type": "object"
      },
      "RecoveryReport": {
        "properties": {
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "funnel": {
            "$ref": "#/components/schemas/RecoveryFunnelStage"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "outcomesByDeclineCategory": {
            "items": {
              "$ref": "#/components/schemas/DeclineCategoryOutcome"
            },
            "type": "array"
          },
          "recoveredRevenue": {
            "format": "int64",
            "type": "integer"
          },
          "recoveredRevenueByCurrency": {
            "items": {
              "$ref": "#/components/schemas/RecoveredRevenueByCurrency"
            },
            "type": "array"
          },
          "recoveryMethodBreakdown": {
            "items": {
              "$ref": "#/components/schemas/RecoveryMethodBreakdown"
            },
            "type": "array"
          },
          "recoveryRate": {
            "format": "double",
            "type": "number"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "funnel",
          "outcomesByDeclineCategory",
          "recoveredRevenue",
          "recoveredRevenueByCurrency",
          "recoveryMethodBreakdown",
          "recoveryRate",
          "to"
        ],
        "type": "object"
      },
      "ReportCurrencyTotals": {
        "properties": {
          "averageTicket": {
            "description": "Gross per upstream-reported transaction, including refunds; not a completed-sale average. Null at zero count.",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "netAmount": {
            "description": "Refund-adjusted net: upstream gross minus refunds, in currency minor units.",
            "type": "number"
          },
          "totalRefunds": {
            "type": "number"
          },
          "totalSales": {
            "type": "number"
          },
          "transactionCount": {
            "description": "Upstream operational transaction count, including refunds; not completed-sale count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "netAmount",
          "totalRefunds",
          "totalSales",
          "transactionCount"
        ],
        "type": "object"
      },
      "ReportExportDestinationRequest": {
        "properties": {
          "to": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "type": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ReportExportJob": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "nextRunAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reportType": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "resultLocation": {
            "nullable": true,
            "type": "string"
          },
          "schedule": {
            "nullable": true,
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "createdAt",
          "format",
          "id",
          "organizationId",
          "reportType",
          "requestedBy",
          "status"
        ],
        "type": "object"
      },
      "ReportExportRequest": {
        "properties": {
          "date": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "destination": {
            "items": {
              "$ref": "#/components/schemas/ReportExportDestinationRequest"
            },
            "minItems": 1,
            "type": "array"
          },
          "format": {
            "minLength": 1,
            "type": "string"
          },
          "from": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "month": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "minLength": 1,
            "type": "string"
          },
          "reportType": {
            "minLength": 1,
            "type": "string"
          },
          "schedule": {
            "nullable": true,
            "type": "string"
          },
          "to": {
            "format": "date",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "reportType"
        ],
        "type": "object"
      },
      "ReportRun": {
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reportType": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "resultLocation": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "id",
          "organizationId",
          "reportType",
          "requestedBy",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "ReportRunRequest": {
        "properties": {
          "date": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "from": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "month": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "minLength": 1,
            "type": "string"
          },
          "reportType": {
            "minLength": 1,
            "type": "string"
          },
          "to": {
            "format": "date",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "reportType"
        ],
        "type": "object"
      },
      "SubscriptionUpdaterOutcomeResponse": {
        "properties": {
          "accountClosed": {
            "type": "boolean"
          },
          "attentionRequired": {
            "type": "boolean"
          },
          "auditReference": {
            "type": "string"
          },
          "billingPausedReason": {
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardExpMonth": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "cardExpYear": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "issuerAttentionReason": {
            "nullable": true,
            "type": "string"
          },
          "nonUpdatable": {
            "type": "boolean"
          },
          "outcome": {
            "type": "string"
          },
          "paymentMethodStatus": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentMethodUpdaterProvider"
          },
          "reportedAt": {
            "type": "string"
          },
          "savedPaymentMethodId": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "subscriptionStatus": {
            "type": "string"
          }
        },
        "required": [
          "accountClosed",
          "attentionRequired",
          "auditReference",
          "customerId",
          "nonUpdatable",
          "outcome",
          "paymentMethodStatus",
          "provider",
          "reportedAt",
          "savedPaymentMethodId",
          "subscriptionId",
          "subscriptionStatus"
        ],
        "type": "object"
      },
      "SubscriptionUpdaterReport": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionUpdaterOutcomeResponse"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "merchantId",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "CreateReserveRuleRequest": {
        "properties": {
          "accrualBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          },
          "capMinor": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "idempotencyKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          },
          "releaseCadence": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "accrualBps",
          "capMinor",
          "credentialProfileId",
          "expectedVersion",
          "idempotencyKey",
          "reason",
          "releaseCadence"
        ],
        "type": "object"
      },
      "CredentialProfileRoutingControl": {
        "enum": [
          "ROUTABLE",
          "LOCKED"
        ],
        "type": "string"
      },
      "ReserveControlActionResponse": {
        "properties": {
          "actionType": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "afterState": {
            "nullable": true,
            "type": "string"
          },
          "beforeState": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resourceId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "actionType",
          "actor",
          "createdAt",
          "id",
          "idempotencyKey",
          "organizationId",
          "reason"
        ],
        "type": "object"
      },
      "ReserveControlCommand": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "pattern": "[A-Za-z]{3}",
            "type": "string"
          },
          "idempotencyKey": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "idempotencyKey",
          "reason"
        ],
        "type": "object"
      },
      "ReserveControlResult": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ReserveControlActionResponse"
          },
          "ledger": {
            "$ref": "#/components/schemas/ReserveLedgerEntry"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "ledger",
          "replayed"
        ],
        "type": "object"
      },
      "ReserveForecastEntry": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "ledgerEntryId": {
            "format": "uuid",
            "type": "string"
          },
          "scheduledReleaseAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "ledgerEntryId",
          "scheduledReleaseAt"
        ],
        "type": "object"
      },
      "ReserveLedgerEntry": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterMinor": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "entryType": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "releasedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "scheduledReleaseAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sourceBatchId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "balanceAfterMinor",
          "createdAt",
          "currency",
          "entryType",
          "id",
          "organizationId"
        ],
        "type": "object"
      },
      "ReserveRule": {
        "properties": {
          "accrualBps": {
            "format": "int32",
            "type": "integer"
          },
          "capMinor": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "releaseCadence": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "accrualBps",
          "capMinor",
          "createdAt",
          "credentialProfileId",
          "id",
          "organizationId",
          "releaseCadence",
          "status",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "ReserveRuleCommandRequest": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "idempotencyKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "expectedVersion",
          "idempotencyKey",
          "reason"
        ],
        "type": "object"
      },
      "ReserveRuleCommandResult": {
        "properties": {
          "actionType": {
            "type": "string"
          },
          "after": {
            "$ref": "#/components/schemas/ReserveRuleRevision"
          },
          "before": {
            "$ref": "#/components/schemas/ReserveRuleRevision",
            "nullable": true
          },
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "type": "integer"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "actionType",
          "after",
          "commandId",
          "expectedVersion",
          "idempotencyKey",
          "replayed"
        ],
        "type": "object"
      },
      "ReserveRuleRevision": {
        "properties": {
          "accrualBps": {
            "format": "int32",
            "type": "integer"
          },
          "actionType": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "capMinor": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "releaseCadence": {
            "type": "string"
          },
          "restoredFromVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "ruleId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "accrualBps",
          "actionType",
          "actor",
          "capMinor",
          "createdAt",
          "credentialProfileId",
          "id",
          "organizationId",
          "reason",
          "releaseCadence",
          "ruleId",
          "status",
          "version"
        ],
        "type": "object"
      },
      "ReserveScopeSummary": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "credentialProfileMcc": {
            "nullable": true,
            "type": "string"
          },
          "credentialProfileName": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "currentBalanceMinor": {
            "format": "int64",
            "type": "integer"
          },
          "forecast": {
            "items": {
              "$ref": "#/components/schemas/ReserveForecastEntry"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          },
          "routingControl": {
            "$ref": "#/components/schemas/CredentialProfileRoutingControl",
            "nullable": true
          }
        },
        "required": [
          "currency",
          "currentBalanceMinor",
          "forecast",
          "organizationId"
        ],
        "type": "object"
      },
      "ReserveSummary": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "currentBalanceMinor": {
            "format": "int64",
            "type": "integer"
          },
          "forecast": {
            "items": {
              "$ref": "#/components/schemas/ReserveForecastEntry"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "currentBalanceMinor",
          "forecast",
          "organizationId"
        ],
        "type": "object"
      },
      "RestoreReserveRuleRequest": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "idempotencyKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          },
          "revisionVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "credentialProfileId",
          "expectedVersion",
          "idempotencyKey",
          "reason",
          "revisionVersion"
        ],
        "type": "object"
      },
      "RiskControl": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "maxRiskScore": {
            "format": "int32",
            "maximum": 100.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "minRiskScore": {
            "format": "int32",
            "maximum": 100.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "riskPolicy": {
            "$ref": "#/components/schemas/RiskPolicy"
          },
          "routingControl": {
            "$ref": "#/components/schemas/CredentialProfileRoutingControl"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "maxRiskScore",
          "minRiskScore",
          "organizationId",
          "riskPolicy",
          "routingControl",
          "updatedAt",
          "updatedBy"
        ],
        "type": "object"
      },
      "RiskControlAction": {
        "properties": {
          "actionType": {
            "$ref": "#/components/schemas/RiskControlActionType"
          },
          "actor": {
            "type": "string"
          },
          "afterState": {
            "nullable": true,
            "type": "string"
          },
          "beforeState": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialProfileId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resourceId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "actionType",
          "actor",
          "createdAt",
          "id",
          "idempotencyKey",
          "organizationId",
          "reason"
        ],
        "type": "object"
      },
      "RiskControlActionType": {
        "enum": [
          "LOCK",
          "UNLOCK",
          "AFFINITY_MIGRATION",
          "RESERVE_ADJUSTMENT",
          "RESERVE_RELEASE",
          "APPROVAL_RATE_CONFIG_CREATED",
          "APPROVAL_RATE_CONFIG_CHANGED",
          "APPROVAL_RATE_ENABLED",
          "APPROVAL_RATE_DISABLED",
          "APPROVAL_RATE_RESTRICTED",
          "APPROVAL_RATE_RESTORED",
          "RISK_TIER_CHANGE",
          "RISK_RANGE_CHANGE"
        ],
        "type": "string"
      },
      "RiskControlWriteCommand": {
        "properties": {
          "idempotencyKey": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "idempotencyKey",
          "reason"
        ],
        "type": "object"
      },
      "RiskPolicy": {
        "description": "Payment risk policy applied by profile routing controls.",
        "enum": [
          "ANY",
          "SCORED_RANGE"
        ],
        "type": "string"
      },
      "RiskRangeChangeCommand": {
        "properties": {
          "idempotencyKey": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "maxRiskScore": {
            "format": "int32",
            "maximum": 100.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "minRiskScore": {
            "format": "int32",
            "maximum": 100.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          },
          "riskPolicy": {
            "$ref": "#/components/schemas/RiskPolicy"
          }
        },
        "required": [
          "idempotencyKey",
          "reason",
          "riskPolicy"
        ],
        "type": "object"
      },
      "AttemptBudgetLimits": {
        "properties": {
          "maxAttemptsPerProfile": {
            "format": "int32",
            "type": "integer"
          },
          "maxCrossMidAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "maxTotalAttempts": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "maxAttemptsPerProfile",
          "maxTotalAttempts"
        ],
        "type": "object"
      },
      "AutomaticOptimizationState": {
        "enum": [
          "OFF",
          "WAITING",
          "TESTING",
          "EVALUATING"
        ],
        "type": "string"
      },
      "AutomaticOptimizationStatus": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "lastAdoptedApprovalLift": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "lastAdoptedApprovalLiftLower95": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "lastAdoptedApprovalLiftUpper95": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "lastAdoptedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "latestModelAdoptedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AutomaticOptimizationState"
          },
          "testingEnrollmentBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "testingSince": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "state"
        ],
        "type": "object"
      },
      "EffectiveRoutingPolicyResponse": {
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "crossProcessorBindingLimits": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "effectiveAttemptLimits": {
            "$ref": "#/components/schemas/AttemptBudgetLimits"
          },
          "effectiveExplorationBps": {
            "format": "int32",
            "type": "integer"
          },
          "featureAccess": {
            "$ref": "#/components/schemas/FeatureAccessResolution"
          },
          "optimizationPolicy": {
            "$ref": "#/components/schemas/RoutingOptimizationPolicy"
          },
          "platformDecisionParameters": {
            "$ref": "#/components/schemas/PlatformRoutingDecisionParameters"
          },
          "policy": {
            "$ref": "#/components/schemas/RoutingAutomationPolicy"
          },
          "policySource": {
            "$ref": "#/components/schemas/RoutingPolicySource"
          }
        },
        "required": [
          "configured",
          "crossProcessorBindingLimits",
          "effectiveAttemptLimits",
          "effectiveExplorationBps",
          "featureAccess",
          "optimizationPolicy",
          "platformDecisionParameters",
          "policy",
          "policySource"
        ],
        "type": "object"
      },
      "FeatureAccessResolution": {
        "enum": [
          "ENABLED",
          "DISABLED",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "ManagementCreateRoutingRuleRequest": {
        "properties": {
          "expectedLocationRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "expectedRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "rule": {
            "$ref": "#/components/schemas/ManagementRoutingRuleFields"
          }
        },
        "required": [
          "expectedRuleSetVersion",
          "rule"
        ],
        "type": "object"
      },
      "ManagementDeleteRoutingRuleRequest": {
        "properties": {
          "expectedLocationRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "expectedRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expectedRuleVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedRuleSetVersion",
          "expectedRuleVersion",
          "reason"
        ],
        "type": "object"
      },
      "ManagementRestoreRoutingRuleRequest": {
        "properties": {
          "expectedLocationRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "expectedRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expectedRuleVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "expectedRuleSetVersion",
          "expectedRuleVersion"
        ],
        "type": "object"
      },
      "ManagementRoutingIssuerGroup": {
        "properties": {
          "issuerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "issuerKey": {
            "type": "string"
          },
          "issuerName": {
            "type": "string"
          },
          "memberNames": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sharedIssuerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "issuerIds",
          "issuerKey",
          "issuerName",
          "memberNames",
          "sharedIssuerIds"
        ],
        "type": "object"
      },
      "ManagementRoutingIssuerResolveRequest": {
        "properties": {
          "issuerIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "issuerIds"
        ],
        "type": "object"
      },
      "ManagementRoutingRule": {
        "properties": {
          "binCountries": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "binFundingTypes": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "binRanges": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "cardNetworks": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "issuerBankIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "maxAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "minAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "riskConditionRetired": {
            "type": "boolean"
          },
          "targetCredentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "targetProcessorPlatform": {
            "type": "string"
          },
          "targetProcessorType": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "createdAt",
          "enabled",
          "id",
          "organizationId",
          "priority",
          "riskConditionRetired",
          "targetCredentialProfileId",
          "targetProcessorPlatform",
          "targetProcessorType",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "ManagementRoutingRuleFields": {
        "properties": {
          "binCountries": {
            "items": {
              "type": "string"
            },
            "maxItems": 250,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "binFundingTypes": {
            "items": {
              "type": "string"
            },
            "maxItems": 8,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "binRanges": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "cardNetworks": {
            "items": {
              "type": "string"
            },
            "maxItems": 8,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "enabled": {
            "type": "boolean"
          },
          "issuerBankIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "minItems": 0,
            "nullable": true,
            "type": "array"
          },
          "maxAmountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "minAmountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "priority": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "targetCredentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "targetProcessorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "targetProcessorType": {
            "$ref": "#/components/schemas/ProcessorType"
          }
        },
        "required": [
          "enabled",
          "priority",
          "targetCredentialProfileId",
          "targetProcessorPlatform",
          "targetProcessorType"
        ],
        "type": "object"
      },
      "ManagementRoutingRuleMutationResponse": {
        "properties": {
          "locationRuleSetVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "rule": {
            "$ref": "#/components/schemas/ManagementRoutingRule"
          },
          "ruleSetVersion": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "rule",
          "ruleSetVersion"
        ],
        "type": "object"
      },
      "ManagementRoutingRuleSetResponse": {
        "properties": {
          "fraudProtectionEnabled": {
            "type": "boolean"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "locationRuleSetVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "ruleSetVersion": {
            "format": "int64",
            "type": "integer"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/ManagementRoutingRule"
            },
            "type": "array"
          }
        },
        "required": [
          "organizationId",
          "ruleSetVersion",
          "rules"
        ],
        "type": "object"
      },
      "ManagementRoutingRuleTargetProfile": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "status": {
            "$ref": "#/components/schemas/CredentialProfileStatus"
          }
        },
        "required": [
          "id",
          "name",
          "processorPlatform",
          "processorType",
          "status"
        ],
        "type": "object"
      },
      "ManagementUpdateRoutingRuleRequest": {
        "properties": {
          "expectedLocationRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "expectedRuleSetVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expectedRuleVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "rule": {
            "$ref": "#/components/schemas/ManagementRoutingRuleFields"
          }
        },
        "required": [
          "expectedRuleSetVersion",
          "expectedRuleVersion",
          "rule"
        ],
        "type": "object"
      },
      "PlatformRoutingDecisionParameters": {
        "properties": {
          "approvalEquivalenceBps": {
            "format": "int32",
            "type": "integer"
          },
          "configurationVersion": {
            "format": "int64",
            "type": "integer"
          },
          "minimumRecoveryProbabilityBps": {
            "format": "int32",
            "type": "integer"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RoutingAllocationAccountSettingsResponse": {
        "properties": {
          "bindingVerified": {
            "type": "boolean"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "credentialProfileKeyVersion": {
            "format": "int64",
            "type": "integer"
          },
          "policy": {
            "$ref": "#/components/schemas/RoutingAllocationPolicySettingsResponse",
            "nullable": true
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform",
            "nullable": true
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType",
            "nullable": true
          },
          "profileName": {
            "type": "string"
          },
          "recoveryFamilyId": {
            "nullable": true,
            "type": "string"
          },
          "recoveryFamilyRevision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "bindingVerified",
          "credentialProfileId",
          "credentialProfileKeyVersion",
          "policy",
          "profileName",
          "recoveryFamilyId",
          "recoveryFamilyRevision"
        ],
        "type": "object"
      },
      "RoutingAllocationPolicyBatchRequest": {
        "properties": {
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/RoutingAllocationPolicyChange"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "currency",
          "organizationId",
          "policies"
        ],
        "type": "object"
      },
      "RoutingAllocationPolicyChange": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "expectedRevision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "maximumConcentrationBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          },
          "minimumTargetMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "preferredShareBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "credentialProfileId",
          "enabled",
          "expectedRevision",
          "maximumConcentrationBps",
          "minimumTargetMinor",
          "preferredShareBps"
        ],
        "type": "object"
      },
      "RoutingAllocationPolicySettingsResponse": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "maximumConcentrationBps": {
            "format": "int32",
            "type": "integer"
          },
          "minimumTargetMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "preferredShareBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "maximumConcentrationBps",
          "minimumTargetMinor",
          "preferredShareBps",
          "revision"
        ],
        "type": "object"
      },
      "RoutingAllocationRecoveryFamilyRequest": {
        "properties": {
          "expectedCredentialProfileKeyVersion": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "expectedRevision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "familyId": {
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "reason": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "expectedCredentialProfileKeyVersion",
          "expectedRevision",
          "familyId",
          "organizationId",
          "reason"
        ],
        "type": "object"
      },
      "RoutingAllocationRecoveryFamilyResponse": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "recoveryFamilyId": {
            "type": "string"
          },
          "recoveryFamilyRevision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "credentialProfileId",
          "organizationId",
          "recoveryFamilyId",
          "recoveryFamilyRevision"
        ],
        "type": "object"
      },
      "RoutingAllocationRecoveryFamilySettingsResponse": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/RoutingAllocationAccountSettingsResponse"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "accounts",
          "organizationId"
        ],
        "type": "object"
      },
      "RoutingAllocationSettingsResponse": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/RoutingAllocationAccountSettingsResponse"
            },
            "type": "array"
          },
          "allocationMonth": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "accounts",
          "allocationMonth",
          "currency",
          "organizationId"
        ],
        "type": "object"
      },
      "RoutingAutomationPolicy": {
        "properties": {
          "configurationVersion": {
            "format": "int64",
            "type": "integer"
          },
          "crossMidRetryEnabled": {
            "type": "boolean"
          },
          "explorationBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "maxAttemptsPerProfile": {
            "format": "int32",
            "type": "integer"
          },
          "maxCrossMidAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "maxTotalAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentUseCase": {
            "type": "string"
          },
          "sameMidRetryEnabled": {
            "type": "boolean"
          }
        },
        "required": [
          "crossMidRetryEnabled",
          "maxAttemptsPerProfile",
          "maxCrossMidAttempts",
          "maxTotalAttempts",
          "organizationId",
          "paymentUseCase",
          "sameMidRetryEnabled"
        ],
        "type": "object"
      },
      "RoutingAutomationPolicyRequest": {
        "properties": {
          "crossMidRetryEnabled": {
            "nullable": true,
            "type": "boolean"
          },
          "expectedRevision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "explorationBps": {
            "format": "int32",
            "maximum": 1000.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "maxAttemptsPerProfile": {
            "format": "int32",
            "maximum": 5,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "maxCrossMidAttempts": {
            "format": "int32",
            "maximum": 10.0,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "maxTotalAttempts": {
            "format": "int32",
            "maximum": 20.0,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "reason": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string"
          },
          "resetExplorationToDefault": {
            "type": "boolean"
          },
          "sameMidRetryEnabled": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "expectedRevision",
          "reason"
        ],
        "type": "object"
      },
      "RoutingDeclineMapOutcome": {
        "properties": {
          "outcomeCategory": {
            "$ref": "#/components/schemas/ProcessorOutcomeCategory"
          },
          "retriedOnSameAccount": {
            "type": "boolean"
          },
          "safeForCrossProcessorFailover": {
            "type": "boolean"
          }
        },
        "required": [
          "outcomeCategory",
          "retriedOnSameAccount",
          "safeForCrossProcessorFailover"
        ],
        "type": "object"
      },
      "RoutingDeclineMapProcessor": {
        "properties": {
          "absentResponseCodeRetryClass": {
            "$ref": "#/components/schemas/RoutingDeclineRetryClass"
          },
          "hardNoRetryResponseCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/RoutingDeclineMapOutcome"
            },
            "type": "array"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "softRetryableResponseCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "unknownResponseCodeRetryClass": {
            "$ref": "#/components/schemas/RoutingDeclineRetryClass"
          }
        },
        "required": [
          "absentResponseCodeRetryClass",
          "hardNoRetryResponseCodes",
          "outcomes",
          "processorType",
          "softRetryableResponseCodes",
          "unknownResponseCodeRetryClass"
        ],
        "type": "object"
      },
      "RoutingDeclineMapResponse": {
        "properties": {
          "processors": {
            "items": {
              "$ref": "#/components/schemas/RoutingDeclineMapProcessor"
            },
            "type": "array"
          }
        },
        "required": [
          "processors"
        ],
        "type": "object"
      },
      "RoutingDeclineReplayBreakdown": {
        "properties": {
          "outcomeCategory": {
            "$ref": "#/components/schemas/ProcessorOutcomeCategory"
          },
          "retryClass": {
            "$ref": "#/components/schemas/RoutingDeclineRetryClass"
          },
          "terminal": {
            "format": "int64",
            "type": "integer"
          },
          "totalDeclines": {
            "format": "int64",
            "type": "integer"
          },
          "wouldDescend": {
            "format": "int64",
            "type": "integer"
          },
          "wouldRetrySameAccount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "outcomeCategory",
          "retryClass",
          "terminal",
          "totalDeclines",
          "wouldDescend",
          "wouldRetrySameAccount"
        ],
        "type": "object"
      },
      "RoutingDeclineReplayResponse": {
        "properties": {
          "breakdown": {
            "items": {
              "$ref": "#/components/schemas/RoutingDeclineReplayBreakdown"
            },
            "type": "array"
          },
          "excludedUnknownAttempts": {
            "format": "int64",
            "type": "integer"
          },
          "terminal": {
            "format": "int64",
            "type": "integer"
          },
          "totalDeclines": {
            "format": "int64",
            "type": "integer"
          },
          "windowDays": {
            "format": "int32",
            "type": "integer"
          },
          "wouldDescend": {
            "format": "int64",
            "type": "integer"
          },
          "wouldRetrySameAccount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "breakdown",
          "excludedUnknownAttempts",
          "terminal",
          "totalDeclines",
          "windowDays",
          "wouldDescend",
          "wouldRetrySameAccount"
        ],
        "type": "object"
      },
      "RoutingDeclineRetryClass": {
        "enum": [
          "HARD_NO_RETRY",
          "SOFT_RETRYABLE"
        ],
        "type": "string"
      },
      "RoutingObjective": {
        "enum": [
          "MAXIMIZE_APPROVALS",
          "BALANCED",
          "OPTIMIZE_COST"
        ],
        "type": "string"
      },
      "RoutingOptimizationPolicy": {
        "properties": {
          "automaticOptimization": {
            "type": "boolean"
          },
          "configurationVersion": {
            "format": "int64",
            "type": "integer"
          },
          "maximumApprovalRegretBps": {
            "format": "int32",
            "type": "integer"
          },
          "minimumApprovalBps": {
            "format": "int32",
            "type": "integer"
          },
          "objective": {
            "$ref": "#/components/schemas/RoutingObjective"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "RoutingOptimizationPolicyRequest": {
        "properties": {
          "automaticOptimization": {
            "type": "boolean"
          },
          "expectedRevision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "maximumApprovalRegretBps": {
            "format": "int32",
            "maximum": 1000.0,
            "minimum": 0,
            "type": "integer"
          },
          "minimumApprovalBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          },
          "objective": {
            "$ref": "#/components/schemas/RoutingObjective"
          },
          "reason": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "automaticOptimization",
          "expectedRevision",
          "maximumApprovalRegretBps",
          "minimumApprovalBps",
          "objective",
          "reason"
        ],
        "type": "object"
      },
      "RoutingPolicySource": {
        "enum": [
          "LOCATION",
          "ORGANIZATION",
          "DEFAULT"
        ],
        "type": "string"
      },
      "RoutingHealthAccountControlScope": {
        "properties": {
          "processorAccountId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "processorAccountId"
        ],
        "type": "object"
      },
      "RoutingHealthAccountControlView": {
        "properties": {
          "automaticVersion": {
            "format": "int64",
            "type": "integer"
          },
          "evidence": {
            "$ref": "#/components/schemas/RoutingHealthScopeEvidence"
          },
          "healthState": {
            "$ref": "#/components/schemas/RoutingHealthState"
          },
          "manualReason": {
            "nullable": true,
            "type": "string"
          },
          "manualVersion": {
            "format": "int64",
            "type": "integer"
          },
          "manuallySuppressed": {
            "type": "boolean"
          },
          "processorAccountId": {
            "format": "uuid",
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "reason": {
            "$ref": "#/components/schemas/RoutingHealthEvidenceReason",
            "nullable": true
          }
        },
        "required": [
          "automaticVersion",
          "evidence",
          "healthState",
          "manualVersion",
          "manuallySuppressed",
          "processorAccountId",
          "processorPlatform",
          "processorType"
        ],
        "type": "object"
      },
      "RoutingHealthControlAction": {
        "enum": [
          "SUPPRESS",
          "CLEAR",
          "REQUEST_BOUNDED_PROBE"
        ],
        "type": "string"
      },
      "RoutingHealthControlActionRecord": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/RoutingHealthControlAction"
          },
          "actorId": {
            "type": "string"
          },
          "automaticState": {
            "$ref": "#/components/schemas/RoutingHealthState",
            "nullable": true
          },
          "expectedVersion": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "recordedAt": {
            "format": "date-time",
            "type": "string"
          },
          "resultingVersion": {
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "$ref": "#/components/schemas/RoutingHealthControlScope"
          }
        },
        "required": [
          "action",
          "actorId",
          "expectedVersion",
          "id",
          "idempotencyKey",
          "reason",
          "recordedAt",
          "resultingVersion",
          "scope"
        ],
        "type": "object"
      },
      "RoutingHealthControlProxyRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/RoutingHealthControlAction"
          },
          "expectedVersion": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "idempotencyKey": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "action",
          "expectedVersion",
          "idempotencyKey",
          "reason"
        ],
        "type": "object"
      },
      "RoutingHealthControlResult": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/RoutingHealthControlActionRecord"
          },
          "view": {
            "$ref": "#/components/schemas/RoutingHealthControlView"
          }
        },
        "required": [
          "action",
          "view"
        ],
        "type": "object"
      },
      "RoutingHealthControlScope": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RoutingHealthProfileControlScope"
          },
          {
            "$ref": "#/components/schemas/RoutingHealthAccountControlScope"
          },
          {
            "$ref": "#/components/schemas/RoutingHealthPairControlScope"
          }
        ],
        "type": "object"
      },
      "RoutingHealthControlView": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RoutingHealthProfileControlView"
          },
          {
            "$ref": "#/components/schemas/RoutingHealthAccountControlView"
          },
          {
            "$ref": "#/components/schemas/RoutingHealthPairControlView"
          }
        ],
        "type": "object"
      },
      "RoutingHealthEvidenceReason": {
        "enum": [
          "TECHNICAL_FAILURE_RATE",
          "CREDENTIAL_REPAIR_REQUIRED",
          "RISK_LOCKED",
          "HEALTH_UNAVAILABLE"
        ],
        "type": "string"
      },
      "RoutingHealthPairControlScope": {
        "properties": {
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          }
        },
        "required": [
          "processorPlatform",
          "processorType"
        ],
        "type": "object"
      },
      "RoutingHealthPairControlView": {
        "properties": {
          "automaticVersion": {
            "format": "int64",
            "type": "integer"
          },
          "distinctOrganizations": {
            "format": "int32",
            "type": "integer"
          },
          "distinctVerifiedAccounts": {
            "format": "int32",
            "type": "integer"
          },
          "evidenceObservedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "healthState": {
            "$ref": "#/components/schemas/RoutingHealthState"
          },
          "lastTransition": {
            "$ref": "#/components/schemas/RoutingHealthTransition",
            "nullable": true
          },
          "manualReason": {
            "nullable": true,
            "type": "string"
          },
          "manualVersion": {
            "format": "int64",
            "type": "integer"
          },
          "manuallySuppressed": {
            "type": "boolean"
          },
          "nextProbeAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "reason": {
            "$ref": "#/components/schemas/RoutingHealthEvidenceReason",
            "nullable": true
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/RoutingHealthWindowEvidence"
            },
            "type": "array"
          }
        },
        "required": [
          "automaticVersion",
          "distinctOrganizations",
          "distinctVerifiedAccounts",
          "healthState",
          "manualVersion",
          "manuallySuppressed",
          "processorPlatform",
          "processorType",
          "windows"
        ],
        "type": "object"
      },
      "RoutingHealthProfileControlScope": {
        "properties": {
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "organizationId"
        ],
        "type": "object"
      },
      "RoutingHealthProfileControlView": {
        "properties": {
          "automaticVersion": {
            "format": "int64",
            "type": "integer"
          },
          "credentialProfileId": {
            "format": "uuid",
            "type": "string"
          },
          "evidenceObservedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "healthState": {
            "$ref": "#/components/schemas/RoutingHealthState"
          },
          "lastTransition": {
            "$ref": "#/components/schemas/RoutingHealthTransition",
            "nullable": true
          },
          "manualReason": {
            "nullable": true,
            "type": "string"
          },
          "manualVersion": {
            "format": "int64",
            "type": "integer"
          },
          "manuallySuppressed": {
            "type": "boolean"
          },
          "nextProbeAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/RoutingHealthEvidenceReason",
            "nullable": true
          }
        },
        "required": [
          "automaticVersion",
          "credentialProfileId",
          "healthState",
          "manualVersion",
          "manuallySuppressed",
          "organizationId"
        ],
        "type": "object"
      },
      "RoutingHealthScopeEvidence": {
        "properties": {
          "lastTransition": {
            "$ref": "#/components/schemas/RoutingHealthTransition",
            "nullable": true
          },
          "nextProbeAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/RoutingHealthEvidenceReason",
            "nullable": true
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "state": {
            "$ref": "#/components/schemas/RoutingHealthState"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/RoutingHealthWindowEvidence"
            },
            "type": "array"
          }
        },
        "required": [
          "revision",
          "state",
          "windows"
        ],
        "type": "object"
      },
      "RoutingHealthState": {
        "enum": [
          "HEALTHY",
          "WARMING",
          "UNKNOWN",
          "DEGRADED",
          "OPEN",
          "HALF_OPEN",
          "RAMP_25",
          "RAMP_50",
          "CREDENTIAL_REPAIR_REQUIRED"
        ],
        "type": "string"
      },
      "RoutingHealthTransition": {
        "properties": {
          "fromState": {
            "$ref": "#/components/schemas/RoutingHealthState",
            "nullable": true
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/RoutingHealthTransitionReason"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "toState": {
            "$ref": "#/components/schemas/RoutingHealthState"
          }
        },
        "required": [
          "occurredAt",
          "reason",
          "revision",
          "toState"
        ],
        "type": "object"
      },
      "RoutingHealthTransitionReason": {
        "enum": [
          "TECHNICAL_FAILURE_RATE",
          "CREDENTIAL_REPAIR_REQUIRED",
          "CREDENTIAL_REPAIR_RESOLVED",
          "APPROVAL_COLLAPSE",
          "RECOVERY_CONFIDENCE_MET",
          "SEGMENT_RECOVERY_UNPROVEN",
          "RAMP_PROGRESS",
          "FULL_RECOVERY",
          "MANUAL_SUPPRESSION",
          "MANUAL_CLEAR"
        ],
        "type": "string"
      },
      "RoutingHealthWindowEvidence": {
        "properties": {
          "approvals": {
            "format": "int64",
            "type": "integer"
          },
          "definitiveIssuerResponses": {
            "format": "int64",
            "type": "integer"
          },
          "dispatches": {
            "format": "int64",
            "type": "integer"
          },
          "p95UpperBoundMs": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "reliableResponses": {
            "format": "int64",
            "type": "integer"
          },
          "requiredDispatches": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "technicalFailureThresholdBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "technicalOrUnknownOutcomes": {
            "format": "int64",
            "type": "integer"
          },
          "wilsonApprovalLowerBoundBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "wilsonApprovalUpperBoundBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "windowMinutes": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "approvals",
          "definitiveIssuerResponses",
          "dispatches",
          "reliableResponses",
          "technicalOrUnknownOutcomes",
          "windowMinutes"
        ],
        "type": "object"
      },
      "GatewayBatch": {
        "properties": {
          "batchId": {
            "type": "string"
          },
          "batchIdentifiers": {
            "items": {
              "$ref": "#/components/schemas/GatewayBatchIdentifier"
            },
            "type": "array"
          },
          "closedAt": {
            "description": "Authoritative processor close time (ISO 8601), not report import time. Null if unavailable.",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "currencyTotals": {
            "items": {
              "$ref": "#/components/schemas/GatewayBatchCurrencyTotals"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "openedAt": {
            "nullable": true,
            "type": "string"
          },
          "providerEvidence": {
            "items": {
              "$ref": "#/components/schemas/GatewayBatchProviderEvidence"
            },
            "type": "array"
          },
          "reconciledAt": {
            "description": "Time Gateway reconciled the processor report (ISO 8601), separate from processor close time.",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/GatewayBatchStatus"
          },
          "totalAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "batchId",
          "locationId",
          "merchantId",
          "status",
          "transactionCount"
        ],
        "type": "object"
      },
      "GatewayBatchCurrencyTotals": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "totalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "totalAmount",
          "transactionCount"
        ],
        "type": "object"
      },
      "GatewayBatchIdentifier": {
        "properties": {
          "gatewaySettlementBatchId": {
            "type": "string"
          },
          "processorSettlementBatchId": {
            "nullable": true,
            "type": "string"
          },
          "processorSettlementReference": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "gatewaySettlementBatchId"
        ],
        "type": "object"
      },
      "GatewayBatchPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GatewayBatch"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "GatewayBatchProcessorPlatform": {
        "enum": [
          "transit",
          "transit_simulator",
          "sierra",
          "rapid_connect",
          "cardpointe",
          "epg",
          "server_post"
        ],
        "type": "string"
      },
      "GatewayBatchProcessorType": {
        "enum": [
          "tsys",
          "fiserv",
          "elavon",
          "chase",
          "worldpay",
          "heartland",
          "epx"
        ],
        "type": "string"
      },
      "GatewayBatchProvider": {
        "enum": [
          "cardpointe",
          "transit",
          "transit_simulator",
          "epx",
          "elavon_epg"
        ],
        "type": "string"
      },
      "GatewayBatchProviderEvidence": {
        "properties": {
          "processorPlatform": {
            "$ref": "#/components/schemas/GatewayBatchProcessorPlatform",
            "nullable": true
          },
          "processorType": {
            "$ref": "#/components/schemas/GatewayBatchProcessorType",
            "nullable": true
          },
          "provider": {
            "$ref": "#/components/schemas/GatewayBatchProvider"
          },
          "reconciliationId": {
            "nullable": true,
            "type": "string"
          },
          "remoteBatchId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "provider"
        ],
        "type": "object"
      },
      "GatewayBatchStatus": {
        "enum": [
          "settled",
          "review_required",
          "reconciliation_mismatch",
          "force_closed"
        ],
        "type": "string"
      },
      "ManualSettlementCloseRequest": {
        "properties": {
          "cutoffAt": {
            "format": "date-time",
            "type": "string"
          },
          "expectedProcessorAccountKey": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "idempotencyKey": {
            "format": "uuid",
            "type": "string"
          },
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          }
        },
        "required": [
          "cutoffAt",
          "idempotencyKey",
          "locationId"
        ],
        "type": "object"
      },
      "ManualSettlementCloseRequestLookupResponse": {
        "properties": {
          "command": {
            "$ref": "#/components/schemas/ManualSettlementCloseResponse",
            "nullable": true
          },
          "identityProtocolVersion": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "identityProtocolVersion"
        ],
        "type": "object"
      },
      "ManualSettlementCloseResponse": {
        "properties": {
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "cutoffAt": {
            "format": "date-time",
            "type": "string"
          },
          "processorAccountKey": {
            "type": "string"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "responseCode": {
            "nullable": true,
            "type": "string"
          },
          "resultAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ManualSettlementCloseStatus"
          }
        },
        "required": [
          "commandId",
          "cutoffAt",
          "processorAccountKey",
          "processorPlatform",
          "processorType",
          "status"
        ],
        "type": "object"
      },
      "ManualSettlementCloseStatus": {
        "enum": [
          "READY",
          "DISPATCHED",
          "CONFIRMED",
          "UNKNOWN",
          "REJECTED"
        ],
        "type": "string"
      },
      "ProcessorSettlementAmountDirection": {
        "enum": [
          "DEBIT",
          "CREDIT"
        ],
        "type": "string"
      },
      "ProcessorSettlementCloseContext": {
        "properties": {
          "cutoffAt": {
            "format": "date-time",
            "type": "string"
          },
          "processorAccountKey": {
            "type": "string"
          },
          "workOpenedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "cutoffAt",
          "processorAccountKey",
          "workOpenedAt"
        ],
        "type": "object"
      },
      "ProcessorSettlementEvidenceStatus": {
        "enum": [
          "COMPLETE",
          "PENDING",
          "SUCCESS",
          "FAILURE",
          "CONFLICT",
          "UNKNOWN",
          "UNRECOGNIZED"
        ],
        "type": "string"
      },
      "ProcessorSettlementIdentityNamespace": {
        "enum": [
          "PROCESSOR_TXN_ID",
          "PROCESSOR_REFERENCE_ID",
          "TERMINAL_TRANSACTION_ID",
          "UNAVAILABLE"
        ],
        "type": "string"
      },
      "ProcessorSettlementOperation": {
        "enum": [
          "SALE",
          "REFUND",
          "AUTH",
          "CAPTURE",
          "VOID",
          "REVERSAL",
          "ADJUSTMENT",
          "TIP_ADJUSTED",
          "CREDIT",
          "DEBIT",
          "OTHER"
        ],
        "type": "string"
      },
      "ProcessorSettlementReportCompleteness": {
        "enum": [
          "COMPLETE",
          "REVIEW_REQUIRED",
          "PENDING"
        ],
        "type": "string"
      },
      "UnmatchedSettlement": {
        "properties": {
          "batchId": {
            "format": "uuid",
            "type": "string"
          },
          "disposition": {
            "$ref": "#/components/schemas/UnmatchedSettlementDisposition"
          },
          "eligibility": {
            "$ref": "#/components/schemas/UnmatchedSettlementEligibility"
          },
          "evidence": {
            "$ref": "#/components/schemas/UnmatchedSettlementEvidence"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          },
          "processor": {
            "$ref": "#/components/schemas/UnmatchedSettlementProcessor"
          },
          "rowId": {
            "format": "uuid",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/UnmatchedSettlementScope"
          }
        },
        "required": [
          "batchId",
          "disposition",
          "eligibility",
          "evidence",
          "ordinal",
          "processor",
          "rowId",
          "scope"
        ],
        "type": "object"
      },
      "UnmatchedSettlementDisposition": {
        "properties": {
          "disposition": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UnmatchedSettlementEligibility": {
        "properties": {
          "assignmentLocalTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "blockers": {
            "items": {
              "enum": [
                "UNSUPPORTED_OPERATION",
                "EXACT_PARENT_REQUIRED",
                "NO_TARGET",
                "AMBIGUOUS_TARGET",
                "LOCAL_CANDIDATE_PRESENT",
                "ASSIGNMENT_EXISTS",
                "RESOLUTION_EXISTS",
                "CONVERSION_EXISTS",
                "DUPLICATE_REPORT_IDENTITY",
                "REPORT_NOT_FINAL",
                "EVIDENCE_INVALID",
                "ACCOUNT_IDENTITY_MISMATCH",
                "CREDENTIAL_PROFILE_MISMATCH",
                "DEVICE_ROUTE_MISMATCH",
                "CROSS_TENANT_TARGET",
                "PARENT_STATE_INVALID",
                "CURRENCY_MISMATCH",
                "AMOUNT_INVALID",
                "REFUND_LIMIT_EXCEEDED",
                "PLAN_STALE",
                "IDEMPOTENCY_CONFLICT"
              ],
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "conversionLocalTransactionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "convertible": {
            "type": "boolean"
          },
          "localIdentityCandidateIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "markExternal": {
            "type": "boolean"
          },
          "parentCandidates": {
            "items": {
              "$ref": "#/components/schemas/UnmatchedSettlementParent"
            },
            "type": "array"
          },
          "resolutionKind": {
            "nullable": true,
            "type": "string"
          },
          "targetCandidates": {
            "items": {
              "$ref": "#/components/schemas/UnmatchedSettlementTarget"
            },
            "type": "array"
          }
        },
        "required": [
          "blockers",
          "convertible",
          "localIdentityCandidateIds",
          "markExternal",
          "parentCandidates",
          "targetCandidates"
        ],
        "type": "object"
      },
      "UnmatchedSettlementEvidence": {
        "properties": {
          "amountDirection": {
            "$ref": "#/components/schemas/ProcessorSettlementAmountDirection"
          },
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "identityNamespace": {
            "$ref": "#/components/schemas/ProcessorSettlementIdentityNamespace"
          },
          "identityValue": {
            "type": "string"
          },
          "observedAt": {
            "format": "date-time",
            "type": "string"
          },
          "operation": {
            "$ref": "#/components/schemas/ProcessorSettlementOperation"
          },
          "persistedOperation": {
            "type": "string"
          },
          "reportStatus": {
            "$ref": "#/components/schemas/ProcessorSettlementReportCompleteness"
          },
          "rowHash": {
            "type": "string"
          },
          "rowHashVersion": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ProcessorSettlementEvidenceStatus"
          },
          "successful": {
            "type": "boolean"
          }
        },
        "required": [
          "amountDirection",
          "amountMinor",
          "currency",
          "identityNamespace",
          "identityValue",
          "observedAt",
          "operation",
          "persistedOperation",
          "reportStatus",
          "rowHash",
          "rowHashVersion",
          "status",
          "successful"
        ],
        "type": "object"
      },
      "UnmatchedSettlementPage": {
        "properties": {
          "rows": {
            "items": {
              "$ref": "#/components/schemas/UnmatchedSettlement"
            },
            "type": "array"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "rows",
          "totalCount"
        ],
        "type": "object"
      },
      "UnmatchedSettlementParent": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "capturedAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "processedAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processorAccountKey": {
            "type": "string"
          },
          "processorAccountKeyVersion": {
            "format": "int64",
            "type": "integer"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "processorTxnId": {
            "nullable": true,
            "type": "string"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "refundedAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "terminalTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "tipAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "transactionId": {
            "format": "uuid",
            "type": "string"
          },
          "transactionStatus": {
            "type": "string"
          },
          "transactionType": {
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "capturedAmountMinor",
          "currency",
          "locationId",
          "merchantId",
          "organizationId",
          "processorAccountKey",
          "processorAccountKeyVersion",
          "processorPlatform",
          "processorType",
          "refundedAmountMinor",
          "tipAmountMinor",
          "transactionId",
          "transactionStatus",
          "transactionType"
        ],
        "type": "object"
      },
      "UnmatchedSettlementProcessor": {
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "type": {
            "$ref": "#/components/schemas/ProcessorType"
          }
        },
        "required": [
          "platform",
          "type"
        ],
        "type": "object"
      },
      "UnmatchedSettlementScope": {
        "properties": {
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "processorAccountKey": {
            "type": "string"
          },
          "processorAccountKeyVersion": {
            "format": "int64",
            "type": "integer"
          },
          "remoteBatchId": {
            "type": "string"
          },
          "terminalScope": {
            "type": "string"
          }
        },
        "required": [
          "processorAccountKey",
          "processorAccountKeyVersion",
          "remoteBatchId",
          "terminalScope"
        ],
        "type": "object"
      },
      "UnmatchedSettlementTarget": {
        "properties": {
          "gatewayDeviceId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "processorAccountKey": {
            "type": "string"
          },
          "processorAccountKeyVersion": {
            "format": "int64",
            "type": "integer"
          },
          "processorPlatform": {
            "$ref": "#/components/schemas/ProcessorPlatform"
          },
          "processorType": {
            "$ref": "#/components/schemas/ProcessorType"
          },
          "providerTerminalId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "merchantId",
          "organizationId",
          "processorAccountKey",
          "processorAccountKeyVersion",
          "processorPlatform",
          "processorType"
        ],
        "type": "object"
      },
      "CreateSubscriptionScheduleRequest": {
        "properties": {
          "customerId": {
            "type": "string"
          },
          "endBehavior": {
            "$ref": "#/components/schemas/SubscriptionScheduleEndBehavior"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "phases": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionSchedulePhase"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "customerId",
          "phases"
        ],
        "type": "object"
      },
      "PaginatedResponseSubscriptionSchedule": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionSchedule"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "SubscriptionSchedule": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currentPhaseIndex": {
            "format": "int32",
            "type": "integer"
          },
          "customerId": {
            "type": "string"
          },
          "endBehavior": {
            "$ref": "#/components/schemas/SubscriptionScheduleEndBehavior"
          },
          "merchantId": {
            "type": "string"
          },
          "phases": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionSchedulePhaseResponse"
            },
            "type": "array"
          },
          "scheduleId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionScheduleStatus"
          },
          "subscriptionId": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "currentPhaseIndex",
          "customerId",
          "endBehavior",
          "merchantId",
          "phases",
          "scheduleId",
          "status"
        ],
        "type": "object"
      },
      "SubscriptionScheduleEndBehavior": {
        "enum": [
          "RELEASE",
          "CANCEL"
        ],
        "type": "string"
      },
      "SubscriptionSchedulePhase": {
        "properties": {
          "couponId": {
            "nullable": true,
            "type": "string"
          },
          "iterations": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "priceId": {
            "minLength": 1,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "trial": {
            "type": "boolean"
          }
        },
        "required": [
          "priceId"
        ],
        "type": "object"
      },
      "SubscriptionSchedulePhaseResponse": {
        "properties": {
          "couponId": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "endDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "iterations": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "phaseId": {
            "type": "string"
          },
          "phaseIndex": {
            "format": "int32",
            "type": "integer"
          },
          "priceId": {
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "startDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "trial": {
            "type": "boolean"
          }
        },
        "required": [
          "phaseId",
          "phaseIndex",
          "priceId",
          "quantity",
          "trial"
        ],
        "type": "object"
      },
      "SubscriptionScheduleStatus": {
        "enum": [
          "NOT_STARTED",
          "ACTIVE",
          "COMPLETED",
          "CANCELLED"
        ],
        "type": "string"
      },
      "ApplyFinalActionResponse": {
        "properties": {
          "dunningCaseClosed": {
            "type": "boolean"
          },
          "dunningCaseId": {
            "nullable": true,
            "type": "string"
          },
          "finalAction": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "subscriptionStatus": {
            "type": "string"
          }
        },
        "required": [
          "dunningCaseClosed",
          "finalAction",
          "subscriptionId",
          "subscriptionStatus"
        ],
        "type": "object"
      },
      "BillingEvent": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "billedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cycle": {
            "format": "int32",
            "type": "integer"
          },
          "failureReason": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "nextRetryAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "retryCount": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "cycle",
          "id",
          "retryCount",
          "status",
          "subscriptionId"
        ],
        "type": "object"
      },
      "CancelSubscriptionRequest": {
        "properties": {
          "cancelAt": {
            "$ref": "#/components/schemas/SubscriptionCancelAt"
          },
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "cancelAt",
          "reason"
        ],
        "type": "object"
      },
      "CreateSubscriptionItemRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "priceId": {
            "minLength": 1,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "priceId"
        ],
        "type": "object"
      },
      "CreateSubscriptionRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "customerCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "minLength": 1,
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "interval": {
            "$ref": "#/components/schemas/SubscriptionInterval"
          },
          "intervalCount": {
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreateSubscriptionItemRequest"
            },
            "type": "array"
          },
          "locationId": {
            "minLength": 1,
            "type": "string"
          },
          "maxCycles": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "planName": {
            "minLength": 1,
            "type": "string"
          },
          "purchaseOrder": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "savedPaymentMethodId": {
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "trialPeriodDays": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "currency",
          "customerId",
          "interval",
          "locationId",
          "planName",
          "startDate"
        ],
        "type": "object"
      },
      "PaginatedResponseBillingEvent": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BillingEvent"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PaginatedResponseSubscription": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Subscription"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "offset": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "PauseSubscriptionRequest": {
        "properties": {
          "resumeDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PlanDeactivationAction": {
        "enum": [
          "PAUSE_INDEFINITELY",
          "CANCEL_AT_END_OF_CYCLE",
          "CANCEL_IMMEDIATELY"
        ],
        "type": "string"
      },
      "PlanDeactivationRequest": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PlanDeactivationAction"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      },
      "PlanMigrationRequest": {
        "properties": {
          "prorationBehavior": {
            "$ref": "#/components/schemas/ProrationBehavior"
          },
          "targetPriceId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "prorationBehavior",
          "targetPriceId"
        ],
        "type": "object"
      },
      "PlanOperationFailure": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "reason",
          "subscriptionId"
        ],
        "type": "object"
      },
      "ProrationBehavior": {
        "enum": [
          "CREATE_PRORATIONS",
          "NONE"
        ],
        "type": "string"
      },
      "SubscriptionBillingLineItem": {
        "properties": {
          "commodityCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "description",
          "quantity",
          "unitAmount"
        ],
        "type": "object"
      },
      "SubscriptionBillingResult": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approved": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionBillingLineItem"
            },
            "type": "array"
          },
          "merchantId": {
            "type": "string"
          },
          "responseMessage": {
            "nullable": true,
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "approved",
          "currency",
          "customerId",
          "lineItems",
          "merchantId",
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionCancelAt": {
        "enum": [
          "IMMEDIATELY",
          "END_OF_CYCLE"
        ],
        "type": "string"
      },
      "SubscriptionPlanBulkResult": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PlanDeactivationAction",
            "nullable": true
          },
          "affectedCount": {
            "format": "int32",
            "type": "integer"
          },
          "affectedSubscriptionIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "failures": {
            "items": {
              "$ref": "#/components/schemas/PlanOperationFailure"
            },
            "type": "array"
          },
          "operation": {
            "$ref": "#/components/schemas/SubscriptionPlanOperation"
          },
          "sourcePriceId": {
            "type": "string"
          },
          "targetPriceId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "operation",
          "sourcePriceId"
        ],
        "type": "object"
      },
      "SubscriptionPlanOperation": {
        "enum": [
          "DEACTIVATE",
          "MIGRATE"
        ],
        "type": "string"
      },
      "TriggerSubscriptionBillingRequest": {
        "properties": {
          "expectedAttempt": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "expectedCycle": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "expectedAttempt",
          "expectedCycle"
        ],
        "type": "object"
      },
      "UpdateSubscriptionRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "customerCode": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "maxCycles": {
            "format": "int32",
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "planName": {
            "nullable": true,
            "type": "string"
          },
          "prorationBehavior": {
            "$ref": "#/components/schemas/ProrationBehavior",
            "nullable": true
          },
          "purchaseOrder": {
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "savedPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CreateTaxConfigRequest": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "appliesToCategory": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "jurisdictionCode": {
            "minLength": 1,
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "minLength": 1,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "rateAmountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateBps": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateType": {
            "minLength": 1,
            "type": "string"
          },
          "taxBasis": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "effectiveFrom",
          "jurisdictionCode",
          "jurisdictionType"
        ],
        "type": "object"
      },
      "EffectiveTaxSettingsResponse": {
        "properties": {
          "provider": {
            "type": "string"
          },
          "taxEnabled": {
            "type": "boolean"
          },
          "taxInclusive": {
            "type": "boolean"
          }
        },
        "required": [
          "provider",
          "taxEnabled",
          "taxInclusive"
        ],
        "type": "object"
      },
      "JurisdictionTaxResult": {
        "properties": {
          "jurisdictionCode": {
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "type": "string"
          },
          "rateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "sourceConfigId": {
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "jurisdictionCode",
          "jurisdictionType",
          "sourceConfigId",
          "taxAmount"
        ],
        "type": "object"
      },
      "LocationTaxSettings": {
        "properties": {
          "effective": {
            "$ref": "#/components/schemas/EffectiveTaxSettingsResponse"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "override": {
            "$ref": "#/components/schemas/LocationTaxSettingsOverrideResponse"
          }
        },
        "required": [
          "effective",
          "locationId",
          "organizationId",
          "override"
        ],
        "type": "object"
      },
      "LocationTaxSettingsOverrideResponse": {
        "properties": {
          "taxEnabled": {
            "nullable": true,
            "type": "boolean"
          },
          "taxInclusive": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "OrganizationTaxSettings": {
        "properties": {
          "fromAddress": {
            "$ref": "#/components/schemas/TaxSettingsAddress",
            "nullable": true
          },
          "organizationId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "taxEnabled": {
            "type": "boolean"
          },
          "taxInclusive": {
            "type": "boolean"
          }
        },
        "required": [
          "organizationId",
          "provider",
          "taxEnabled",
          "taxInclusive"
        ],
        "type": "object"
      },
      "TaxCalculationAddressRequest": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "line1": {
            "nullable": true,
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TaxCalculationLineItem": {
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "categoryCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "id": {
            "minLength": 1,
            "type": "string"
          },
          "taxable": {
            "type": "boolean"
          }
        },
        "required": [
          "amount",
          "description",
          "id"
        ],
        "type": "object"
      },
      "TaxCalculationRequest": {
        "properties": {
          "currency": {
            "description": "ISO 4217 currency; when omitted, uses the requested location's default, or the organization's configured default location's currency when no location is supplied. The currency must be supported by that active, organization-owned location.",
            "nullable": true,
            "pattern": "[A-Za-z]{3}",
            "type": "string"
          },
          "customerAddress": {
            "$ref": "#/components/schemas/TaxCalculationAddressRequest",
            "nullable": true
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/TaxCalculationLineItem"
            },
            "type": "array"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "minLength": 1,
            "type": "string"
          },
          "taxConfigSnapshot": {
            "items": {
              "$ref": "#/components/schemas/TaxConfigRow"
            },
            "nullable": true,
            "type": "array"
          },
          "transactionTimestamp": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "lineItems",
          "organizationId"
        ],
        "type": "object"
      },
      "TaxCalculationResult": {
        "properties": {
          "jurisdictionBreakdown": {
            "items": {
              "$ref": "#/components/schemas/JurisdictionTaxResult"
            },
            "type": "array"
          },
          "lineItemTaxes": {
            "items": {
              "$ref": "#/components/schemas/TaxLineItemResult"
            },
            "type": "array"
          },
          "totalTax": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "lineItemTaxes",
          "totalTax"
        ],
        "type": "object"
      },
      "TaxConfigRow": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "appliesToCategory": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "type": "string"
          },
          "effectiveTo": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "jurisdictionCode": {
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "rateAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "rateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "rateType": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "scopeId": {
            "type": "string"
          },
          "taxBasis": {
            "type": "string"
          }
        },
        "required": [
          "active",
          "effectiveFrom",
          "id",
          "jurisdictionCode",
          "jurisdictionType",
          "priority",
          "rateType",
          "scope",
          "scopeId",
          "taxBasis"
        ],
        "type": "object"
      },
      "TaxConfigValidationResponse": {
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/TaxConfigValidationWarning"
            },
            "type": "array"
          }
        },
        "required": [
          "valid",
          "warnings"
        ],
        "type": "object"
      },
      "TaxConfigValidationWarning": {
        "properties": {
          "code": {
            "type": "string"
          },
          "conflictingConfigIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "TaxLineItemResult": {
        "properties": {
          "effectiveRateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "lineItemId": {
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "lineItemId",
          "taxAmount"
        ],
        "type": "object"
      },
      "TaxSettingsAddress": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "line1": {
            "nullable": true,
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "country"
        ],
        "type": "object"
      },
      "UpdateLocationTaxSettingsRequest": {
        "properties": {
          "taxEnabled": {
            "nullable": true,
            "type": "boolean"
          },
          "taxInclusive": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UpdateOrganizationTaxSettingsRequest": {
        "properties": {
          "fromAddress": {
            "$ref": "#/components/schemas/TaxSettingsAddress",
            "nullable": true
          },
          "provider": {
            "type": "string"
          },
          "taxEnabled": {
            "type": "boolean"
          },
          "taxInclusive": {
            "type": "boolean"
          }
        },
        "required": [
          "fromAddress",
          "provider",
          "taxEnabled",
          "taxInclusive"
        ],
        "type": "object"
      },
      "UpdateTaxConfigRequest": {
        "properties": {
          "active": {
            "nullable": true,
            "type": "boolean"
          },
          "appliesToCategory": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "jurisdictionCode": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "rateAmountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateBps": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateType": {
            "nullable": true,
            "type": "string"
          },
          "taxBasis": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidateTaxConfigRequest": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "appliesToCategory": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionCode": {
            "minLength": 1,
            "type": "string"
          },
          "jurisdictionName": {
            "nullable": true,
            "type": "string"
          },
          "jurisdictionType": {
            "minLength": 1,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "rateAmountMinor": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateBps": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "rateType": {
            "minLength": 1,
            "type": "string"
          },
          "scope": {
            "minLength": 1,
            "type": "string"
          },
          "scopeId": {
            "minLength": 1,
            "type": "string"
          },
          "taxBasis": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "effectiveFrom",
          "jurisdictionCode",
          "jurisdictionType",
          "scope",
          "scopeId"
        ],
        "type": "object"
      },
      "TransactionExportAccessResponse": {
        "properties": {
          "allowed": {
            "type": "boolean"
          }
        },
        "required": [
          "allowed"
        ],
        "type": "object"
      },
      "TransactionExportRequest": {
        "properties": {
          "approvalCode": {
            "maxLength": 20,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "cardBin": {
            "nullable": true,
            "pattern": "^[0-9]{6,8}$",
            "type": "string"
          },
          "cardBrands": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 0,
            "type": "array"
          },
          "cardLast4": {
            "nullable": true,
            "pattern": "^[0-9]{4}$",
            "type": "string"
          },
          "columns": {
            "items": {
              "type": "string"
            },
            "maxItems": 64,
            "minItems": 0,
            "type": "array"
          },
          "entryModes": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 0,
            "type": "array"
          },
          "format": {
            "minLength": 1,
            "type": "string"
          },
          "from": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "includeFollowOns": {
            "type": "boolean"
          },
          "maxAmount": {
            "nullable": true,
            "type": "number"
          },
          "minAmount": {
            "nullable": true,
            "type": "number"
          },
          "processorTypes": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 0,
            "type": "array"
          },
          "scopeId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "scopeType": {
            "minLength": 1,
            "type": "string"
          },
          "search": {
            "maxLength": 128,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "statuses": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 0,
            "type": "array"
          },
          "to": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "types": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 0,
            "type": "array"
          }
        },
        "required": [
          "scopeId",
          "scopeType"
        ],
        "type": "object"
      },
      "CaptureRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "receiptEmail": {
            "nullable": true,
            "type": "string"
          },
          "receiptPhone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardTransactionAchAccountType": {
        "enum": [
          "CHECKING",
          "SAVINGS"
        ],
        "type": "string"
      },
      "CardTransactionAchEntryCode": {
        "enum": [
          "CCD",
          "PPD",
          "TEL",
          "WEB"
        ],
        "type": "string"
      },
      "CardTransactionBilling": {
        "properties": {
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardTransactionCardData": {
        "properties": {
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "cardholderName": {
            "nullable": true,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "hostedCard": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardTransactionRequest": {
        "properties": {
          "acceptorCustomerServicePhoneNumber": {
            "nullable": true,
            "type": "string"
          },
          "acceptorPhoneNumber": {
            "nullable": true,
            "type": "string"
          },
          "acceptorStreetAddress": {
            "nullable": true,
            "type": "string"
          },
          "acceptorURLAddress": {
            "nullable": true,
            "type": "string"
          },
          "achAccountType": {
            "$ref": "#/components/schemas/CardTransactionAchAccountType",
            "nullable": true
          },
          "achDescription": {
            "description": "Optional ACH entry description; at most 10 alphanumeric characters or spaces.",
            "maxLength": 10,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "achEntryCode": {
            "$ref": "#/components/schemas/CardTransactionAchEntryCode",
            "nullable": true
          },
          "achFirstName": {
            "description": "EPX ACH first name. Required for non-CCD SEC codes.",
            "nullable": true,
            "type": "string"
          },
          "achInvoiceNumber": {
            "description": "ACH sale only. Transaction invoice number. 1-25 printable ASCII characters.",
            "maxLength": 25,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "achLastName": {
            "description": "EPX ACH last name. Required for non-CCD SEC codes.",
            "nullable": true,
            "type": "string"
          },
          "achReceiverName": {
            "description": "EPX ACH receiver name. Required for CCD SEC code.",
            "nullable": true,
            "type": "string"
          },
          "achRoutingNumber": {
            "description": "ACH ABA routing number. Required with achAccountType and must contain exactly 9 digits.",
            "maxLength": 9,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "additionalTaxDetails": {
            "description": "Standalone tax details for a card-not-present sale whose tax is not represented by itemized lines. Availability depends on the selected payment route; if the selected route does not support these details, the sale is rejected before payment submission. Each detail's taxAmount is in minor currency units, and amounts must sum to the top-level taxAmount. taxRate is a percentage from 0 to 100 with at most two decimals (for example, 6.25 means 6.25%). Do not combine with lineItems or level3.",
            "items": {
              "$ref": "#/components/schemas/AdditionalTaxDetail"
            },
            "type": "array"
          },
          "amount": {
            "description": "Transaction amount in minor currency units, tip included.",
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "type": "integer"
          },
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "authTimestamp": {
            "nullable": true,
            "type": "string"
          },
          "authorizationIndicator": {
            "nullable": true,
            "type": "string"
          },
          "autoTokenize": {
            "type": "boolean"
          },
          "avsAddress": {
            "nullable": true,
            "type": "string"
          },
          "avsZipCode": {
            "nullable": true,
            "type": "string"
          },
          "billing": {
            "$ref": "#/components/schemas/CardTransactionBilling",
            "nullable": true
          },
          "billingAddress": {
            "nullable": true,
            "type": "string"
          },
          "billingStreet": {
            "nullable": true,
            "type": "string"
          },
          "billingType": {
            "nullable": true,
            "type": "string"
          },
          "billingZip": {
            "nullable": true,
            "type": "string"
          },
          "cardData": {
            "$ref": "#/components/schemas/CardTransactionCardData",
            "nullable": true
          },
          "cardDataSource": {
            "$ref": "#/components/schemas/CardDataSource",
            "nullable": true
          },
          "cardHolderName": {
            "nullable": true,
            "type": "string"
          },
          "cardNumber": {
            "nullable": true,
            "type": "string"
          },
          "cardOnFile": {
            "nullable": true,
            "type": "string"
          },
          "cardOnFileTransactionIdentifier": {
            "nullable": true,
            "type": "string"
          },
          "cardholderName": {
            "nullable": true,
            "type": "string"
          },
          "citStatusIndicator": {
            "nullable": true,
            "type": "string"
          },
          "credentialConsentSource": {
            "nullable": true,
            "type": "string"
          },
          "credentialConsentVersion": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "description": "Three-letter ISO 4217 currency code; omit to use the merchant's default currency. The current ACH contract is USD-only for adapters that advertise achSale.",
            "nullable": true,
            "type": "string"
          },
          "currentPaymentCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "customerCode": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "description": "Optional customer identifier associated with the payment.",
            "nullable": true,
            "type": "string"
          },
          "customerVATNumber": {
            "nullable": true,
            "type": "string"
          },
          "cvv": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "destinationCountryCode": {
            "nullable": true,
            "type": "string"
          },
          "dutyCharges": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "expirationDate": {
            "nullable": true,
            "type": "string"
          },
          "expirationMonth": {
            "nullable": true,
            "type": "string"
          },
          "expirationYear": {
            "nullable": true,
            "type": "string"
          },
          "expiryMonth": {
            "nullable": true,
            "type": "string"
          },
          "expiryYear": {
            "nullable": true,
            "type": "string"
          },
          "industryType": {
            "$ref": "#/components/schemas/TransactionIndustryType",
            "nullable": true
          },
          "isRecurring": {
            "nullable": true,
            "type": "boolean"
          },
          "lastRegisteredChangeDate": {
            "nullable": true,
            "type": "string"
          },
          "level2": {
            "$ref": "#/components/schemas/Level2Data",
            "nullable": true
          },
          "level3": {
            "$ref": "#/components/schemas/Level3Data",
            "nullable": true
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/SaleLineItem"
            },
            "nullable": true,
            "type": "array"
          },
          "locationId": {
            "description": "Location identifier selected by the authorized caller.",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "description": "Optional string metadata attached to the transaction.",
              "type": "string"
            },
            "description": "Optional string metadata attached to the transaction.",
            "type": "object"
          },
          "mitStatusIndicator": {
            "nullable": true,
            "type": "string"
          },
          "orderDate": {
            "nullable": true,
            "type": "string"
          },
          "originalApprovedAmountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "originalRecurringAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "partialAuthSupport": {
            "nullable": true,
            "type": "boolean"
          },
          "paymentCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "purchaseOrder": {
            "nullable": true,
            "type": "string"
          },
          "quoteId": {
            "description": "Required for virtual-terminal routes: immutable server quote bound to this payment identity.",
            "maxLength": 64,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "receiptEmail": {
            "nullable": true,
            "type": "string"
          },
          "receiptPhone": {
            "nullable": true,
            "type": "string"
          },
          "recurringType": {
            "nullable": true,
            "type": "string"
          },
          "registeredUserIndicator": {
            "nullable": true,
            "type": "string"
          },
          "savedPaymentMethodId": {
            "nullable": true,
            "type": "string"
          },
          "serviceLocationCity": {
            "nullable": true,
            "type": "string"
          },
          "serviceLocationCountryCode": {
            "nullable": true,
            "type": "string"
          },
          "serviceLocationCountrySubdivision": {
            "nullable": true,
            "type": "string"
          },
          "serviceLocationGeoCoordinates": {
            "nullable": true,
            "type": "string"
          },
          "serviceLocationPostalCode": {
            "nullable": true,
            "type": "string"
          },
          "shipFromZip": {
            "nullable": true,
            "type": "string"
          },
          "shipToZip": {
            "nullable": true,
            "type": "string"
          },
          "shippingCharges": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "skipDuplicateCheck": {
            "nullable": true,
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/CardTransactionSource",
            "nullable": true
          },
          "storedCredentialReason": {
            "$ref": "#/components/schemas/StoredCredentialReason",
            "nullable": true
          },
          "summaryCommodityCode": {
            "nullable": true,
            "type": "string"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "tipAmount": {
            "description": "Optional tip in minor currency units, ALREADY INCLUDED in amount and never added to it. Omit or send 0 for no tip; must not exceed amount.",
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "vatInvoice": {
            "nullable": true,
            "type": "string"
          },
          "zip": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardTransactionSource": {
        "enum": [
          "CARD_PRESENT",
          "CARD_NOT_PRESENT",
          "ACH"
        ],
        "type": "string"
      },
      "ChargeInstallmentRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "attempt": {
            "description": "1 for the initial dispatch; later attempts require the previous attempt's definitive decline. Duplicate attempts inquire, never debit again.",
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          },
          "authorizationVersion": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "attempt",
          "authorizationVersion",
          "currency"
        ],
        "type": "object"
      },
      "CreateInstallmentPlanRequest": {
        "properties": {
          "authorization": {
            "$ref": "#/components/schemas/InstallmentPlanAuthorization"
          },
          "currency": {
            "description": "Explicit ISO 4217 currency shared by all stages; never inferred from a future location default.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "customerId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "installmentCount": {
            "format": "int32",
            "maximum": 999,
            "minimum": 2,
            "type": "integer"
          },
          "locationId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "organizationId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "originalTotalMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "planId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "savedPaymentMethodId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/InstallmentStageIntent"
            },
            "maxItems": 999,
            "minItems": 2,
            "type": "array"
          }
        },
        "required": [
          "authorization",
          "currency",
          "customerId",
          "installmentCount",
          "locationId",
          "organizationId",
          "originalTotalMinor",
          "planId",
          "savedPaymentMethodId",
          "stages"
        ],
        "type": "object"
      },
      "DisputeEvidenceCardRead": {
        "properties": {
          "cardPresent": {
            "type": "boolean"
          },
          "cvm": {
            "nullable": true,
            "type": "string"
          },
          "emv": {
            "$ref": "#/components/schemas/DisputeEvidenceEmv",
            "nullable": true
          },
          "entryMode": {
            "$ref": "#/components/schemas/DisputeEvidenceEntryMode",
            "nullable": true
          },
          "pinDebit": {
            "type": "boolean"
          }
        },
        "required": [
          "cardPresent"
        ],
        "type": "object"
      },
      "DisputeEvidenceEmv": {
        "properties": {
          "applicationId": {
            "nullable": true,
            "type": "string"
          },
          "applicationLabel": {
            "nullable": true,
            "type": "string"
          },
          "terminalVerificationResults": {
            "nullable": true,
            "type": "string"
          },
          "transactionStatusInformation": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DisputeEvidenceEntryMode": {
        "enum": [
          "MANUAL",
          "SWIPE",
          "FALLBACK_SWIPE",
          "EMV",
          "CONTACTLESS",
          "TOKEN",
          "INTERNET",
          "PHONE",
          "MAIL",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "DisputeEvidencePacket": {
        "properties": {
          "acquirerReferenceNumbers": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "cardRead": {
            "$ref": "#/components/schemas/DisputeEvidenceCardRead"
          },
          "gaps": {
            "items": {
              "enum": [
                "NOT_CARD_PRESENT",
                "NO_CARD_READ_EVIDENCE",
                "EMV_APPLICATION_ID_MISSING",
                "EMV_VERIFICATION_RESULTS_MISSING",
                "CVM_NOT_REPORTED",
                "RECEIPT_MISSING",
                "RECEIPT_WITHHELD_SENSITIVE_DATA",
                "RECEIPT_WITHHELD_TOO_LARGE"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "receipt": {
            "$ref": "#/components/schemas/DisputeEvidenceReceipt",
            "nullable": true
          },
          "transaction": {
            "$ref": "#/components/schemas/DisputeEvidenceTransaction"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "cardRead",
          "locationId",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "DisputeEvidenceReceipt": {
        "properties": {
          "customerReceipt": {
            "nullable": true,
            "type": "string"
          },
          "merchantReceipt": {
            "nullable": true,
            "type": "string"
          },
          "omittedReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DisputeEvidenceTransaction": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "nullable": true,
            "type": "string"
          },
          "authorizedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "processedAmountMinor": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "processorTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/DisputeEvidenceTransactionSource"
          },
          "status": {
            "$ref": "#/components/schemas/DisputeEvidenceTransactionStatus"
          },
          "surchargeAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "tipAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/DisputeEvidenceTransactionType"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "source",
          "status",
          "type"
        ],
        "type": "object"
      },
      "DisputeEvidenceTransactionSource": {
        "enum": [
          "GATEWAY",
          "ONLINE",
          "SEMI_INTEGRATED",
          "CARD_PRESENT",
          "CARD_NOT_PRESENT",
          "RECURRING",
          "ACH",
          "PROCESSOR_SETTLEMENT_RECOVERY",
          "BOLT",
          "NEARPAY",
          "MPOC",
          "APPLE_TTP",
          "ECPI",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "DisputeEvidenceTransactionStatus": {
        "enum": [
          "PENDING",
          "PENDING_CONFIRMATION",
          "EXPIRED_UNCONFIRMED",
          "FRAUD_BLOCKED",
          "FRAUD_HELD",
          "APPROVED",
          "DECLINED",
          "CANCELLED",
          "ERROR",
          "VOIDED",
          "CAPTURED",
          "TIP_ADJUSTED",
          "ENRICHED",
          "SETTLED",
          "REFUNDED",
          "REVERSED",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "DisputeEvidenceTransactionType": {
        "enum": [
          "SALE",
          "AUTH",
          "CAPTURE",
          "VOID",
          "REFUND",
          "REVERSAL",
          "ADJUSTMENT",
          "TIP_ADJUSTMENT",
          "RECURRING",
          "FORCE_AUTH",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "EnrichmentRequest": {
        "properties": {
          "cardBrand": {
            "$ref": "#/components/schemas/CardBrand",
            "nullable": true
          },
          "level2": {
            "$ref": "#/components/schemas/Level2Data",
            "nullable": true
          },
          "level3": {
            "$ref": "#/components/schemas/Level3Data",
            "nullable": true
          }
        },
        "type": "object"
      },
      "IncrementAuthRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "amount"
        ],
        "type": "object"
      },
      "InstallmentAttemptResponse": {
        "properties": {
          "attempt": {
            "format": "int32",
            "type": "integer"
          },
          "chargedAmountMinor": {
            "description": "Exact charged amount only for definitive approval; 0 for definitive decline, null for unknown.",
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": "string"
          },
          "installmentId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "outcome": {
            "description": "APPROVED or DECLINED only after an exact same-operation durable transaction observation; otherwise UNKNOWN, including a missing inquiry result.",
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "requestedAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "savedPaymentMethodId": {
            "type": "string"
          },
          "sequence": {
            "format": "int32",
            "type": "integer"
          },
          "tender": {
            "description": "Authoritative instrument kind. Finite installment MITs currently support CARD only.",
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/Transaction",
            "nullable": true
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "attempt",
          "currency",
          "customerId",
          "externalReferenceId",
          "installmentId",
          "locationId",
          "organizationId",
          "outcome",
          "planId",
          "requestedAmountMinor",
          "savedPaymentMethodId",
          "sequence",
          "tender"
        ],
        "type": "object"
      },
      "InstallmentPlanAuthorization": {
        "properties": {
          "accepted": {
            "description": "Merchant attestation of the customer's explicit authorization of these exact finite terms, not merely consent to save a card.",
            "type": "boolean"
          },
          "authorizedAt": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "customerActor": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "policyVersion": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "proofReference": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "accepted",
          "authorizedAt",
          "customerActor",
          "policyVersion",
          "proofReference"
        ],
        "type": "object"
      },
      "InstallmentPlanResponse": {
        "properties": {
          "authorizationVersion": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "installmentCount": {
            "format": "int32",
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "originalTotalMinor": {
            "format": "int64",
            "type": "integer"
          },
          "planId": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "savedPaymentMethodId": {
            "type": "string"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/InstallmentStageResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "authorizationVersion",
          "currency",
          "customerId",
          "installmentCount",
          "locationId",
          "organizationId",
          "originalTotalMinor",
          "planId",
          "revoked",
          "savedPaymentMethodId",
          "stages"
        ],
        "type": "object"
      },
      "InstallmentStageIntent": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "dueAt": {
            "description": "Agreed UTC due instant in ISO 8601 format; no charge is admitted before it.",
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "installmentId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "sequence": {
            "description": "One-based immutable sequence within the authorized finite plan.",
            "format": "int32",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "amountMinor",
          "dueAt",
          "installmentId",
          "sequence"
        ],
        "type": "object"
      },
      "InstallmentStageResponse": {
        "properties": {
          "agreedAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "dueAt": {
            "type": "string"
          },
          "installmentId": {
            "type": "string"
          },
          "latestAttempt": {
            "format": "int32",
            "type": "integer"
          },
          "outcome": {
            "type": "string"
          },
          "remainingAmountMinor": {
            "format": "int64",
            "type": "integer"
          },
          "sequence": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "agreedAmountMinor",
          "dueAt",
          "installmentId",
          "latestAttempt",
          "outcome",
          "remainingAmountMinor",
          "sequence"
        ],
        "type": "object"
      },
      "RecordInstallmentPaymentRequest": {
        "properties": {
          "amountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          },
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "paymentReference": {
            "description": "Stable identity of a definitive external/early invoice payment. Pending or unknown payments must not be submitted.",
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "amountMinor",
          "currency",
          "paymentReference"
        ],
        "type": "object"
      },
      "RefundRequest": {
        "properties": {
          "amount": {
            "exclusiveMinimum": true,
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "type": "integer"
          },
          "externalReferenceId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "receiptEmail": {
            "nullable": true,
            "type": "string"
          },
          "receiptPhone": {
            "nullable": true,
            "type": "string"
          },
          "refundedTipAmount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "externalReferenceId"
        ],
        "type": "object"
      },
      "TipAdjustRequest": {
        "properties": {
          "tipAmount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "tipAmount"
        ],
        "type": "object"
      },
      "TotalAdjustRequest": {
        "properties": {
          "level2": {
            "$ref": "#/components/schemas/Level2Data",
            "nullable": true
          },
          "tipAmount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "totalAmount"
        ],
        "type": "object"
      },
      "TransactionCountResponse": {
        "properties": {
          "count": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "type": "object"
      },
      "TransactionCustomerLinkRequest": {
        "properties": {
          "customerId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "mutationId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "mutationId"
        ],
        "type": "object"
      },
      "TransactionRefund": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "externalReferenceId": {
            "nullable": true,
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "parentTransactionId",
          "transactionId"
        ],
        "type": "object"
      },
      "VirtualTerminalCatalogIntent": {
        "properties": {
          "priceId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "quantity": {
            "format": "int64",
            "maximum": 9999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "priceId",
          "quantity"
        ],
        "type": "object"
      },
      "VirtualTerminalQuote": {
        "properties": {
          "authorizedTaxOverride": {
            "$ref": "#/components/schemas/VirtualTerminalTaxOverride",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "exclusiveTaxMinor": {
            "format": "int64",
            "type": "integer"
          },
          "inclusive": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/VirtualTerminalQuoteLine"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "quoteId": {
            "type": "string"
          },
          "subtotalMinor": {
            "format": "int64",
            "type": "integer"
          },
          "taxMinor": {
            "format": "int64",
            "type": "integer"
          },
          "taxRateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "taxed": {
            "type": "boolean"
          },
          "tipMinor": {
            "format": "int64",
            "type": "integer"
          },
          "totalMinor": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "exclusiveTaxMinor",
          "inclusive",
          "lines",
          "locationId",
          "quoteId",
          "subtotalMinor",
          "taxMinor",
          "taxed",
          "tipMinor",
          "totalMinor"
        ],
        "type": "object"
      },
      "VirtualTerminalQuoteLine": {
        "properties": {
          "description": {
            "type": "string"
          },
          "displayAmount": {
            "format": "int64",
            "type": "integer"
          },
          "inclusive": {
            "type": "boolean"
          },
          "priceId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantity": {
            "format": "int64",
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "type": "integer"
          },
          "taxRateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitCost": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "description",
          "displayAmount",
          "inclusive",
          "priceId",
          "productId",
          "quantity",
          "taxAmount",
          "totalAmount",
          "unitCost"
        ],
        "type": "object"
      },
      "VirtualTerminalQuoteRequest": {
        "properties": {
          "authorizedTaxOverride": {
            "$ref": "#/components/schemas/VirtualTerminalTaxOverride",
            "nullable": true
          },
          "catalogItems": {
            "items": {
              "$ref": "#/components/schemas/VirtualTerminalCatalogIntent"
            },
            "maxItems": 100,
            "minItems": 0,
            "type": "array"
          },
          "currency": {
            "type": "string"
          },
          "locationId": {
            "maxLength": 128,
            "minLength": 0,
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "manualAmountMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "tipMinor": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "locationId"
        ],
        "type": "object"
      },
      "VirtualTerminalTaxOverride": {
        "properties": {
          "inclusive": {
            "nullable": true,
            "type": "boolean"
          },
          "rateBps": {
            "format": "int32",
            "maximum": 10000.0,
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "rateBps",
          "reason"
        ],
        "type": "object"
      },
      "VoidReason": {
        "enum": [
          "CUSTOMER_CANCELLED",
          "POST_AUTH_USER_DECLINE",
          "SYSTEM_COMPENSATION"
        ],
        "type": "string"
      },
      "VoidRequest": {
        "properties": {
          "amount": {
            "format": "int64",
            "maximum": 99999999,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "authorizationOnly": {
            "type": "boolean"
          },
          "externalReferenceId": {
            "maxLength": 64,
            "minLength": 0,
            "pattern": "^(?:\\s*|[A-Za-z0-9_.:-]+)$",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "voidReason": {
            "$ref": "#/components/schemas/VoidReason",
            "nullable": true
          }
        },
        "required": [
          "externalReferenceId"
        ],
        "type": "object"
      },
      "AchLifecycleEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "effectiveAt": {
            "type": "string"
          },
          "effectiveTimePrecision": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "lifecycleState": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "outcomeEventId": {
            "type": "string"
          },
          "outcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "returnCode": {
            "nullable": true,
            "type": "string"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "nullable": true,
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "effectiveAt",
          "effectiveTimePrecision",
          "event",
          "lifecycleState",
          "locationId",
          "merchantId",
          "organizationId",
          "outcomeEventId",
          "outcomeVersion",
          "selectedTender",
          "settlementFinal",
          "transactionId"
        ],
        "type": "object"
      },
      "AgentRateCardTransitionEventPayload": {
        "properties": {
          "mutation": {
            "type": "string"
          },
          "rateCardGroupId": {
            "nullable": true,
            "type": "string"
          },
          "rateCardVersionId": {
            "nullable": true,
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "mutation",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "AgentRateCardUpdatedEventPayload": {
        "properties": {
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "AppAuthorizationEventPayload": {
        "properties": {
          "appId": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          }
        },
        "required": [
          "appId",
          "subjectId",
          "subjectType"
        ],
        "type": "object"
      },
      "BatchSettledEventPayload": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "processorPlatform": {
            "type": "string"
          },
          "processorSettlementBatchId": {
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "remoteBatchId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "transactionCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "processorPlatform",
          "processorSettlementBatchId",
          "processorType",
          "status",
          "transactionCount"
        ],
        "type": "object"
      },
      "CardPresentPaymentEventPayload": {
        "properties": {
          "context": {
            "additionalProperties": true,
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "customerReceipt": {
            "type": "string"
          },
          "entryMode": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/WebhookCardPresentLineItem"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "merchantReceipt": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "paymentType": {
            "type": "string"
          },
          "processorReferenceId": {
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "serialNumber": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "terminalId": {
            "type": "string"
          },
          "terminalTransactionId": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookCardPresentTransaction"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "status",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "CardPresentSyncAdjustmentEventPayload": {
        "properties": {
          "parentTransactionId": {
            "type": "string"
          },
          "processorReferenceId": {
            "type": "string"
          },
          "source": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "terminalId": {
            "type": "string"
          },
          "terminalTransactionId": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookCardPresentAdjustmentTransaction"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "parentTransactionId",
          "processorReferenceId",
          "status",
          "terminalId",
          "terminalTransactionId",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "CheckoutCompletedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "event",
          "organizationId",
          "sessionId",
          "status",
          "transactionChannel",
          "transactionId"
        ],
        "type": "object"
      },
      "CheckoutExpiredEventPayload": {
        "properties": {
          "event": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "required": [
          "event",
          "organizationId",
          "sessionId"
        ],
        "type": "object"
      },
      "CheckoutFollowOnFailedEventPayload": {
        "properties": {
          "error": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "taskType": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "sessionId",
          "taskType"
        ],
        "type": "object"
      },
      "CheckoutFollowOnReviewRequiredEventPayload": {
        "properties": {
          "error": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "originalCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "originalTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "reviewStatus": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "taskType": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "reviewStatus",
          "sessionId",
          "taskType"
        ],
        "type": "object"
      },
      "CheckoutPaymentCompletedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "completedAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "completedAt",
          "currency",
          "event",
          "organizationId",
          "sessionId",
          "status",
          "transactionChannel",
          "transactionId"
        ],
        "type": "object"
      },
      "CheckoutPaymentDeclinedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "correlationId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "declineCategory": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "fraudScore": {
            "format": "double",
            "type": "number"
          },
          "message": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "sessionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "terminalReason": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "event",
          "organizationId",
          "sessionId",
          "status"
        ],
        "type": "object"
      },
      "CheckoutRecoveredCompletedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "event",
          "organizationId",
          "sessionId",
          "status",
          "transactionChannel",
          "transactionId"
        ],
        "type": "object"
      },
      "CheckoutRecoveredPaymentCompletedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "completedAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "completedAt",
          "currency",
          "event",
          "organizationId",
          "sessionId",
          "status",
          "transactionChannel",
          "transactionId"
        ],
        "type": "object"
      },
      "CouponEventPayload": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "amountOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "duration": {
            "type": "string"
          },
          "durationInMonths": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "percentOff": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "stackable": {
            "type": "boolean"
          },
          "timesRedeemed": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "currency",
          "duration",
          "id",
          "merchantId",
          "metadata",
          "name",
          "organizationId",
          "stackable",
          "timesRedeemed"
        ],
        "type": "object"
      },
      "CreateEventSubscriptionRequest": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "locationIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "organizationIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/EventSubscriptionScope",
            "nullable": true
          },
          "url": {
            "minLength": 1,
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "events",
          "url"
        ],
        "type": "object"
      },
      "CreateMerchantEventSubscriptionRequest": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "url": {
            "minLength": 1,
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "events",
          "url"
        ],
        "type": "object"
      },
      "CredentialProfileCreatedEventPayload": {
        "properties": {
          "credentialProfileId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "organizationId"
        ],
        "type": "object"
      },
      "CredentialProfileDeletedEventPayload": {
        "properties": {
          "credentialProfileId": {
            "type": "string"
          },
          "operationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "organizationId"
        ],
        "type": "object"
      },
      "CreditNoteCreatedEventPayload": {
        "properties": {
          "creditAmount": {
            "format": "int64",
            "type": "integer"
          },
          "creditNoteId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/WebhookCreditNoteLineItem"
            },
            "type": "array"
          },
          "number": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "outOfBandAmount": {
            "format": "int64",
            "type": "integer"
          },
          "paymentId": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "refundAmount": {
            "format": "int64",
            "type": "integer"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "creditAmount",
          "creditNoteId",
          "currency",
          "customerId",
          "lineItems",
          "organizationId",
          "outOfBandAmount",
          "paymentId",
          "refundAmount",
          "status",
          "total"
        ],
        "type": "object"
      },
      "CreditNoteVoidedEventPayload": {
        "properties": {
          "creditNoteId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "voidedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "creditNoteId",
          "organizationId",
          "paymentId",
          "status"
        ],
        "type": "object"
      },
      "CustomerEventPayload": {
        "properties": {
          "archivedAt": {
            "nullable": true,
            "type": "string"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/WebhookCustomerBillingAddress",
            "nullable": true
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "externalRef": {
            "nullable": true,
            "type": "string"
          },
          "externalRefSource": {
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "mergedIntoId": {
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "locationId",
          "merchantId",
          "syncVersion"
        ],
        "type": "object"
      },
      "CustomerIdentityMergedEventPayload": {
        "properties": {
          "customerId": {
            "type": "string"
          },
          "identityId": {
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sourceIdentityId": {
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "identityId",
          "merchantId",
          "organizationId",
          "sourceIdentityId"
        ],
        "type": "object"
      },
      "CustomerMergedEventPayload": {
        "properties": {
          "customerId": {
            "type": "string"
          },
          "identityId": {
            "nullable": true,
            "type": "string"
          },
          "identityMerged": {
            "type": "boolean"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sourceCustomerId": {
            "type": "string"
          },
          "sourceIdentityId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "identityMerged",
          "merchantId",
          "organizationId",
          "sourceCustomerId"
        ],
        "type": "object"
      },
      "DunningCaseEventPayload": {
        "properties": {
          "amount_at_risk": {
            "format": "int64",
            "type": "integer"
          },
          "case_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "decline_category": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merchant_id": {
            "type": "string"
          },
          "organization_id": {
            "nullable": true,
            "type": "string"
          },
          "recovery_method": {
            "nullable": true,
            "type": "string"
          },
          "retry_count": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          }
        },
        "required": [
          "amount_at_risk",
          "case_id",
          "currency",
          "customer_id",
          "id",
          "merchant_id",
          "retry_count",
          "status",
          "subscription_id"
        ],
        "type": "object"
      },
      "EventSubscription": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "locationIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "organizationIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/EventSubscriptionScope"
          },
          "scopeMode": {
            "$ref": "#/components/schemas/EventSubscriptionScopeMode"
          },
          "status": {
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "events",
          "id",
          "locationIds",
          "organizationIds",
          "scope",
          "scopeMode",
          "status",
          "webhookUrl"
        ],
        "type": "object"
      },
      "EventSubscriptionScope": {
        "enum": [
          "ORGANIZATION",
          "LOCATION",
          "AGENT"
        ],
        "type": "string"
      },
      "EventSubscriptionScopeMode": {
        "enum": [
          "SPECIFIC_ORGANIZATIONS",
          "SPECIFIC_LOCATIONS"
        ],
        "type": "string"
      },
      "EventSubscriptionTestDeliveryResult": {
        "properties": {
          "deliveryId": {
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "responseBodyExcerpt": {
            "nullable": true,
            "type": "string"
          },
          "responseHeaders": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "deliveryId",
          "eventId",
          "eventType",
          "responseHeaders",
          "status",
          "success"
        ],
        "type": "object"
      },
      "FraudDecisionEventPayload": {
        "properties": {
          "decisionId": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "engineVersion": {
            "nullable": true,
            "type": "string"
          },
          "matchedRuleIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "paymentReference": {
            "type": "string"
          },
          "policyVersion": {
            "nullable": true,
            "type": "string"
          },
          "reasonCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "decisionId",
          "disposition",
          "matchedRuleIds",
          "paymentReference",
          "reasonCodes"
        ],
        "type": "object"
      },
      "GiftCardAdjustedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "type": "integer"
          },
          "giftCardId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "amountCents",
          "balanceAfterCents",
          "giftCardId",
          "organizationId",
          "reason"
        ],
        "type": "object"
      },
      "GiftCardBalanceLowEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "currentBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "thresholdCents": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "currentBalanceCents",
          "giftCardId",
          "organizationId",
          "thresholdCents"
        ],
        "type": "object"
      },
      "GiftCardExpiredEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "balanceAtExpiryCents": {
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "nullable": true,
            "type": "string"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "balanceAtExpiryCents",
          "giftCardId",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCardIssuedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "expiresAt": {
            "nullable": true,
            "type": "string"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "initialBalanceCents": {
            "format": "int64",
            "type": "integer"
          },
          "issuedAtLocationId": {
            "nullable": true,
            "type": "string"
          },
          "issuedToCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "currency",
          "giftCardId",
          "initialBalanceCents",
          "last4",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCardRedeemedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "type": "integer"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "amountCents",
          "balanceAfterCents",
          "giftCardId",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCardRefundedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "type": "integer"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "amountCents",
          "balanceAfterCents",
          "giftCardId",
          "organizationId"
        ],
        "type": "object"
      },
      "GiftCardReloadedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "amountCents": {
            "format": "int64",
            "type": "integer"
          },
          "balanceAfterCents": {
            "format": "int64",
            "type": "integer"
          },
          "fundingTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "giftCardId": {
            "type": "string"
          },
          "giftCardTransactionId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "previousBalanceCents": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "amountCents",
          "balanceAfterCents",
          "giftCardId",
          "organizationId",
          "previousBalanceCents"
        ],
        "type": "object"
      },
      "GiftCardRevokedEventPayload": {
        "properties": {
          "actorId": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "balanceAtRevocationCents": {
            "format": "int64",
            "type": "integer"
          },
          "giftCardId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "actorType",
          "balanceAtRevocationCents",
          "giftCardId",
          "organizationId",
          "reason"
        ],
        "type": "object"
      },
      "LocationDeletedEventPayload": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "operationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "merchantId",
          "organizationId"
        ],
        "type": "object"
      },
      "LocationUpdatedEventPayload": {
        "properties": {
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "merchantId",
          "organizationId"
        ],
        "type": "object"
      },
      "MerchantAgentAttributedEventPayload": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "agentId",
          "organizationId"
        ],
        "type": "object"
      },
      "MerchantEventSubscription": {
        "properties": {
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          }
        },
        "required": [
          "events",
          "id",
          "status",
          "webhookUrl"
        ],
        "type": "object"
      },
      "OrganizationDeletedEventPayload": {
        "properties": {
          "operationId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "PaymentMethodAttentionRequiredEventPayload": {
        "properties": {
          "credentialProfileId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "savedPaymentMethodId": {
            "type": "string"
          }
        },
        "required": [
          "credentialProfileId",
          "organizationId",
          "outcome",
          "provider",
          "savedPaymentMethodId"
        ],
        "type": "object"
      },
      "PaymentMethodEventPayload": {
        "properties": {
          "cardBrand": {
            "nullable": true,
            "type": "string"
          },
          "cardExpMonth": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "cardExpYear": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "cardLast4": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "methodType": {
            "type": "string"
          },
          "savedPaymentMethodId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "isDefault",
          "methodType",
          "savedPaymentMethodId",
          "status",
          "updatedAt"
        ],
        "type": "object"
      },
      "PaymentSettledEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "effectiveAt": {
            "type": "string"
          },
          "effectiveTimePrecision": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "lifecycleState": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "outcomeEventId": {
            "type": "string"
          },
          "outcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "selectedTender": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "totalAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          },
          "transactionIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "currency",
          "totalAmount",
          "transactionIds"
        ],
        "type": "object"
      },
      "PriceEventPayload": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "billingInterval": {
            "nullable": true,
            "type": "string"
          },
          "commodityCode": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "intervalCount": {
            "format": "int32",
            "type": "integer"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "taxBehavior": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "currency",
          "id",
          "intervalCount",
          "merchantId",
          "metadata",
          "organizationId",
          "productId",
          "taxBehavior",
          "type",
          "unitAmount"
        ],
        "type": "object"
      },
      "ProcessingPaymentCompletedEventPayload": {
        "properties": {
          "context": {
            "additionalProperties": true,
            "type": "object"
          },
          "entryMode": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/WebhookProcessingLineItem"
            },
            "type": "array"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "processorReferenceId": {
            "type": "string"
          },
          "processorType": {
            "type": "string"
          },
          "selectedTender": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookProcessingTransaction"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "context",
          "lineItems",
          "locationId",
          "merchantId",
          "processorType",
          "source",
          "status",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "ProcessingPaymentRefundedEventPayload": {
        "properties": {
          "compensationEvidence": {
            "$ref": "#/components/schemas/WebhookCompensationEvidence",
            "nullable": true
          },
          "locationId": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookProcessingRefundTransaction"
          },
          "transactionChannel": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "parentTransactionId",
          "status",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "ProcessingPaymentVoidedEventPayload": {
        "properties": {
          "compensationEvidence": {
            "$ref": "#/components/schemas/WebhookCompensationEvidence",
            "nullable": true
          },
          "locationId": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookProcessingVoidTransaction"
          },
          "transactionChannel": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "parentTransactionId",
          "status",
          "transaction",
          "transactionId"
        ],
        "type": "object"
      },
      "ProductCategoryEventPayload": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "categoryId": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "parentId": {
            "nullable": true,
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "categoryId",
          "name",
          "organizationId",
          "syncVersion"
        ],
        "type": "object"
      },
      "ProductEventPayload": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "categoryId": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "defaultPriceId": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "itemKind": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "mutationId": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "syncVersion": {
            "format": "int64",
            "type": "integer"
          },
          "taxRateBps": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "active",
          "itemKind",
          "locationId",
          "merchantId",
          "metadata",
          "name",
          "organizationId",
          "productId",
          "syncVersion"
        ],
        "type": "object"
      },
      "PromotionCodeEventPayload": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "couponId": {
            "type": "string"
          },
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "maxRedemptions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "timesRedeemed": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "active",
          "code",
          "couponId",
          "id",
          "merchantId",
          "metadata",
          "organizationId",
          "timesRedeemed"
        ],
        "type": "object"
      },
      "ReplayDeliverySummary": {
        "properties": {
          "deliveryId": {
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "deliveryId",
          "status",
          "subscriptionId"
        ],
        "type": "object"
      },
      "ReplayWebhookEventRequest": {
        "properties": {
          "subscriptionIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReplayWebhookEventResponse": {
        "properties": {
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/ReplayDeliverySummary"
            },
            "type": "array"
          },
          "eventId": {
            "type": "string"
          }
        },
        "required": [
          "deliveries",
          "eventId"
        ],
        "type": "object"
      },
      "ReportExportCompletedEventPayload": {
        "properties": {
          "format": {
            "type": "string"
          },
          "jobId": {
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "reportType": {
            "type": "string"
          },
          "resultLocation": {
            "type": "string"
          }
        },
        "required": [
          "format",
          "jobId",
          "organizationId",
          "reportType",
          "resultLocation"
        ],
        "type": "object"
      },
      "ReserveLedgerEventPayload": {
        "properties": {
          "amount_minor": {
            "format": "int64",
            "type": "integer"
          },
          "balance_after_minor": {
            "format": "int64",
            "type": "integer"
          },
          "credential_profile_id": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "entry_type": {
            "type": "string"
          },
          "ledger_entry_id": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "reserve_projection_batch_id": {
            "nullable": true,
            "type": "string"
          },
          "source_batch_id": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount_minor",
          "balance_after_minor",
          "currency",
          "entry_type",
          "ledger_entry_id",
          "organization_id"
        ],
        "type": "object"
      },
      "RiskAlertEventPayload": {
        "properties": {
          "alert_id": {
            "type": "string"
          },
          "alert_type": {
            "type": "string"
          },
          "credential_profile_id": {
            "nullable": true,
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "alert_id",
          "alert_type",
          "organization_id",
          "severity",
          "status"
        ],
        "type": "object"
      },
      "SelfServiceConfigurationUpdatedEventPayload": {
        "properties": {
          "category": {
            "type": "string"
          },
          "changed": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "paymentMethods": {
            "$ref": "#/components/schemas/WebhookPaymentMethodSettings"
          },
          "webhookRetry": {
            "$ref": "#/components/schemas/WebhookRetrySettings"
          }
        },
        "required": [
          "category",
          "changed",
          "merchantId",
          "organizationId",
          "paymentMethods",
          "webhookRetry"
        ],
        "type": "object"
      },
      "SetupIntentEventPayload": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "cancellation_reason": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "nullable": true,
            "type": "string"
          },
          "customer_id": {
            "nullable": true,
            "type": "string"
          },
          "expires_at": {
            "nullable": true,
            "type": "string"
          },
          "failed_at": {
            "nullable": true,
            "type": "string"
          },
          "failure_reason": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_setup_error": {
            "$ref": "#/components/schemas/WebhookSetupIntentLastError",
            "nullable": true
          },
          "location_id": {
            "nullable": true,
            "type": "string"
          },
          "max_attempts": {
            "format": "int32",
            "type": "integer"
          },
          "merchant_id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "next_action": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "organization_id": {
            "type": "string"
          },
          "payment_method_id": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "succeeded_at": {
            "nullable": true,
            "type": "string"
          },
          "updated_at": {
            "nullable": true,
            "type": "string"
          },
          "usage_type": {
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "id",
          "max_attempts",
          "merchant_id",
          "metadata",
          "organization_id",
          "status",
          "usage_type"
        ],
        "type": "object"
      },
      "StoreAuthorizedEventPayload": {
        "properties": {
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "lifecycleVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "oauthClientId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "source"
        ],
        "type": "object"
      },
      "StoreRevokedEventPayload": {
        "properties": {
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "lifecycleVersion": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "oauthClientId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "source"
        ],
        "type": "object"
      },
      "SubscriptionBilledEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          },
          "transactionId": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionCompletedEventPayload": {
        "properties": {
          "cyclesBilled": {
            "format": "int32",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "cyclesBilled",
          "reason",
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionCreatedEventPayload": {
        "properties": {
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionItemEventPayload": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/WebhookSubscriptionItem"
          },
          "organizationId": {
            "type": "string"
          },
          "proration": {
            "$ref": "#/components/schemas/WebhookSubscriptionItemProration"
          },
          "prorationChargeMessage": {
            "nullable": true,
            "type": "string"
          },
          "prorationChargeStatus": {
            "type": "string"
          },
          "subscriptionAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "item",
          "organizationId",
          "proration",
          "prorationChargeStatus",
          "subscriptionAmount"
        ],
        "type": "object"
      },
      "SubscriptionItemUnavailableEventPayload": {
        "properties": {
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "SubscriptionPaymentFailedEventPayload": {
        "properties": {
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionStatusEventPayload": {
        "properties": {
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "subscriptionId"
        ],
        "type": "object"
      },
      "SubscriptionTrialEventPayload": {
        "properties": {
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookSubscriptionTrialItem"
            },
            "type": "array"
          },
          "merchant_id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "next_billing_date": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          },
          "trial_end": {
            "nullable": true,
            "type": "string"
          },
          "trial_period_days": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "trial_start": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "customer_id",
          "id",
          "items",
          "merchant_id",
          "metadata",
          "next_billing_date",
          "organization_id",
          "status",
          "subscription_id"
        ],
        "type": "object"
      },
      "TapToPayPaymentCompletedEventPayload": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "type": "string"
          },
          "cardBrand": {
            "type": "string"
          },
          "cardLast4": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "entryMode": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "processedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "processorType": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "currency",
          "deviceId",
          "entryMode",
          "locationId",
          "merchantId",
          "processedAmount",
          "processorType",
          "source",
          "status",
          "transactionId"
        ],
        "type": "object"
      },
      "TransactionCustomerLinkUpdatedEventPayload": {
        "properties": {
          "customerId": {
            "nullable": true,
            "type": "string"
          },
          "linkVersion": {
            "format": "int64",
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "mutationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "previousCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          }
        },
        "required": [
          "linkVersion",
          "locationId",
          "mutationId",
          "organizationId",
          "transactionId"
        ],
        "type": "object"
      },
      "UpdateEventSubscriptionRequest": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "locationIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "organizationIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/EventSubscriptionScope",
            "nullable": true
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "url": {
            "nullable": true,
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateMerchantEventSubscriptionRequest": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "url": {
            "nullable": true,
            "type": "string"
          },
          "webhookSecret": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpsertWebhookRequest": {
        "properties": {
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "signingSecret": {
            "maxLength": 64,
            "minLength": 64,
            "nullable": true,
            "pattern": "[a-f0-9]{64}",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "VolumeLimitSoftLimitReachedEventPayload": {
        "properties": {
          "agentId": {
            "nullable": true,
            "type": "string"
          },
          "approvedMinor": {
            "format": "int64",
            "type": "integer"
          },
          "credentialProfileId": {
            "type": "string"
          },
          "credentialProfileName": {
            "type": "string"
          },
          "crossedAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "hardLimitMinor": {
            "format": "int64",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "periodEnd": {
            "type": "string"
          },
          "periodStart": {
            "type": "string"
          },
          "softLimitMinor": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "approvedMinor",
          "credentialProfileId",
          "credentialProfileName",
          "crossedAt",
          "currency",
          "hardLimitMinor",
          "organizationId",
          "periodEnd",
          "periodStart",
          "softLimitMinor"
        ],
        "type": "object"
      },
      "WebhookCardPresentAdjustmentTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "gatewayCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "currency",
          "merchantId",
          "parentTransactionId",
          "status",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "WebhookCardPresentLineItem": {
        "properties": {
          "discountAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "totalAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unitPrice": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WebhookCardPresentTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "type": "string"
          },
          "cardBrand": {
            "type": "string"
          },
          "cardLast4": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "gatewayCustomerId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "processedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "responseCode": {
            "type": "string"
          },
          "responseMessage": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "surchargeAmount": {
            "format": "int64",
            "type": "integer"
          },
          "tipAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "currency",
          "status",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "WebhookCompensationEvidence": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "originalTransactionId": {
            "type": "string"
          },
          "refundedTipAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "currency",
          "locationId",
          "merchantId",
          "operationId",
          "organizationId",
          "originalTransactionId"
        ],
        "type": "object"
      },
      "WebhookCreditNoteLineItem": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "externalLineItemId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "description",
          "id",
          "quantity",
          "type",
          "unitAmount"
        ],
        "type": "object"
      },
      "WebhookCustomerBillingAddress": {
        "properties": {
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "company": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "nullable": true,
            "type": "string"
          },
          "lastName": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookDefinition": {
        "properties": {
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "lastDeliveryAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "events",
          "id",
          "merchantId",
          "status",
          "url"
        ],
        "type": "object"
      },
      "WebhookDelivery": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deliveredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "createdAt",
          "eventType",
          "id",
          "merchantId",
          "status",
          "webhookUrl"
        ],
        "type": "object"
      },
      "WebhookDeliveryEnvelope": {
        "description": "Fields every webhook delivery carries next to the event payload. The body is signed as sent; unknown keys must be ignored.",
        "properties": {
          "eventId": {
            "description": "Persisted event ID; stable across redeliveries and replays.",
            "type": "string"
          },
          "eventType": {
            "description": "Event type wire name, e.g. payment.completed.",
            "type": "string"
          },
          "locationId": {
            "description": "Owning location, when the event is location-scoped.",
            "type": "string"
          },
          "merchantId": {
            "description": "Owning merchant, when the event is merchant-scoped.",
            "type": "string"
          },
          "organizationId": {
            "description": "Owning organization.",
            "type": "string"
          },
          "sourceReference": {
            "description": "ID of the originating record in the source service.",
            "type": "string"
          },
          "sourceService": {
            "description": "Gateway service that recorded the event.",
            "type": "string"
          },
          "timestamp": {
            "description": "When the event was recorded (ISO-8601 instant).",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "eventType",
          "timestamp"
        ],
        "type": "object"
      },
      "WebhookEndpointDeletedDetails": {
        "properties": {
          "action": {
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "action",
          "events"
        ],
        "type": "object"
      },
      "WebhookEndpointDeletedEventPayload": {
        "properties": {
          "category": {
            "type": "string"
          },
          "details": {
            "$ref": "#/components/schemas/WebhookEndpointDeletedDetails"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "category",
          "details",
          "locationId",
          "merchantId",
          "organizationId"
        ],
        "type": "object"
      },
      "WebhookEndpointSavedDetails": {
        "properties": {
          "action": {
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "previousUrl": {
            "nullable": true,
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "events",
          "url"
        ],
        "type": "object"
      },
      "WebhookEndpointSavedEventPayload": {
        "properties": {
          "category": {
            "type": "string"
          },
          "details": {
            "$ref": "#/components/schemas/WebhookEndpointSavedDetails"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "category",
          "details",
          "locationId",
          "merchantId",
          "organizationId"
        ],
        "type": "object"
      },
      "WebhookEventDelivery": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "deliveredAt": {
            "nullable": true,
            "type": "string"
          },
          "dlqAt": {
            "nullable": true,
            "type": "string"
          },
          "eventId": {
            "nullable": true,
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "lastError": {
            "nullable": true,
            "type": "string"
          },
          "lastResponseHeaders": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "nextRetryAt": {
            "nullable": true,
            "type": "string"
          },
          "platformOwned": {
            "nullable": true,
            "type": "boolean"
          },
          "replayOfDeliveryId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "createdAt",
          "eventType",
          "id",
          "status",
          "subscriptionId"
        ],
        "type": "object"
      },
      "WebhookEventDeliverySummary": {
        "properties": {
          "attention": {
            "format": "int32",
            "type": "integer"
          },
          "delivered": {
            "format": "int32",
            "type": "integer"
          },
          "dlqPending": {
            "format": "int32",
            "type": "integer"
          },
          "exhausted": {
            "format": "int32",
            "type": "integer"
          },
          "failed": {
            "format": "int32",
            "type": "integer"
          },
          "merchantDeliveryCount": {
            "format": "int32",
            "type": "integer"
          },
          "platformDeliveryCount": {
            "format": "int32",
            "type": "integer"
          },
          "retrying": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          },
          "unknownDeliveryCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "attention",
          "delivered",
          "dlqPending",
          "exhausted",
          "failed",
          "merchantDeliveryCount",
          "platformDeliveryCount",
          "retrying",
          "total",
          "unknownDeliveryCount"
        ],
        "type": "object"
      },
      "WebhookEventListPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventRecord"
            },
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "total": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "WebhookEventRecord": {
        "properties": {
          "apiVersion": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deliverySummary": {
            "$ref": "#/components/schemas/WebhookEventDeliverySummary"
          },
          "eventType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object"
          },
          "retentionExpiresAt": {
            "type": "string"
          },
          "sourceReference": {
            "nullable": true,
            "type": "string"
          },
          "sourceService": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "apiVersion",
          "createdAt",
          "deliverySummary",
          "eventType",
          "id",
          "organizationId",
          "payload",
          "retentionExpiresAt"
        ],
        "type": "object"
      },
      "WebhookEventRetentionConfig": {
        "properties": {
          "deliveryDays": {
            "format": "int32",
            "type": "integer"
          },
          "eventDays": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "type": "string"
          },
          "updatedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "deliveryDays",
          "eventDays",
          "organizationId"
        ],
        "type": "object"
      },
      "WebhookEventRetentionConfigRequest": {
        "properties": {
          "deliveryDays": {
            "format": "int32",
            "maximum": 365,
            "minimum": 1,
            "type": "integer"
          },
          "eventDays": {
            "format": "int32",
            "maximum": 365,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "deliveryDays",
          "eventDays"
        ],
        "type": "object"
      },
      "WebhookPaymentMethodSettings": {
        "properties": {
          "ach": {
            "type": "boolean"
          },
          "applePay": {
            "type": "boolean"
          },
          "card": {
            "type": "boolean"
          },
          "googlePay": {
            "type": "boolean"
          }
        },
        "required": [
          "ach",
          "applePay",
          "card",
          "googlePay"
        ],
        "type": "object"
      },
      "WebhookProcessingLineItem": {
        "properties": {
          "commodityCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "discountAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "nullable": true,
            "type": "string"
          },
          "imageUrl": {
            "nullable": true,
            "type": "string"
          },
          "lineTotal": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "productCode": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "taxAmount": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "unitOfMeasure": {
            "nullable": true,
            "type": "string"
          },
          "unitPrice": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WebhookProcessingRefundTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "gatewayCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "transactionChannel": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "locationId",
          "merchantId",
          "parentTransactionId",
          "status",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "WebhookProcessingTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "approvalCode": {
            "type": "string"
          },
          "capturedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "cardBrand": {
            "type": "string"
          },
          "cardLast4": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "detailsAvailability": {
            "type": "string"
          },
          "gatewayCustomerId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "paymentLifecycleState": {
            "type": "string"
          },
          "paymentOutcomeEffectiveAt": {
            "type": "string"
          },
          "paymentOutcomeTimePrecision": {
            "type": "string"
          },
          "paymentOutcomeVersion": {
            "format": "int64",
            "type": "integer"
          },
          "processedAmount": {
            "format": "int64",
            "type": "integer"
          },
          "responseCode": {
            "type": "string"
          },
          "responseMessage": {
            "type": "string"
          },
          "selectedTender": {
            "type": "string"
          },
          "settlementFinal": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "surchargeAmount": {
            "format": "int64",
            "type": "integer"
          },
          "tipAmount": {
            "format": "int64",
            "type": "integer"
          },
          "transactionChannel": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "locationId",
          "merchantId",
          "metadata",
          "status",
          "surchargeAmount",
          "tipAmount",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "WebhookProcessingVoidTransaction": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "gatewayCustomerId": {
            "nullable": true,
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "parentTransactionId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "transactionChannel": {
            "nullable": true,
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "locationId",
          "merchantId",
          "parentTransactionId",
          "status",
          "transactionId",
          "type"
        ],
        "type": "object"
      },
      "WebhookRetryResult": {
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "deliveredAt": {
            "nullable": true,
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "eventType",
          "id",
          "merchantId",
          "status"
        ],
        "type": "object"
      },
      "WebhookRetrySettings": {
        "properties": {
          "backoffMinutes": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "maxAttempts": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "backoffMinutes",
          "maxAttempts"
        ],
        "type": "object"
      },
      "WebhookSetupIntentLastError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "WebhookSubscriptionItem": {
        "properties": {
          "createdAt": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "priceId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "subscriptionId": {
            "type": "string"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "metadata",
          "priceId",
          "productId",
          "quantity",
          "subscriptionId",
          "unitAmount"
        ],
        "type": "object"
      },
      "WebhookSubscriptionItemProration": {
        "properties": {
          "currentPeriodEnd": {
            "type": "string"
          },
          "currentPeriodStart": {
            "type": "string"
          },
          "daysInCycle": {
            "format": "int32",
            "type": "integer"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "itemId": {
            "nullable": true,
            "type": "string"
          },
          "priceId": {
            "nullable": true,
            "type": "string"
          },
          "productId": {
            "nullable": true,
            "type": "string"
          },
          "prorationAmount": {
            "format": "int64",
            "type": "integer"
          },
          "quantityDelta": {
            "format": "int32",
            "type": "integer"
          },
          "resultingQuantity": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "unitAmount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currentPeriodEnd",
          "currentPeriodStart",
          "daysInCycle",
          "daysRemaining",
          "prorationAmount",
          "quantityDelta",
          "unitAmount"
        ],
        "type": "object"
      },
      "WebhookSubscriptionTrialItem": {
        "properties": {
          "id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "id",
          "metadata"
        ],
        "type": "object"
      },
      "WebhookTestResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "message",
          "ok"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyHeaderAuth": {
        "in": "header",
        "name": "X-Api-Key",
        "type": "apiKey"
      },
      "ClientBasicAuth": {
        "scheme": "basic",
        "type": "http"
      },
      "CheckoutSessionTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Session-Token",
        "description": "Checkout session token bound to this checkout session and merchant"
      },
      "ClientSecretAuth": {
        "in": "header",
        "name": "X-Setup-Intent-Client-Secret",
        "type": "apiKey"
      },
      "RecoverySessionTokenAuth": {
        "in": "header",
        "name": "X-Session-Token",
        "type": "apiKey"
      },
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.peakgateway.co/auth/oauth2/token",
            "scopes": {
              "agent-rates:read": "agent-rates:read",
              "agent-rates:write": "agent-rates:write",
              "agents:read": "agents:read",
              "agents:write": "agents:write",
              "api-keys:read": "api-keys:read",
              "api-keys:write": "api-keys:write",
              "billing:read": "billing:read",
              "billing:write": "billing:write",
              "card-intelligence:read": "card-intelligence:read",
              "coupons:read": "coupons:read",
              "coupons:write": "coupons:write",
              "credential-profiles:read": "credential-profiles:read",
              "credential-profiles:write": "credential-profiles:write",
              "customer-contacts:read": "customer-contacts:read",
              "customer-contacts:write": "customer-contacts:write",
              "customer-oauth-clients:read": "customer-oauth-clients:read",
              "customers:read": "customers:read",
              "customers:write": "customers:write",
              "dashboard:read": "dashboard:read",
              "devices:read": "devices:read",
              "devices:write": "devices:write",
              "event-subscriptions:read": "event-subscriptions:read",
              "event-subscriptions:write": "event-subscriptions:write",
              "external-capabilities:read": "external-capabilities:read",
              "fraud-audit:read": "fraud-audit:read",
              "fraud-decisions:read": "fraud-decisions:read",
              "fraud-lists:read": "fraud-lists:read",
              "fraud-lists:write": "fraud-lists:write",
              "fraud-reviews:decide": "fraud-reviews:decide",
              "fraud-reviews:read": "fraud-reviews:read",
              "fraud-rules:read": "fraud-rules:read",
              "fraud-rules:write": "fraud-rules:write",
              "gift_cards:read": "gift_cards:read",
              "gift_cards:write": "gift_cards:write",
              "hosted-payments:read": "hosted-payments:read",
              "hosted-payments:write": "hosted-payments:write",
              "impersonation:write": "impersonation:write",
              "mcp:dunning": "mcp:dunning",
              "mcp:read": "mcp:read",
              "mcp:refund": "mcp:refund",
              "mcp:write": "mcp:write",
              "merchant-audit:read": "merchant-audit:read",
              "merchant:activate": "merchant:activate",
              "merchants:read": "merchants:read",
              "merchants:write": "merchants:write",
              "mid-utilization:read": "mid-utilization:read",
              "mid-utilization:write": "mid-utilization:write",
              "organizations:delete": "organizations:delete",
              "organizations:read": "organizations:read",
              "organizations:write": "organizations:write",
              "prices:read": "prices:read",
              "prices:write": "prices:write",
              "products:read": "products:read",
              "products:write": "products:write",
              "promo-codes:read": "promo-codes:read",
              "promo-codes:write": "promo-codes:write",
              "recovery:write": "recovery:write",
              "reports:export": "reports:export",
              "reports:read": "reports:read",
              "reserves:read": "reserves:read",
              "reserves:write": "reserves:write",
              "routing-rules:read": "routing-rules:read",
              "routing-rules:write": "routing-rules:write",
              "settlements:close": "settlements:close",
              "subscriptions:read": "subscriptions:read",
              "subscriptions:write": "subscriptions:write",
              "tax-config:write": "tax-config:write",
              "transactions:read": "transactions:read",
              "transactions:write": "transactions:write",
              "transit:password:read": "transit:password:read",
              "users:read": "users:read",
              "users:write": "users:write",
              "webhooks:manage": "webhooks:manage",
              "webhooks:read": "webhooks:read",
              "webhooks:write": "webhooks:write"
            }
          }
        }
      },
      "UserSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "Access token of a signed-in Peak Gateway dashboard user; not available to API keys or client credentials"
      },
      "CustomerSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "Customer-tenant Firebase ID token; requires App Check and is not an integration OAuth or dashboard user token"
      },
      "FirebaseAppCheck": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Firebase-AppCheck",
        "description": "Firebase App Check proof accompanying the customer Firebase ID token"
      },
      "CheckoutAccountCredential": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Checkout-Account-Credential",
        "description": "Short-lived customer account handoff credential; requires its bound checkout session token"
      }
    }
  },
  "webhooks": {
    "agent.rate_card.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AgentRateCardTransitionEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/AgentRateCardUpdatedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "agent.rate_card.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "app_authorization.granted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/AppAuthorizationEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "app_authorization.granted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "app_authorization.revoked": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/AppAuthorizationEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "app_authorization.revoked",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "batch.settled": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/BatchSettledEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "batch.settled",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "checkout.completed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutCompletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "checkout.completed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "checkout.expired": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutExpiredEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "checkout.expired",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "checkout.followon_failed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CheckoutFollowOnFailedEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/CheckoutFollowOnReviewRequiredEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "checkout.followon_failed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "coupon.archived": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CouponEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "coupon.archived",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "coupon.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CouponEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "coupon.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "credential_profile.approved": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CredentialProfileCreatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "credential_profile.approved",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "credential_profile.deleted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CredentialProfileDeletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "credential_profile.deleted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "credential_profile.staged": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CredentialProfileCreatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "credential_profile.staged",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "credit_note.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CreditNoteCreatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "credit_note.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "credit_note.voided": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CreditNoteVoidedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "credit_note.voided",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "customer.archived": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "customer.archived",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "customer.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "customer.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "customer.identity_merged": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerIdentityMergedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "customer.identity_merged",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "customer.merged": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerMergedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "customer.merged",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "customer.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "customer.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "dunning.case_exhausted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/DunningCaseEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "dunning.case_exhausted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "dunning.case_opened": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/DunningCaseEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "dunning.case_opened",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "dunning.case_recovered": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/DunningCaseEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "dunning.case_recovered",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "dunning.payment_link_sent": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/DunningCaseEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "dunning.payment_link_sent",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.adjusted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardAdjustedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.adjusted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.balance_low": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardBalanceLowEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.balance_low",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.expired": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardExpiredEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.expired",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.issued": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardIssuedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.issued",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.redeemed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardRedeemedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.redeemed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.refunded": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardRefundedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.refunded",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.reloaded": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardReloadedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.reloaded",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "gift_card.revoked": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/GiftCardRevokedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "gift_card.revoked",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "location.deleted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/LocationDeletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "location.deleted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "location.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/LocationUpdatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "location.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "merchant.agent_attributed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/MerchantAgentAttributedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "merchant.agent_attributed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "merchant.configuration.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SelfServiceConfigurationUpdatedEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/WebhookEndpointDeletedEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/WebhookEndpointSavedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "merchant.configuration.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "organization.deleted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/OrganizationDeletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "organization.deleted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.completed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardPresentPaymentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/CheckoutPaymentCompletedEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/ProcessingPaymentCompletedEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/TapToPayPaymentCompletedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.completed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.declined": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardPresentPaymentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/CheckoutPaymentDeclinedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.declined",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.failed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/AchLifecycleEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.failed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.flagged_for_review": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/FraudDecisionEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.flagged_for_review",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.fraud_detected": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/FraudDecisionEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.fraud_detected",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.pending": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/AchLifecycleEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.pending",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.refunded": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardPresentPaymentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/CardPresentSyncAdjustmentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/ProcessingPaymentRefundedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.refunded",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.returned": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/AchLifecycleEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.returned",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.settled": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentSettledEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.settled",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment.voided": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardPresentPaymentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/CardPresentSyncAdjustmentEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/ProcessingPaymentVoidedEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment.voided",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment_method.attached": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentMethodEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment_method.attached",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment_method.attention_required": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentMethodAttentionRequiredEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment_method.attention_required",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment_method.detached": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentMethodEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment_method.detached",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "payment_method.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentMethodEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "payment_method.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "price.archived": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PriceEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "price.archived",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "price.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PriceEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "price.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product.archived": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product.archived",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product_category.archived": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductCategoryEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product_category.archived",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product_category.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductCategoryEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product_category.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "product_category.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ProductCategoryEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "product_category.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "promotion_code.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/PromotionCodeEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "promotion_code.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "report.export.completed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ReportExportCompletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "report.export.completed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "reserve.accrued": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ReserveLedgerEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "reserve.accrued",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "reserve.released": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/ReserveLedgerEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "reserve.released",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "risk.alert.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/RiskAlertEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "risk.alert.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "risk.alert.resolved": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/RiskAlertEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "risk.alert.resolved",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "risk.volume_limit.soft_limit_reached": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/VolumeLimitSoftLimitReachedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "risk.volume_limit.soft_limit_reached",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.canceled": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.canceled",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.failed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.failed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.processing": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.processing",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.requires_confirmation": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.requires_confirmation",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "setup_intent.succeeded": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SetupIntentEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "setup_intent.succeeded",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "store.authorized": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/StoreAuthorizedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "store.authorized",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "store.revoked": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/StoreRevokedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "store.revoked",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.billed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionBilledEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.billed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.cancelled": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionStatusEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.cancelled",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.completed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionCompletedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.completed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionCreatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.past_due": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionStatusEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.past_due",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.paused": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionStatusEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.paused",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.payment_failed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionPaymentFailedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.payment_failed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.resumed": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionStatusEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.resumed",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.trial_cancelled": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionTrialEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.trial_cancelled",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.trial_ended": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionTrialEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.trial_ended",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription.trial_started": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionTrialEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription.trial_started",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription_item.created": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionItemEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/SubscriptionItemUnavailableEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription_item.created",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription_item.deleted": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionItemEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/SubscriptionItemUnavailableEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription_item.deleted",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "subscription_item.updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionItemEventPayload"
                      },
                      {
                        "$ref": "#/components/schemas/SubscriptionItemUnavailableEventPayload"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "subscription_item.updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "transaction.customer_link_updated": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                  },
                  {
                    "$ref": "#/components/schemas/TransactionCustomerLinkUpdatedEventPayload"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Any 2xx status acknowledges the delivery; anything else is retried."
          }
        },
        "summary": "transaction.customer_link_updated",
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.peakgateway.co"
    },
    {
      "url": "https://staging-api.peakgateway.co"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ]
}
