{
  "openapi": "3.1.0",
  "info": {
    "title": "User Service",
    "version": "0.0.0"
  },
  "tags": [
    {
      "name": "Auth"
    },
    {
      "name": "User"
    },
    {
      "name": "Terms"
    },
    {
      "name": "Source of Funds"
    },
    {
      "name": "Phone"
    },
    {
      "name": "User Account"
    },
    {
      "name": "Cards"
    },
    {
      "name": "User Movements"
    },
    {
      "name": "KYC"
    },
    {
      "name": "PCI"
    },
    {
      "name": "3DS"
    },
    {
      "name": "Health"
    }
  ],
  "paths": {
    "/auth/siwe/{address}": {
      "get": {
        "operationId": "Auth_getSiweMessage",
        "summary": "Get Siwe message",
        "description": "Retrieve the message that users need to Sign in with Ethereum (SIWE)",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Ethereum address",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "description": "Domain requesting authentication",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "explode": false
          },
          {
            "name": "uri",
            "in": "query",
            "required": true,
            "description": "URI of the application",
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "explode": false
          },
          {
            "name": "appName",
            "in": "query",
            "required": true,
            "description": "Application name to display in wallet",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSiweMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure on auth routes (decoder / request constraints).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthValidationError"
                }
              }
            }
          },
          "422": {
            "description": "Client error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSiweMessageUnprocessableEntity"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Auth"
        ],
        "x-ogen-operation-group": "Auth"
      }
    },
    "/auth/siwe": {
      "post": {
        "operationId": "Auth_verifySiwe",
        "summary": "Get Access Token",
        "description": "Verify a signed SIWE message. Returns both a short-lived access token and a\nlonger-lived refresh token in the response body. The client is responsible\nfor storing the refresh token securely.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifySiweSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySiweRequest"
              }
            }
          }
        },
        "x-ogen-operation-group": "Auth"
      }
    },
    "/email-verification": {
      "post": {
        "operationId": "EmailVerification_request",
        "summary": "Request Email Verification",
        "description": "Send a 6-digit one-time password to the given email.\n\nThe same wallet or the same email can request another code after 1 minute.\nA sooner request returns 429 `OTP_SEND_COOLDOWN`.\n\nReturns 422 `EMAIL_VERIFICATION_NOT_REQUIRED` when you do not require\nemail verification. Registration then accepts the email without a code,\nand that email is not verified.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure on email-verification.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationUnauthorized"
                }
              }
            }
          },
          "422": {
            "description": "You do not require email verification. `error` is\n`EMAIL_VERIFICATION_NOT_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationUnprocessable"
                }
              }
            }
          },
          "429": {
            "description": "Send rate limit exceeded. `error` is `OTP_SEND_COOLDOWN` (another send for\nthis wallet or this email within 1 minute) or `OTP_SEND_DAILY_CAP`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationTooManyRequests"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationInternalError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEmailVerificationServiceUnavailable"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestEmailVerificationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "EmailVerification"
      }
    },
    "/auth/refresh": {
      "post": {
        "operationId": "AuthSession_refresh",
        "summary": "Refresh Access Token",
        "description": "Exchange a valid refresh token for a new access token and rotated refresh\ntoken. The refresh token must be sent in the request body.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          }
        },
        "x-ogen-operation-group": "Auth"
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "AuthSession_logout",
        "summary": "Logout",
        "description": "Invalidate the current session by revoking all refresh tokens in the token\nfamily. The client is responsible for deleting the refresh token from its\nstorage.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoutRequest"
              }
            }
          }
        },
        "x-ogen-operation-group": "Auth"
      }
    },
    "/user": {
      "post": {
        "operationId": "User_registerUser",
        "summary": "Register User",
        "description": "Register a new user and create a profile. You receive a new JWT access\ntoken with user id that you can use to authenticate requests to the API.\nOptionally provide a shareToken for Sumsub reusable KYC.\n\nIf you require users to verify their email, include `otp` from POST\n/email-verification. Otherwise `otp` is ignored and the email is stored\nwithout proof of ownership.\n\nA wallet address may hold at most one user across all partners.\n\nFailure codes carried in `error`: `EMAIL_VERIFICATION_REQUIRED` /\n`INVALID_OTP` / `OTP_EXPIRED` (400), `USER_ALREADY_EXISTS` /\n`USER_REGISTRATION_IN_PROGRESS` (409), `PROFILE_CREATION_FAILED` (502),\nand `INTERNAL_ERROR` (500, returned on the shared error response).",
        "parameters": [],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Discriminated 400 body shared with the auth POST routes: `validation`\n(decoder / request constraints) or `business` (`EMAIL_VERIFICATION_REQUIRED`\n/ `INVALID_OTP` / `OTP_EXPIRED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "409": {
            "description": "Conflict on registration. `error` is one of:\n- `USER_ALREADY_EXISTS` - the wallet address is already registered. A wallet\nmay hold at most one user across all partners, so this is also returned\nwhen the address belongs to another partner. Terminal: do not retry.\n- `USER_REGISTRATION_IN_PROGRESS` - another in-flight request is registering this\nsame wallet. Retryable: retrying once it settles either succeeds or\nreturns `USER_ALREADY_EXISTS`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserConflict"
                }
              }
            }
          },
          "502": {
            "description": "Upstream failure creating the KYC profile. `error` is\n`PROFILE_CREATION_FAILED`. The OTP is not consumed, so the request can be\nretried with the same code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      },
      "get": {
        "operationId": "User_getUser",
        "summary": "Get Current User",
        "description": "Get the current authenticated user from the database",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/onboarding": {
      "get": {
        "operationId": "User_getUserOnboarding",
        "summary": "Get Onboarding Status",
        "description": "Get the current onboarding status for the authenticated user. Returns a\ntagged union indicating the current step and any required actions.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStatus"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserOnboardingBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/terms": {
      "get": {
        "operationId": "Terms_list",
        "summary": "List Available Terms",
        "description": "Get all available terms types with current versions (requires wallet authentication)",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Terms listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTermsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTermsUnauthorized"
                }
              }
            }
          },
          "502": {
            "description": "Core API error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTermsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Terms"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Terms"
      }
    },
    "/user/terms": {
      "post": {
        "operationId": "UserTerms_acceptUserTerms",
        "summary": "Accept Terms",
        "description": "Accept one or more terms types and versions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptUserTermsSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptUserTermsBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptUserTermsUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptUserTermsNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptUserTermsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Terms"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptUserTermsRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Terms"
      },
      "get": {
        "operationId": "UserTerms_getUserTerms",
        "summary": "Get User Terms Status",
        "description": "Get the authenticated user's terms acceptance status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserTermsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserTermsUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserTermsNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserTermsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Terms"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Terms"
      }
    },
    "/source-of-funds": {
      "get": {
        "operationId": "SourceOfFunds_getQuestions",
        "summary": "Get SOF Questions",
        "description": "Get the Source of Funds questionnaire questions and answer options",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSOFQuestionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSOFQuestionsUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSOFQuestionsNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSOFQuestionsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Source of Funds"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "SourceOfFunds"
      },
      "post": {
        "operationId": "SourceOfFunds_submitAnswers",
        "summary": "Submit SOF Answers",
        "description": "Submit answers to the Source of Funds questionnaire",
        "parameters": [],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSOFAnswersSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSOFAnswersBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSOFAnswersUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSOFAnswersNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSOFAnswersBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Source of Funds"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSOFAnswersRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "SourceOfFunds"
      }
    },
    "/phone": {
      "get": {
        "operationId": "Phone_getPhone",
        "summary": "Get Phone Number",
        "description": "Returns the user's phone number if at least one card was created.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Phone number retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPhoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "User not found or no phone number registered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Phone"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Phone"
      },
      "post": {
        "operationId": "Phone_createPhone",
        "summary": "Set Phone Number",
        "description": "Sets the user's phone number. Creates a cardholder if the user does not have one yet.\n\nIf you require users to verify their phone, include `code` from POST /phone/verification; `phone` is optional. Otherwise send `phone` and omit `code`.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Phone number updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation or invalid phone number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "User not found or no cardholder record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneConflict"
                }
              }
            }
          },
          "422": {
            "description": "Client error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationUnprocessable"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Phone"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePhoneRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Phone"
      },
      "patch": {
        "operationId": "Phone_updatePhone",
        "summary": "Update Phone Number",
        "description": "Updates the user's phone number on their existing cardholder record.\nReturns 404 if the user has no cardholder yet — this method never creates one.\n\nIf you require users to verify their phone, include `code` from POST /phone/verification; `phone` is optional. Otherwise send `phone` and omit `code`.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Phone number updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation or invalid phone number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "User not found or no cardholder record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePhoneConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Phone"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePhoneRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Phone"
      }
    },
    "/phone/verification": {
      "post": {
        "operationId": "Phone_requestVerification",
        "summary": "Request Phone Verification",
        "description": "Send a one-time code to prove ownership of a phone number.\n\nThe same wallet or the same phone number can request another code after\n1 minute. A sooner request returns 429 `OTP_SEND_COOLDOWN`.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationSuccess"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Client error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationUnprocessable"
                }
              }
            }
          },
          "429": {
            "description": "Send rate limit exceeded. `error` is `OTP_SEND_COOLDOWN` (another send for\nthis wallet or this phone number within 1 minute) or `OTP_SEND_DAILY_CAP`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationTooManyRequests"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneVerificationBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Phone"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPhoneVerificationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Phone"
      }
    },
    "/user/account": {
      "post": {
        "operationId": "User_createUserAccount",
        "summary": "Create Account",
        "description": "Create an account for the authenticated user.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAccountSuccess"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAccountConflict"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAccountBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Account"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      },
      "get": {
        "operationId": "User_getUserAccount",
        "summary": "Get Account",
        "description": "Get the account details for the authenticated user.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserAccountBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Account"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/account/limit": {
      "get": {
        "operationId": "User_getUserAccountLimit",
        "summary": "Get Account Daily Spending Limit",
        "description": "Returns the daily spending limit configured on the authenticated user\naccount. `currency` is the account native currency (`nativeCurrency`\nfrom `GET /user/account`), and `amount` is in minor units of that\ncurrency — divide by 10^`decimals` to get the major-unit value. USD,\nEUR, and GBP use 2 decimal places. `syncStatus` indicates whether the\nmost recent update has been applied. Once synced, this is a cumulative\nspending limit, not a per-transaction cap: an authorization that meets\nor exceeds the limit can be approved, after which subsequent eligible\nauthorizations are declined.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLimit"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserAccountLimitBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Account"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      },
      "put": {
        "operationId": "User_setUserAccountLimit",
        "summary": "Set Account Daily Spending Limit",
        "description": "Sets the daily spending limit for the authenticated user account.\n`currency` must match the account native currency (`nativeCurrency` from\n`GET /user/account`), and `amount` is in minor units of that currency.\nUSD, EUR, and GBP use 2 decimal places, so 1000000 is 10,000.00. The\nresponse returns the new limit immediately with `syncStatus: pending`\nand transitions to `synced` once the change has been applied. Once\nsynced, this is a cumulative spending limit, not a per-transaction cap:\nan authorization that meets or exceeds the limit can be approved, after\nwhich subsequent eligible authorizations are declined.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLimit"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetUserAccountLimitBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetUserAccountLimitBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAccountLimitRequest"
              },
              "examples": {
                "example0": {
                  "description": "10,000.00 EUR",
                  "value": {
                    "amount": 1000000,
                    "currency": "EUR"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/cards/virtual": {
      "post": {
        "operationId": "Cards_createVirtualCard",
        "summary": "Create Virtual Card",
        "description": "Create a virtual card for the authenticated user. Virtual cards are issued\ninstantly and can be used for online transactions. If the user does not yet\nhave a cardholder, one is created automatically using the provided phone\nnumber (required for first card creation).",
        "parameters": [],
        "responses": {
          "202": {
            "description": "Accepted - Virtual card creation accepted (pending process)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVirtualCardSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - User has no account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVirtualCardBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVirtualCardConflict"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable - the request is well formed but the state forbids issuing a card:\nphone missing or malformed, or the partner rejected the issuance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVirtualCardUnprocessableEntityBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error - Virtual card creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Cardholder creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVirtualCardRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards": {
      "get": {
        "operationId": "Cards_listCards",
        "summary": "List Cards",
        "description": "List all cards for the authenticated user. Returns both virtual and physical\ncards. Returns an empty list if no cardholder has been created yet.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Cards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCardsSuccess"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error - Failed to list cards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards/{cardId}/limit": {
      "get": {
        "operationId": "Cards_getCardLimit",
        "summary": "Get Card Daily Spending Limit",
        "description": "Returns the daily spending limit configured on a card. `currency` is the\ncard native currency (`nativeCurrency` on the card from `GET /cards`),\nand `amount` is in minor units of that currency — divide by\n10^`decimals` to get the major-unit value. USD, EUR, and GBP use 2\ndecimal places. The card must belong to the authenticated user. Once\nsynced, this is a cumulative spending limit, not a per-transaction cap:\nan authorization that meets or exceeds the limit can be approved, after\nwhich subsequent eligible authorizations are declined.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardLimit"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardLimitBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCardLimitBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      },
      "put": {
        "operationId": "Cards_setCardLimit",
        "summary": "Set Card Daily Spending Limit",
        "description": "Sets the daily spending limit for a card. `currency` must match the\ncard native currency (`nativeCurrency` on the card from `GET /cards`),\nand `amount` is in minor units of that currency. USD, EUR, and GBP use\n2 decimal places, so 1000000 is 10,000.00. The card must belong to the\nauthenticated user. The response returns the new limit immediately with\n`syncStatus: pending` and transitions to `synced` once the change has\nbeen applied. Once synced, this is a cumulative spending limit, not a\nper-transaction cap: an authorization that meets or exceeds the limit\ncan be approved, after which subsequent eligible authorizations are\ndeclined.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardLimit"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardLimitBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetCardLimitBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCardLimitRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards/{cardId}/apple-pay/provisioning": {
      "post": {
        "operationId": "Cards_provisionApplePay",
        "summary": "Create Apple Pay Provisioning Data",
        "description": "Creates the encrypted Apple Pay payload required by PassKit. The card must\nbelong to the authenticated user's cardholder.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplePayProvisioningResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the current state of the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplePayProvisioningRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards/{cardId}/block": {
      "post": {
        "operationId": "Cards_blockCard",
        "summary": "Block Card",
        "description": "Blocks a card temporarily. A blocked card cannot be used for transactions.\nUse unblock to restore access. The card must belong to the authenticated\nuser's cardholder.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card blocked successfully"
          },
          "400": {
            "description": "Bad Request - User has no cardholder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - User or card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - the request cannot be applied in the current state. `error` is one of:\n- `INVALID_CARD_STATUS`: the card is not in a state that allows this change\n- `ACCOUNT_BLOCKED`: the card status is valid but the account is not active\n- `CONFLICT`: any other state conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error - Failed to block card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards/{cardId}/unblock": {
      "post": {
        "operationId": "Cards_unblockCard",
        "summary": "Unblock Card",
        "description": "Unblocks a previously blocked card. Restores the card to active status,\nallowing transactions again. The card must belong to the authenticated\nuser's cardholder.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card unblocked successfully"
          },
          "400": {
            "description": "Bad Request - User has no cardholder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - User or card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - the request cannot be applied in the current state. `error` is one of:\n- `INVALID_CARD_STATUS`: the card is not in a state that allows this change\n- `ACCOUNT_BLOCKED`: the card status is valid but the account is not active\n- `CONFLICT`: any other state conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error - Failed to unblock card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/cards/{cardId}/cancel": {
      "post": {
        "operationId": "Cards_cancelCard",
        "summary": "Cancel Card",
        "description": "Cancels a card permanently. Once canceled, the card cannot be reactivated.\nA new card must be issued. The card must belong to the authenticated user's\ncardholder.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Card canceled successfully"
          },
          "400": {
            "description": "Bad Request - User has no cardholder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid JWT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - User or card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - the request cannot be applied in the current state. `error` is one of:\n- `INVALID_CARD_STATUS`: the card is not in a state that allows this change\n- `ACCOUNT_BLOCKED`: the card status is valid but the account is not active\n- `CONFLICT`: any other state conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardStatusConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error - Failed to cancel card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "Cards"
      }
    },
    "/user/balances/v2": {
      "get": {
        "operationId": "User_getUserBalancesV2",
        "summary": "Get Account Balances (v2)",
        "description": "Returns the authenticated user's account balances. Spendable excludes dust\nand processingWithdrawals is exposed at the currency level. Each currency\nrow includes a per-token breakdown.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountBalancesV2Response"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserBalancesV2BadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Movements"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/deposits": {
      "get": {
        "operationId": "User_getUserDeposits",
        "summary": "Get User Deposits",
        "description": "Returns the authenticated user's deposit history, including amount,\ncurrency, status, and creation date.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserDepositsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserDepositsNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserDepositsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Movements"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/statement": {
      "get": {
        "operationId": "User_getUserStatement",
        "summary": "Get Account Statement",
        "description": "Returns a chronological list of all financial movements for the authenticated\nuser's account, including card transactions (both pending and settled),\ndeposits, and withdrawals.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of items to return (1-100).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1,
              "maximum": 100
            },
            "explode": false
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Cursor for pagination. Use the value from the previous response.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "description": "Filter by start date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "explode": false
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "description": "Filter by end date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserStatementResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStatementBadRequestBody"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserStatementNotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserStatementBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Movements"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/withdrawal": {
      "post": {
        "operationId": "User_createUserWithdrawal",
        "summary": "Create Withdrawal",
        "description": "Create a withdrawal request for the authenticated user. Requires an\nexisting account.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWithdrawalSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Validation or business failure for a withdrawal request. Decoder failures use\n`kind: validation`. Partner rejections use `kind: business`, with `error` one of:\n- `UNSUPPORTED_TOKEN`: the token is not withdrawable on this account's chain\n- `INVALID_REQUEST`: any other rejected request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - the withdrawal cannot be created in the current state. `error` is one of:\n- `WITHDRAWAL_ALREADY_IN_PROGRESS`: another instant withdrawal for this account is still in progress\n- `CONFLICT`: any other state conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWithdrawalConflict"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWithdrawalBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Movements"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWithdrawalRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/user/withdrawals": {
      "get": {
        "operationId": "User_getUserWithdrawals",
        "summary": "Get User Withdrawals",
        "description": "Returns the authenticated user's withdrawal history, including amount,\ncurrency, status, and creation date.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserWithdrawalsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserWithdrawalsBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "User Movements"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "User"
      }
    },
    "/kyc/import-partner-applicant": {
      "post": {
        "operationId": "KYC_importPartnerApplicant",
        "summary": "Generate KYC Applicant Share Token",
        "description": "Generate a temporary Sumsub share token for the authenticated user's KYC\napplicant. Pass the token to the named Sumsub recipient to reuse the\napplicant's verified identity data.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPartnerApplicantResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "422": {
            "description": "Client error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPartnerApplicantUnprocessableEntity"
                }
              }
            }
          },
          "502": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPartnerApplicantBadGateway"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "KYC"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportPartnerApplicantRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "KYC"
      }
    },
    "/pci/cards/{cardId}/challenge": {
      "get": {
        "operationId": "PCI_getCardChallenge",
        "summary": "Get PCI EIP-712 Challenge",
        "description": "Issues a one-time EIP-712 challenge. The response is a complete typed-data\nobject that can be passed directly to signTypedData (convert message.nonce\nto BigInt first). After signing, forward the hex signature as\nX-Eip712-Signature and the nonce as X-Eip712-Nonce on the subsequent PCI\ndata request. The challenge expires after 5 minutes and can only be used\nonce.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "description": "The operation being authorized: 'view-details' (card PAN/CVV),\n'view-pin' (read PIN), 'change-pin' (set new PIN).",
            "schema": {
              "$ref": "#/components/schemas/PciAction"
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PciChallengeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "PCI"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "PCI"
      }
    },
    "/pci/cards/{cardId}/details": {
      "get": {
        "operationId": "PCI_getCardDetails",
        "summary": "Get Card Details",
        "description": "Returns the card PAN and CVV encrypted under a client-provided AES session\nkey (expiration date in plaintext). The caller RSA-OAEP encrypts a one-time\nAES-256 session key with the PCI public key and passes it as `encryptedKey`;\nthe EIP-712 signature over a prior `view-details` challenge is passed via the\n`X-Eip712-Signature` / `X-Eip712-Nonce` headers.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          },
          {
            "name": "encryptedKey",
            "in": "query",
            "required": true,
            "description": "Base64-encoded RSA-OAEP encrypted AES-256 session key.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "keyId",
            "in": "query",
            "required": true,
            "description": "Id of the `encryptionKeys` entry that wrapped `encryptedKey`.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "X-Eip712-Signature",
            "in": "header",
            "required": true,
            "description": "EIP-712 signature over the `view-details` challenge.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Eip712-Nonce",
            "in": "header",
            "required": true,
            "description": "Nonce of the challenge that was signed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PciEncryptedCardDetailsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "PCI"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "PCI"
      }
    },
    "/pci/cards/{cardId}/pin": {
      "get": {
        "operationId": "PCI_getCardPin",
        "summary": "Get Card PIN",
        "description": "Returns the card PIN encrypted under a client-provided AES session key. The\ncaller RSA-OAEP encrypts a one-time AES-256 session key with the PCI public\nkey and passes it as `encryptedKey`; the EIP-712 signature over a prior\n`view-pin` challenge is passed via the `X-Eip712-Signature` /\n`X-Eip712-Nonce` headers.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          },
          {
            "name": "encryptedKey",
            "in": "query",
            "required": true,
            "description": "Base64-encoded RSA-OAEP encrypted AES-256 session key.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "keyId",
            "in": "query",
            "required": true,
            "description": "Id of the `encryptionKeys` entry that wrapped `encryptedKey`.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "X-Eip712-Signature",
            "in": "header",
            "required": true,
            "description": "EIP-712 signature over the `view-pin` challenge.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Eip712-Nonce",
            "in": "header",
            "required": true,
            "description": "Nonce of the challenge that was signed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PciEncryptedPinResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "PCI"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "PCI"
      },
      "post": {
        "operationId": "PCI_setCardPin",
        "summary": "Set Card PIN",
        "description": "Sets the card PIN. The caller encrypts the new PIN (in PIN Block 2 format)\nwith an AES session key, then RSA-OAEP encrypts the session key with the PCI\npublic key. The EIP-712 signature over a prior `change-pin` challenge is\npassed via the `X-Eip712-Signature` / `X-Eip712-Nonce` headers.",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          },
          {
            "name": "X-Eip712-Signature",
            "in": "header",
            "required": true,
            "description": "EIP-712 signature over the `change-pin` challenge.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Eip712-Nonce",
            "in": "header",
            "required": true,
            "description": "Nonce of the challenge that was signed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful. "
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "PCI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PciSetEncryptedPinRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "PCI"
      }
    },
    "/pci/public-key": {
      "get": {
        "operationId": "PCI_getPublicKey",
        "summary": "Get PCI Public Key",
        "description": "Returns the RSA-OAEP SHA-256 public key (Base64-encoded DER SPKI) used to\nencrypt AES session keys, plus the same key in `encryptionKeys`. The client\nwraps a one-time AES-256 session key with that key and sends its id as\n`keyId`.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PciPublicKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "PCI"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "PCI"
      }
    },
    "/3ds/challenges": {
      "get": {
        "operationId": "ThreeDS_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDSChallengeListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "3DS"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "ThreeDS"
      }
    },
    "/3ds/challenges/{challengeId}": {
      "get": {
        "operationId": "ThreeDS_get",
        "parameters": [
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDSChallengeDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "3DS"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "ThreeDS"
      }
    },
    "/3ds/challenges/{challengeId}/decision": {
      "post": {
        "operationId": "ThreeDS_decide",
        "parameters": [
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          },
          {
            "name": "X-Eip712-Signature",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Eip712-Nonce",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDSChallengeDetailResponse"
                }
              }
            }
          },
          "202": {
            "description": "The request has been accepted for processing, but processing has not yet completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDSChallengeDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "3DS"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreeDSDecisionRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "ThreeDS"
      }
    },
    "/3ds/challenges/{challengeId}/decision-challenge": {
      "post": {
        "operationId": "ThreeDS_createDecisionChallenge",
        "parameters": [
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDSDecisionChallengeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "3DS"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreeDSDecisionRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-ogen-operation-group": "ThreeDS"
      }
    },
    "/health": {
      "get": {
        "operationId": "Health_health",
        "summary": "Health check endpoint",
        "description": "Check if the service is running and get basic system information",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "Health"
        ],
        "x-ogen-operation-group": "Health"
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptUserTermsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AcceptUserTermsBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/AcceptUserTermsValidationError"
          },
          {
            "$ref": "#/components/schemas/AcceptUserTermsBusinessErrorBody"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/AcceptUserTermsValidationError",
            "business": "#/components/schemas/AcceptUserTermsBusinessErrorBody"
          }
        },
        "description": "Discriminated 400 body for accept terms. Both variants include `kind` so clients\ncan branch on validation vs business failures (same pattern as auth POST routes)."
      },
      "AcceptUserTermsBusinessErrorBody": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "ok",
          "errors"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "ok": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AcceptUserTermsErrorItem"
            }
          }
        },
        "description": "Domain/business failure on accept terms (invalid type or version)."
      },
      "AcceptUserTermsErrorItem": {
        "type": "object",
        "required": [
          "type",
          "error"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AcceptUserTermsItem": {
        "type": "object",
        "required": [
          "type",
          "version"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "AcceptUserTermsNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AcceptUserTermsRequest": {
        "type": "object",
        "required": [
          "terms"
        ],
        "properties": {
          "terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AcceptUserTermsItem"
            },
            "minItems": 1
          }
        }
      },
      "AcceptUserTermsSuccess": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "AcceptUserTermsUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AcceptUserTermsValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure on accept terms (decoder / request constraints)."
      },
      "Account": {
        "type": "object",
        "required": [
          "id",
          "kycProfileId",
          "safeOwnerAddress",
          "safeAddress",
          "chain",
          "chainName",
          "reference",
          "nativeCurrency",
          "additionalCurrencies",
          "createdAt",
          "updatedAt",
          "closedAt",
          "status",
          "provisionedAt"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "kycProfileId": {
            "$ref": "#/components/schemas/uuid"
          },
          "safeOwnerAddress": {
            "type": "string"
          },
          "safeAddress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/AccountChain"
          },
          "chainName": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "nativeCurrency": {
            "type": "string",
            "description": "ISO-4217 currency code the account is denominated in. The account daily\nspending limit is set and reported in this currency.",
            "examples": [
              "EUR"
            ]
          },
          "additionalCurrencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO-4217 currency codes the account supports besides `nativeCurrency`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AccountStatus"
          },
          "provisionedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AccountBalanceV2": {
        "type": "object",
        "required": [
          "currency",
          "decimals",
          "spendable",
          "nonSpendable",
          "processingDeposits",
          "processingWithdrawals",
          "tokens"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "description": "Currency code."
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "description": "Number of decimal places for this currency's raw amounts."
          },
          "spendable": {
            "type": "string",
            "description": "Spendable balance. Raw bigint string in the currency's smallest unit."
          },
          "nonSpendable": {
            "type": "string",
            "description": "Non-spendable balance. Raw bigint string."
          },
          "processingDeposits": {
            "type": "string",
            "description": "Incoming deposits being processed. Raw bigint string."
          },
          "processingWithdrawals": {
            "type": "string",
            "description": "Outgoing withdrawals being processed. Raw bigint string."
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenBalance"
            },
            "description": "Per-token breakdown of balances."
          }
        }
      },
      "AccountBalancesV2Response": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountBalanceV2"
            },
            "description": "List of balances per currency."
          }
        }
      },
      "AccountChain": {
        "type": "object",
        "required": [
          "name",
          "id"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/AccountChainName"
          },
          "id": {
            "$ref": "#/components/schemas/AccountChainID"
          }
        }
      },
      "AccountChainID": {
        "type": "string",
        "enum": [
          "42220",
          "100"
        ]
      },
      "AccountChainName": {
        "type": "string",
        "enum": [
          "celo",
          "gnosis"
        ]
      },
      "AccountLimit": {
        "type": "object",
        "required": [
          "amount",
          "currency",
          "decimals",
          "syncStatus",
          "updatedAt",
          "spentToday",
          "remaining"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "description": "Daily limit in minor units of `currency`. Divide by 10^`decimals` to get\nthe major-unit value. USD, EUR, and GBP use 2 decimal places."
          },
          "currency": {
            "type": "string",
            "description": "ISO-4217 currency code — the account native currency (`nativeCurrency`\nfrom `GET /user/account`)."
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "description": "Number of decimal places for this currency (2 for USD, EUR, and GBP)."
          },
          "syncStatus": {
            "type": "string",
            "enum": [
              "pending",
              "synced",
              "failed"
            ],
            "description": "Replication state of the limit. `pending` immediately after an update,\n`synced` once the change has been applied, `failed` if the change could not\nbe applied after retries."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last time this limit was modified."
          },
          "spentToday": {
            "type": "integer",
            "format": "int64",
            "description": "Amount spent today against this limit, in minor units of `currency`.\nResets at the start of each calendar day."
          },
          "remaining": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining headroom today, in minor units of `currency`. Equals max(0,\namount - spentToday)."
          }
        }
      },
      "AccountStatus": {
        "type": "string",
        "enum": [
          "provisioning",
          "active",
          "blocked",
          "closed"
        ]
      },
      "ApplePayCertificate": {
        "type": "string",
        "minLength": 1,
        "description": "A non-empty Base64-encoded DER certificate supplied by PassKit."
      },
      "ApplePayDeviceType": {
        "type": "string",
        "enum": [
          "mobile_phone",
          "watch"
        ],
        "description": "Device types supported for Apple Pay push provisioning."
      },
      "ApplePayProvisioningRequest": {
        "type": "object",
        "required": [
          "certificates",
          "nonce",
          "nonce_signature",
          "device_type",
          "app_version"
        ],
        "properties": {
          "certificates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplePayCertificate"
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "Apple-provided leaf and sub-CA certificates, in that order. The Apple\nRoot CA G3 is downloaded separately and is not sent by the client."
          },
          "nonce": {
            "type": "string",
            "minLength": 1
          },
          "nonce_signature": {
            "type": "string",
            "minLength": 1
          },
          "device_type": {
            "$ref": "#/components/schemas/ApplePayDeviceType"
          },
          "app_version": {
            "type": "string",
            "minLength": 1
          },
          "product_type": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "ApplePayProvisioningResponse": {
        "type": "object",
        "required": [
          "activation_data",
          "encrypted_pass_data",
          "ephemeral_public_key"
        ],
        "properties": {
          "activation_data": {
            "type": "string"
          },
          "encrypted_pass_data": {
            "type": "string"
          },
          "ephemeral_public_key": {
            "type": "string"
          }
        }
      },
      "AuthBadRequest": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/AuthValidationError"
          },
          {
            "$ref": "#/components/schemas/AuthBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/AuthValidationError",
            "business": "#/components/schemas/AuthBusinessError"
          }
        },
        "description": "Discriminated 400 body for auth POST routes. The `kind` field is additive\nand not a breaking change. Clients can keep reading `success` and `error`."
      },
      "AuthBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Domain/business failure on auth routes (returned by handlers)."
      },
      "AuthValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure on auth routes (decoder / request constraints)."
      },
      "Card": {
        "type": "object",
        "required": [
          "id",
          "accountId",
          "cardholderId",
          "status",
          "name",
          "type",
          "createdAt",
          "canceledAt",
          "nativeCurrency",
          "additionalCurrencies",
          "printedName",
          "issuingDate",
          "expirationDate",
          "contactlessEnabled",
          "mode",
          "brand",
          "bin",
          "last4Digits",
          "provisionedAt",
          "limit"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "accountId": {
            "$ref": "#/components/schemas/uuid"
          },
          "cardholderId": {
            "$ref": "#/components/schemas/uuid"
          },
          "status": {
            "$ref": "#/components/schemas/CardStatus"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/CardType"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "canceledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "nativeCurrency": {
            "type": "string",
            "description": "ISO-4217 currency code the card is denominated in. The card daily\nspending limit is set and reported in this currency.",
            "examples": [
              "EUR"
            ]
          },
          "additionalCurrencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO-4217 currency codes the card supports besides `nativeCurrency`."
          },
          "printedName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "issuingDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expirationDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "contactlessEnabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last4Digits": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provisionedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CardLimitSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currently configured daily spending limit. Null if no limit has been set for\nthis card. Call `GET /cards/{id}/limit` for today's spend and remaining\nheadroom."
          }
        }
      },
      "CardLimit": {
        "type": "object",
        "required": [
          "spentToday",
          "remaining"
        ],
        "properties": {
          "spentToday": {
            "type": "integer",
            "format": "int64",
            "description": "Amount spent today against this card limit, in minor units of\n`currency`. Resets at the start of each calendar day."
          },
          "remaining": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining headroom today, in minor units of `currency`. Equals max(0,\namount - spentToday)."
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/CardLimitSummary"
          }
        ]
      },
      "CardLimitBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CardLimitValidationError"
          },
          {
            "$ref": "#/components/schemas/CardLimitBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/CardLimitValidationError",
            "business": "#/components/schemas/CardLimitBusinessError"
          }
        },
        "description": "Discriminated 400 body for card limit routes. The `kind` field is additive\nand not a breaking change. Clients can keep reading `success` and `error`."
      },
      "CardLimitBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CardLimitSummary": {
        "type": "object",
        "required": [
          "amount",
          "currency",
          "decimals",
          "syncStatus",
          "updatedAt"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "description": "Daily limit in minor units of `currency`. Divide by 10^`decimals` to get\nthe major-unit value. USD, EUR, and GBP use 2 decimal places."
          },
          "currency": {
            "type": "string",
            "description": "ISO-4217 currency code — the card native currency (`nativeCurrency` on\nthe card from `GET /cards`)."
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "description": "Number of decimal places for this currency (2 for USD, EUR, and GBP)."
          },
          "syncStatus": {
            "$ref": "#/components/schemas/CardLimitSyncStatus",
            "description": "Replication state of the limit. `pending` immediately after an update,\n`synced` once the change has been applied, `failed` if the change could\nnot be applied after retries."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last time this limit was modified."
          }
        }
      },
      "CardLimitSyncStatus": {
        "type": "string",
        "enum": [
          "pending",
          "synced",
          "failed"
        ]
      },
      "CardLimitValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        }
      },
      "CardStatus": {
        "type": "string",
        "enum": [
          "all",
          "provisioning",
          "pending_activation",
          "active",
          "blocked",
          "canceled"
        ]
      },
      "CardStatusBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CardStatusValidationError"
          },
          {
            "$ref": "#/components/schemas/CardStatusBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/CardStatusValidationError",
            "business": "#/components/schemas/CardStatusBusinessError"
          }
        },
        "description": "Discriminated 400 body for card status routes. The `kind` field is additive\nand not a breaking change. Clients can keep reading `success` and `error`."
      },
      "CardStatusBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CardStatusConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Conflict - the request cannot be applied in the current state. `error` is one of:\n- `INVALID_CARD_STATUS`: the card is not in a state that allows this change\n- `ACCOUNT_BLOCKED`: the card status is valid but the account is not active\n- `CONFLICT`: any other state conflict"
      },
      "CardStatusValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        }
      },
      "CardType": {
        "type": "string",
        "enum": [
          "virtual",
          "plastic"
        ]
      },
      "CreateAccountBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CreateAccountConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CreateAccountSuccess": {
        "type": "object",
        "required": [
          "accountId"
        ],
        "properties": {
          "accountId": {
            "$ref": "#/components/schemas/uuid"
          }
        }
      },
      "CreateVirtualCardBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateVirtualCardValidationError"
          },
          {
            "$ref": "#/components/schemas/CreateVirtualCardBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/CreateVirtualCardValidationError",
            "business": "#/components/schemas/CreateVirtualCardBusinessError"
          }
        },
        "description": "Discriminated 400 body for POST /cards/virtual. The `kind` field is additive\nand not a breaking change. Clients can keep reading `success` and `error`."
      },
      "CreateVirtualCardBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CreateVirtualCardConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CreateVirtualCardRejectionReason": {
        "type": "string",
        "enum": [
          "PHONE_REQUIRED",
          "INVALID_PHONE_FORMAT",
          "CREATE_CARD_LIMIT_EXCEEDED",
          "CARD_CREATION_REJECTED"
        ],
        "description": "Machine-readable causes for a 422 on POST /cards/virtual. `CARD_CREATION_REJECTED`\nis the fallback for any card domain rejection this service does not map explicitly."
      },
      "CreateVirtualCardRequest": {
        "type": "object",
        "required": [
          "cardName"
        ],
        "properties": {
          "cardName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "phone": {
            "type": "string",
            "minLength": 6,
            "maxLength": 20
          }
        }
      },
      "CreateVirtualCardSuccess": {
        "type": "object",
        "required": [
          "cardId"
        ],
        "properties": {
          "cardId": {
            "$ref": "#/components/schemas/uuid"
          }
        },
        "description": "Accepted - Virtual card creation accepted (pending process)"
      },
      "CreateVirtualCardUnprocessableEntityBody": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/CreateVirtualCardRejectionReason"
          }
        },
        "description": "422 body for POST /cards/virtual. Same envelope as `Error`, with `error` closed."
      },
      "CreateVirtualCardValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        }
      },
      "CreateWithdrawalBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "CreateWithdrawalConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Conflict - the withdrawal cannot be created in the current state. `error` is one of:\n- `WITHDRAWAL_ALREADY_IN_PROGRESS`: another instant withdrawal for this account is still in progress\n- `CONFLICT`: any other state conflict"
      },
      "CreateWithdrawalRequest": {
        "type": "object",
        "required": [
          "tokenAddress",
          "amount"
        ],
        "properties": {
          "tokenAddress": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+$"
          }
        }
      },
      "CreateWithdrawalSuccess": {
        "type": "object",
        "required": [
          "withdrawalId"
        ],
        "properties": {
          "withdrawalId": {
            "$ref": "#/components/schemas/uuid"
          }
        }
      },
      "EmailVerificationValidationError": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure on email-verification."
      },
      "Error": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetCardLimitBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetPhoneResponse": {
        "type": "object",
        "required": [
          "phone",
          "countryCode"
        ],
        "properties": {
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "description": "Phone number retrieved successfully"
      },
      "GetSOFQuestionsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetSOFQuestionsNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetSOFQuestionsResponse": {
        "type": "object",
        "required": [
          "questions",
          "version"
        ],
        "properties": {
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SOFQuestion"
            }
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "GetSOFQuestionsUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetSiweMessageResponse": {
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "GetSiweMessageUnprocessableEntity": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetTermsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Core API error"
      },
      "GetTermsResponse": {
        "type": "object",
        "required": [
          "terms"
        ],
        "properties": {
          "terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TermsItem"
            }
          }
        },
        "description": "Terms listed successfully"
      },
      "GetTermsUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Unauthorized - Invalid JWT"
      },
      "GetUserAccountBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserAccountLimitBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserBalancesV2BadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserDepositsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserDepositsNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserDepositsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserDeposit"
            }
          }
        }
      },
      "GetUserOnboardingBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserResponse": {
        "type": "object",
        "required": [
          "id",
          "address",
          "email",
          "profileId",
          "accountId",
          "cardholderId",
          "partnerId",
          "createdAt",
          "kycProfile"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "profileId": {
            "$ref": "#/components/schemas/uuid"
          },
          "accountId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cardholderId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "partnerId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "kycProfile": {
            "$ref": "#/components/schemas/UserKycProfile"
          }
        }
      },
      "GetUserStatementBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserStatementNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserStatementResponse": {
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserStatementItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/UserStatementPagination"
          }
        }
      },
      "GetUserTermsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserTermsNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserTermsResponse": {
        "type": "object",
        "required": [
          "terms"
        ],
        "properties": {
          "terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserTermsStatus"
            }
          }
        }
      },
      "GetUserTermsUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserWithdrawalsBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "GetUserWithdrawalsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserWithdrawal"
            }
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          }
        }
      },
      "ImportPartnerApplicantBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "ImportPartnerApplicantRequest": {
        "type": "object",
        "required": [
          "forClientId"
        ],
        "properties": {
          "forClientId": {
            "type": "string",
            "minLength": 1,
            "description": "Sumsub client ID of the recipient configured to receive applicant data."
          },
          "ttlInSecs": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "description": "Share-token lifespan in seconds. When omitted, Sumsub's default of 1200\nseconds applies."
          }
        }
      },
      "ImportPartnerApplicantResponse": {
        "type": "object",
        "required": [
          "token",
          "forClientId"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Opaque, single-use Sumsub share token."
          },
          "forClientId": {
            "type": "string",
            "description": "Recipient client ID confirmed by Sumsub."
          }
        }
      },
      "ImportPartnerApplicantUnprocessableEntity": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "ListCardsSuccess": {
        "type": "object",
        "required": [
          "cards"
        ],
        "properties": {
          "cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          }
        },
        "description": "Cards retrieved successfully"
      },
      "LogoutRequest": {
        "type": "object",
        "required": [
          "refreshToken"
        ],
        "properties": {
          "refreshToken": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "LogoutSuccess": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "NotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "OnboardingSofQuestion": {
        "type": "object",
        "required": [
          "id",
          "question",
          "answers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OnboardingStatus": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/OnboardingStatusActionAcceptTos"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusWaitingKycSetup"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusActionCompleteKyc"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusKycManualReview"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusActionKycResubmissionRequested"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusActionCompleteSof"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusActionCreateAccount"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusWaitingAccountSetup"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusActionVerifyPhone"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusRejected"
          },
          {
            "$ref": "#/components/schemas/OnboardingStatusCompleted"
          }
        ],
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "action_accept_tos": "#/components/schemas/OnboardingStatusActionAcceptTos",
            "waiting_kyc_setup": "#/components/schemas/OnboardingStatusWaitingKycSetup",
            "action_complete_kyc": "#/components/schemas/OnboardingStatusActionCompleteKyc",
            "kyc_manual_review": "#/components/schemas/OnboardingStatusKycManualReview",
            "action_kyc_resubmission_requested": "#/components/schemas/OnboardingStatusActionKycResubmissionRequested",
            "action_complete_sof": "#/components/schemas/OnboardingStatusActionCompleteSof",
            "action_create_account": "#/components/schemas/OnboardingStatusActionCreateAccount",
            "waiting_account_setup": "#/components/schemas/OnboardingStatusWaitingAccountSetup",
            "action_verify_phone": "#/components/schemas/OnboardingStatusActionVerifyPhone",
            "rejected": "#/components/schemas/OnboardingStatusRejected",
            "completed": "#/components/schemas/OnboardingStatusCompleted"
          }
        },
        "description": "Onboarding status tagged union (discriminated by `status`)."
      },
      "OnboardingStatusActionAcceptTos": {
        "type": "object",
        "required": [
          "status",
          "terms"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_accept_tos"
            ]
          },
          "terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserTermsStatus"
            }
          }
        }
      },
      "OnboardingStatusActionCompleteKyc": {
        "type": "object",
        "required": [
          "status",
          "webSdkUrl",
          "mobileSdkToken"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_complete_kyc"
            ]
          },
          "webSdkUrl": {
            "type": "string"
          },
          "mobileSdkToken": {
            "type": "string"
          }
        }
      },
      "OnboardingStatusActionCompleteSof": {
        "type": "object",
        "required": [
          "status",
          "questions",
          "version"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_complete_sof"
            ]
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OnboardingSofQuestion"
            }
          },
          "version": {
            "type": "number"
          }
        }
      },
      "OnboardingStatusActionCreateAccount": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_create_account"
            ]
          }
        }
      },
      "OnboardingStatusActionKycResubmissionRequested": {
        "type": "object",
        "required": [
          "status",
          "webSdkUrl",
          "mobileSdkToken",
          "comments"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_kyc_resubmission_requested"
            ]
          },
          "webSdkUrl": {
            "type": "string"
          },
          "mobileSdkToken": {
            "type": "string"
          },
          "comments": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OnboardingStatusActionVerifyPhone": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "action_verify_phone"
            ]
          }
        }
      },
      "OnboardingStatusCompleted": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "completed"
            ]
          }
        }
      },
      "OnboardingStatusKycManualReview": {
        "type": "object",
        "required": [
          "status",
          "comments"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "kyc_manual_review"
            ]
          },
          "comments": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OnboardingStatusRejected": {
        "type": "object",
        "required": [
          "status",
          "reason"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "rejected"
            ]
          },
          "reason": {
            "type": "string"
          },
          "rejectLabels": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "comments": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OnboardingStatusWaitingAccountSetup": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting_account_setup"
            ]
          }
        }
      },
      "OnboardingStatusWaitingKycSetup": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting_kyc_setup"
            ]
          }
        }
      },
      "PciAction": {
        "type": "string",
        "enum": [
          "view-details",
          "view-pin",
          "change-pin"
        ],
        "description": "The operation being authorized: 'view-details' (card PAN/CVV), 'view-pin'\n(read PIN), 'change-pin' (set new PIN)."
      },
      "PciChallengeDomain": {
        "type": "object",
        "required": [
          "name",
          "version",
          "chainId"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "chainId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PciChallengeMessage": {
        "type": "object",
        "required": [
          "authorization",
          "nonce"
        ],
        "properties": {
          "authorization": {
            "type": "string",
            "description": "Human-readable action string, e.g. \"Display VISA Card Details\". This is\nwhat the user will see in their wallet."
          },
          "nonce": {
            "type": "string",
            "description": "Random uint256 as a decimal string. Must be passed back as the\nX-Eip712-Nonce header alongside the signature."
          }
        }
      },
      "PciChallengeResponse": {
        "type": "object",
        "required": [
          "domain",
          "primaryType",
          "types",
          "message"
        ],
        "properties": {
          "domain": {
            "$ref": "#/components/schemas/PciChallengeDomain",
            "description": "EIP-712 domain separator."
          },
          "primaryType": {
            "type": "string",
            "enum": [
              "Message"
            ],
            "description": "EIP-712 primary type."
          },
          "types": {
            "$ref": "#/components/schemas/PciChallengeTypes",
            "description": "EIP-712 type definitions."
          },
          "message": {
            "$ref": "#/components/schemas/PciChallengeMessage",
            "description": "EIP-712 message payload."
          }
        },
        "description": "Complete EIP-712 typed data. Pass this object directly to signTypedData —\nconvert message.nonce to BigInt before signing."
      },
      "PciChallengeTypes": {
        "type": "object",
        "required": [
          "Message"
        ],
        "properties": {
          "Message": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PciEip712Field"
            }
          }
        }
      },
      "PciEip712Field": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "PciEncryptedCardDetailsResponse": {
        "type": "object",
        "required": [
          "cardNumber",
          "cvv",
          "expirationDate",
          "iv"
        ],
        "properties": {
          "cardNumber": {
            "type": "string",
            "description": "AES-GCM encrypted card number (PAN), Base64-encoded."
          },
          "cvv": {
            "type": "string",
            "description": "AES-GCM encrypted CVV, Base64-encoded."
          },
          "expirationDate": {
            "type": "string",
            "description": "Card expiration date in plaintext (e.g. \"12/28\")."
          },
          "iv": {
            "type": "string",
            "description": "Base64-encoded AES-GCM initialization vector."
          }
        }
      },
      "PciEncryptedPinResponse": {
        "type": "object",
        "required": [
          "encryptedPin",
          "iv"
        ],
        "properties": {
          "encryptedPin": {
            "type": "string",
            "description": "AES-GCM encrypted PIN (PIN Block 2 format), Base64-encoded."
          },
          "iv": {
            "type": "string",
            "description": "Base64-encoded AES-GCM initialization vector."
          }
        }
      },
      "PciEncryptionKey": {
        "type": "object",
        "required": [
          "id",
          "algorithm",
          "publicKey"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id the client sends back as `keyId` when it wraps with this key."
          },
          "algorithm": {
            "type": "string",
            "description": "OAEP algorithm this key expects. Clients match this when choosing a key."
          },
          "publicKey": {
            "type": "string",
            "description": "Base64-encoded DER (SPKI) RSA public key."
          }
        }
      },
      "PciPublicKeyResponse": {
        "type": "object",
        "required": [
          "publicKey",
          "encryptionKeys"
        ],
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "Base64-encoded DER (SPKI) of the RSA-OAEP SHA-256 public key. This is the\nsame key as the matching `encryptionKeys` entry. Clients wrap the session\nkey with that entry and send its id as `keyId`."
          },
          "encryptionKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PciEncryptionKey"
            },
            "description": "RSA public keys a client may wrap a session key with. The client sends the\nchosen entry's id back as `keyId`."
          }
        }
      },
      "PciSetEncryptedPinRequest": {
        "type": "object",
        "required": [
          "encryptedKey",
          "encryptedPin",
          "iv",
          "keyId"
        ],
        "properties": {
          "encryptedKey": {
            "type": "string",
            "description": "Base64-encoded RSA-OAEP encrypted AES-256 session key."
          },
          "encryptedPin": {
            "type": "string",
            "description": "AES-GCM encrypted PIN in PIN Block 2 format, Base64-encoded."
          },
          "iv": {
            "type": "string",
            "description": "Base64-encoded AES-GCM initialization vector."
          },
          "keyId": {
            "type": "string",
            "description": "Id of the `encryptionKeys` entry that wrapped `encryptedKey`."
          }
        }
      },
      "PhoneVerificationBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "PhoneVerificationSuccess": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "PhoneVerificationTooManyRequests": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Send rate limit exceeded. `error` is `OTP_SEND_COOLDOWN` (another send for\nthis wallet or this phone number within 1 minute) or `OTP_SEND_DAILY_CAP`."
      },
      "PhoneVerificationUnprocessable": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "RefreshRequest": {
        "type": "object",
        "required": [
          "refreshToken"
        ],
        "properties": {
          "refreshToken": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "RefreshSuccess": {
        "type": "object",
        "required": [
          "success",
          "accessToken",
          "refreshToken"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RegisterUserBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Upstream failure creating the KYC profile. `error` is\n`PROFILE_CREATION_FAILED`. The OTP is not consumed, so the request can be\nretried with the same code."
      },
      "RegisterUserConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Conflict on registration. `error` is one of:\n- `USER_ALREADY_EXISTS` - the wallet address is already registered. A wallet\nmay hold at most one user across all partners, so this is also returned\nwhen the address belongs to another partner. Terminal: do not retry.\n- `USER_REGISTRATION_IN_PROGRESS` - another in-flight request is registering this\nsame wallet. Retryable: retrying once it settles either succeeds or\nreturns `USER_ALREADY_EXISTS`."
      },
      "RegisterUserRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "otp": {
            "type": "string",
            "description": "6-digit code from POST /email-verification. Required, and must be 6 characters, if you require email verification for your users. Ignored otherwise; the email is stored without proof of ownership."
          },
          "shareToken": {
            "type": "string",
            "description": "Optional Sumsub share token for reusable KYC"
          }
        }
      },
      "RegisterUserSuccess": {
        "type": "object",
        "required": [
          "userId",
          "accessToken"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          }
        }
      },
      "RequestEmailVerificationInternalError": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "RequestEmailVerificationRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "RequestEmailVerificationServiceUnavailable": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "RequestEmailVerificationSuccess": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "RequestEmailVerificationTooManyRequests": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Send rate limit exceeded. `error` is `OTP_SEND_COOLDOWN` (another send for\nthis wallet or this email within 1 minute) or `OTP_SEND_DAILY_CAP`."
      },
      "RequestEmailVerificationUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "RequestEmailVerificationUnprocessable": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "You do not require email verification. `error` is\n`EMAIL_VERIFICATION_NOT_REQUIRED`."
      },
      "RequestPhoneVerificationRequest": {
        "type": "object",
        "required": [
          "phone"
        ],
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 6,
            "maxLength": 20
          }
        }
      },
      "SOFAnswer": {
        "type": "object",
        "required": [
          "question",
          "answer"
        ],
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        }
      },
      "SOFQuestion": {
        "type": "object",
        "required": [
          "id",
          "question",
          "answers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SetAccountLimitRequest": {
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Daily spending limit in minor units of `currency`.\nUSD, EUR, and GBP use 2 decimal places, so 1000000 is 10,000.00.",
            "examples": [
              1000000
            ]
          },
          "currency": {
            "type": "string",
            "description": "ISO-4217 currency code. Must match the account native currency\n(`nativeCurrency` from `GET /user/account`).",
            "examples": [
              "EUR"
            ]
          }
        },
        "examples": [
          {
            "amount": 1000000,
            "currency": "EUR"
          }
        ]
      },
      "SetCardLimitBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SetCardLimitRequest": {
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Daily spending limit in minor units of `currency`.\nUSD, EUR, and GBP use 2 decimal places, so 1000000 is 10,000.00.",
            "examples": [
              1000000
            ]
          },
          "currency": {
            "type": "string",
            "description": "ISO-4217 currency code. Must match the card native currency\n(`nativeCurrency` on the card from `GET /cards`).",
            "examples": [
              "EUR"
            ]
          }
        },
        "examples": [
          {
            "amount": 1000000,
            "currency": "EUR"
          }
        ]
      },
      "SetUserAccountLimitBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SetUserAccountLimitBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SetUserAccountLimitValidationError"
          },
          {
            "$ref": "#/components/schemas/SetUserAccountLimitBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/SetUserAccountLimitValidationError",
            "business": "#/components/schemas/SetUserAccountLimitBusinessError"
          }
        },
        "description": "Discriminated 400 body for setting account limits. Both variants include\n`kind` so clients can branch on validation vs business failures."
      },
      "SetUserAccountLimitBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Business failure when the requested account limit is not accepted."
      },
      "SetUserAccountLimitValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure when the account limit request cannot be decoded."
      },
      "SubmitSOFAnswersBadGateway": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SubmitSOFAnswersBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SubmitSOFAnswersValidationError"
          },
          {
            "$ref": "#/components/schemas/SubmitSOFAnswersBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/SubmitSOFAnswersValidationError",
            "business": "#/components/schemas/SubmitSOFAnswersBusinessError"
          }
        },
        "description": "Discriminated 400 body for submit answers. Both variants include `kind` so\nclients can branch on validation vs business failures (same pattern as the\naccept terms and auth POST routes)."
      },
      "SubmitSOFAnswersBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          },
          "details": {
            "type": "string"
          }
        },
        "description": "Domain/business failure on submit answers (missing or invalid answers)."
      },
      "SubmitSOFAnswersNotFound": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SubmitSOFAnswersRequest": {
        "type": "object",
        "required": [
          "answers"
        ],
        "properties": {
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SOFAnswer"
            },
            "minItems": 1
          }
        }
      },
      "SubmitSOFAnswersSuccess": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "SubmitSOFAnswersUnauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SubmitSOFAnswersValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure on submit answers (decoder / request constraints)."
      },
      "TermsItem": {
        "type": "object",
        "required": [
          "type",
          "currentVersion",
          "name",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "currentVersion": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ThreeDSChallenge": {
        "type": "object",
        "required": [
          "id",
          "cardId",
          "accountId",
          "amount",
          "currency",
          "decimals",
          "merchant",
          "status",
          "startedAt",
          "expiresAt",
          "decisionAvailable"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "cardId": {
            "$ref": "#/components/schemas/uuid"
          },
          "accountId": {
            "$ref": "#/components/schemas/uuid"
          },
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "description": "Non-negative minor-unit integer encoded as a decimal string."
          },
          "currency": {
            "type": "string",
            "minLength": 1
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 9
          },
          "merchant": {
            "$ref": "#/components/schemas/ThreeDSMerchant"
          },
          "status": {
            "$ref": "#/components/schemas/ThreeDSChallengeStatus"
          },
          "decision": {
            "$ref": "#/components/schemas/ThreeDSDecision"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "decisionAvailable": {
            "type": "boolean"
          }
        }
      },
      "ThreeDSChallengeDetailResponse": {
        "type": "object",
        "required": [
          "serverTime",
          "challenge"
        ],
        "properties": {
          "serverTime": {
            "type": "string",
            "format": "date-time"
          },
          "challenge": {
            "$ref": "#/components/schemas/ThreeDSChallenge"
          }
        }
      },
      "ThreeDSChallengeListResponse": {
        "type": "object",
        "required": [
          "serverTime",
          "data"
        ],
        "properties": {
          "serverTime": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreeDSChallenge"
            }
          }
        }
      },
      "ThreeDSChallengeStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "approved",
          "declined",
          "cancelled",
          "expired",
          "failed"
        ]
      },
      "ThreeDSDecision": {
        "type": "string",
        "enum": [
          "approve",
          "decline"
        ]
      },
      "ThreeDSDecisionChallengeDomain": {
        "type": "object",
        "required": [
          "name",
          "version",
          "chainId"
        ],
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "Gnosis Pay"
            ]
          },
          "version": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "chainId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ThreeDSDecisionChallengeMessage": {
        "type": "object",
        "required": [
          "decision",
          "challengeId",
          "amount",
          "currency",
          "decimals",
          "merchantName",
          "nonce"
        ],
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/ThreeDSDecision"
          },
          "challengeId": {
            "$ref": "#/components/schemas/uuid"
          },
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "description": "Minor-unit integer encoded as a decimal string; EIP-712 type is uint256."
          },
          "currency": {
            "type": "string",
            "minLength": 1
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 9
          },
          "merchantName": {
            "type": "string",
            "minLength": 1
          },
          "nonce": {
            "type": "string",
            "description": "Random uint256 encoded as a decimal string."
          }
        }
      },
      "ThreeDSDecisionChallengeResponse": {
        "type": "object",
        "required": [
          "domain",
          "primaryType",
          "types",
          "message"
        ],
        "properties": {
          "domain": {
            "$ref": "#/components/schemas/ThreeDSDecisionChallengeDomain"
          },
          "primaryType": {
            "type": "string",
            "enum": [
              "ThreeDSDecision"
            ]
          },
          "types": {
            "$ref": "#/components/schemas/ThreeDSDecisionChallengeTypes"
          },
          "message": {
            "$ref": "#/components/schemas/ThreeDSDecisionChallengeMessage"
          }
        },
        "description": "Complete EIP-712 typed data for an OOB 3DS decision."
      },
      "ThreeDSDecisionChallengeTypes": {
        "type": "object",
        "required": [
          "ThreeDSDecision"
        ],
        "properties": {
          "ThreeDSDecision": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PciEip712Field"
            }
          }
        }
      },
      "ThreeDSDecisionRequest": {
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/ThreeDSDecision"
          }
        }
      },
      "ThreeDSMerchant": {
        "type": "object",
        "required": [
          "displayName"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "description": "Exact merchant name supplied by the 3DS provider."
          },
          "country": {
            "type": "string"
          },
          "categoryCode": {
            "type": "string"
          }
        }
      },
      "TokenBalance": {
        "type": "object",
        "required": [
          "token",
          "decimals",
          "spendable",
          "nonSpendable",
          "processingDeposits",
          "maxInstantWithdraw"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Token symbol."
          },
          "decimals": {
            "type": "integer",
            "format": "int32",
            "description": "Number of decimal places for this token."
          },
          "spendable": {
            "type": "string",
            "description": "Spendable balance for this token. Raw bigint string."
          },
          "nonSpendable": {
            "type": "string",
            "description": "Non-spendable balance for this token. Raw bigint string."
          },
          "processingDeposits": {
            "type": "string",
            "description": "Incoming deposits for this token being processed. Raw bigint string."
          },
          "maxInstantWithdraw": {
            "type": "string",
            "description": "Maximum amount of this token that an instant withdrawal would accept right\nnow, in token base units. Already accounts for pending card authorization\nholds and available on-chain backing."
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "UpdatePhoneBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UpdatePhoneValidationError"
          },
          {
            "$ref": "#/components/schemas/UpdatePhoneBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/UpdatePhoneValidationError",
            "business": "#/components/schemas/UpdatePhoneBusinessError"
          }
        },
        "description": "Discriminated 400 body for PATCH/POST /phone. The `kind` field is additive\nand not a breaking change. Clients can keep reading `success` and `error`."
      },
      "UpdatePhoneBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "description": "Domain/business failure on update phone (INVALID_PHONE)."
      },
      "UpdatePhoneConflict": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "UpdatePhoneRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 6,
            "maxLength": 20,
            "description": "Required unless you require phone verification and send `code`."
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]{6}$",
            "description": "One-time SMS code from POST /phone/verification. Required if you require phone verification for your users; omit otherwise."
          }
        }
      },
      "UpdatePhoneSuccess": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "description": "Phone number updated successfully"
      },
      "UpdatePhoneValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        },
        "description": "Validation failure on update phone (decoder / request constraints)."
      },
      "UserDeposit": {
        "type": "object",
        "required": [
          "txHash",
          "amount",
          "currency",
          "status",
          "createdAt",
          "kytBreakdown"
        ],
        "properties": {
          "txHash": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserDepositStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "kytBreakdown": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserDepositKytBreakdown"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserDepositKytBreakdown": {
        "type": "object",
        "required": [
          "result",
          "riskScore",
          "riskTier"
        ],
        "properties": {
          "result": {
            "type": "string"
          },
          "riskScore": {
            "anyOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "null"
              }
            ]
          },
          "riskTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserDepositStatus": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected"
        ]
      },
      "UserKycAddress": {
        "type": "object",
        "required": [
          "id",
          "country",
          "postalCode",
          "city",
          "state",
          "address1",
          "address2"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "country": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "address1": {
            "type": "string"
          },
          "address2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserKycProfile": {
        "type": "object",
        "required": [
          "id",
          "reference",
          "email",
          "status",
          "tenantId",
          "details"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "reference": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserKycProfileStatus"
          },
          "tenantId": {
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserKycProfileDetails"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserKycProfileDetails": {
        "type": "object",
        "required": [
          "fullName",
          "phoneNumber",
          "dateOfBirth",
          "nationality",
          "countryOfResidence",
          "countryOfBirth",
          "taxIdNumber",
          "gender",
          "addresses"
        ],
        "properties": {
          "fullName": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date-time"
          },
          "nationality": {
            "type": "string"
          },
          "countryOfResidence": {
            "type": "string"
          },
          "countryOfBirth": {
            "type": "string"
          },
          "taxIdNumber": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserKycAddress"
            }
          }
        }
      },
      "UserKycProfileStatus": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "blocked",
          "rejected",
          "requires_action",
          "resubmission_requested"
        ]
      },
      "UserStatementBadRequestBody": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UserStatementValidationError"
          },
          {
            "$ref": "#/components/schemas/UserStatementBusinessError"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "validation": "#/components/schemas/UserStatementValidationError",
            "business": "#/components/schemas/UserStatementBusinessError"
          }
        }
      },
      "UserStatementBillingDetails": {
        "type": "object",
        "required": [
          "billingAmount",
          "billingCurrency"
        ],
        "properties": {
          "billingAmount": {
            "type": "string"
          },
          "billingCurrency": {
            "$ref": "#/components/schemas/UserStatementCurrencyMetadata"
          }
        }
      },
      "UserStatementBusinessError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "business"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "UserStatementCardTransaction": {
        "type": "object",
        "required": [
          "type",
          "id",
          "status",
          "amount",
          "currency",
          "decimals",
          "originalAmount",
          "originalCurrency",
          "originalDecimals",
          "isCredit",
          "createdAt",
          "updatedAt",
          "description",
          "authorizationId",
          "mcc",
          "authorizationCode",
          "merchant",
          "entryMode",
          "billing",
          "transactionCurrency",
          "cardId",
          "cardToken",
          "clearedAt",
          "isPending",
          "kind",
          "transactions",
          "declineReason",
          "wallet"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "card_transaction"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatementCardTransactionStatus"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "format": "int32"
          },
          "originalAmount": {
            "type": "string"
          },
          "originalCurrency": {
            "type": "string"
          },
          "originalDecimals": {
            "type": "integer",
            "format": "int32"
          },
          "isCredit": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "authorizationId": {
            "type": "integer",
            "format": "int64"
          },
          "mcc": {
            "type": "string"
          },
          "authorizationCode": {
            "type": "string"
          },
          "merchant": {
            "$ref": "#/components/schemas/UserStatementMerchantDetails"
          },
          "entryMode": {
            "type": "string"
          },
          "billing": {
            "$ref": "#/components/schemas/UserStatementBillingDetails"
          },
          "transactionCurrency": {
            "$ref": "#/components/schemas/UserStatementCurrencyMetadata"
          },
          "cardId": {
            "$ref": "#/components/schemas/uuid"
          },
          "cardToken": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clearedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "isPending": {
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/UserStatementTransactionKind"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserStatementTransactionExecutionDetail"
            }
          },
          "declineReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserStatementDeclineReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserStatementWallet"
              },
              {
                "type": "null"
              }
            ]
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichment"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserStatementCardTransactionStatus": {
        "type": "string",
        "enum": [
          "pending",
          "settled",
          "cancelled",
          "declined"
        ]
      },
      "UserStatementCurrencyMetadata": {
        "type": "object",
        "required": [
          "symbol",
          "code",
          "decimals",
          "name"
        ],
        "properties": {
          "symbol": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserStatementDeclineReason": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "UserStatementDeposit": {
        "type": "object",
        "required": [
          "type",
          "id",
          "status",
          "amount",
          "currency",
          "decimals",
          "fiatCurrency",
          "isCredit",
          "createdAt",
          "description",
          "txHash",
          "fromAddress",
          "chainId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "deposit"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatementDepositStatus"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "format": "int32"
          },
          "fiatCurrency": {
            "type": "string"
          },
          "isCredit": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "txHash": {
            "type": "string"
          },
          "fromAddress": {
            "type": "string"
          },
          "chainId": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UserStatementDepositStatus": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected"
        ]
      },
      "UserStatementItem": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UserStatementCardTransaction"
          },
          {
            "$ref": "#/components/schemas/UserStatementDeposit"
          },
          {
            "$ref": "#/components/schemas/UserStatementWithdrawal"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "card_transaction": "#/components/schemas/UserStatementCardTransaction",
            "deposit": "#/components/schemas/UserStatementDeposit",
            "withdrawal": "#/components/schemas/UserStatementWithdrawal"
          }
        }
      },
      "UserStatementMerchantDetails": {
        "type": "object",
        "required": [
          "name",
          "city",
          "country",
          "categoryCode"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string"
          },
          "categoryCode": {
            "type": "string"
          }
        }
      },
      "UserStatementPagination": {
        "type": "object",
        "required": [
          "nextCursor",
          "hasNext"
        ],
        "properties": {
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasNext": {
            "type": "boolean"
          }
        }
      },
      "UserStatementTransactionExecutionDetail": {
        "type": "object",
        "required": [
          "status",
          "to",
          "value",
          "data",
          "hash"
        ],
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserStatementTransactionKind": {
        "type": "string",
        "enum": [
          "Payment",
          "Refund",
          "Reversal"
        ]
      },
      "UserStatementValidationError": {
        "type": "object",
        "required": [
          "kind",
          "success",
          "error"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "validation"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ValidationErrorDetail"
          }
        }
      },
      "UserStatementWallet": {
        "type": "object",
        "required": [
          "provider",
          "deviceBrand",
          "deviceModel",
          "deviceType",
          "deviceName"
        ],
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/UserStatementWalletProvider"
          },
          "deviceBrand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deviceModel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deviceType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deviceName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserStatementWalletProvider": {
        "type": "string",
        "enum": [
          "apple_pay",
          "google_pay",
          "samsung_pay",
          "other"
        ]
      },
      "UserStatementWithdrawal": {
        "type": "object",
        "required": [
          "type",
          "id",
          "status",
          "amount",
          "currency",
          "decimals",
          "fiatCurrency",
          "isCredit",
          "createdAt",
          "description",
          "txHash",
          "toAddress",
          "chainId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "withdrawal"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatementWithdrawalStatus"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "format": "int32"
          },
          "fiatCurrency": {
            "type": "string"
          },
          "isCredit": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "txHash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "toAddress": {
            "type": "string"
          },
          "chainId": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UserStatementWithdrawalStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "completed",
          "failed"
        ]
      },
      "UserTermsStatus": {
        "type": "object",
        "required": [
          "type",
          "currentVersion",
          "name",
          "url",
          "accepted",
          "acceptedVersion",
          "acceptedAt"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "currentVersion": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted": {
            "type": "boolean"
          },
          "acceptedVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserTransactionEnrichment": {
        "type": "object",
        "required": [
          "status",
          "merchant",
          "shop"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/UserTransactionEnrichmentStatus"
          },
          "merchant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichmentMerchant"
              },
              {
                "type": "null"
              }
            ]
          },
          "shop": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichmentShop"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserTransactionEnrichmentAddress": {
        "type": "object",
        "required": [
          "street",
          "city",
          "zip",
          "country",
          "areas"
        ],
        "properties": {
          "street": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "areas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserTransactionEnrichmentArea"
            }
          }
        }
      },
      "UserTransactionEnrichmentArea": {
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "UserTransactionEnrichmentCategory": {
        "type": "object",
        "required": [
          "name",
          "logoUrl"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "logoUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserTransactionEnrichmentCoordinates": {
        "type": "object",
        "required": [
          "latitude",
          "longitude",
          "accuracy",
          "zoom"
        ],
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "accuracy": {
            "type": "string"
          },
          "zoom": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UserTransactionEnrichmentMerchant": {
        "type": "object",
        "required": [
          "id",
          "name",
          "logoUrl"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "name": {
            "type": "string"
          },
          "logoUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserTransactionEnrichmentShop": {
        "type": "object",
        "required": [
          "id",
          "type",
          "category",
          "tags",
          "address",
          "coordinates",
          "url",
          "googlePlaceId",
          "phoneNumber"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuid"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichmentCategory"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichmentAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "coordinates": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserTransactionEnrichmentCoordinates"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "googlePlaceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phoneNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UserTransactionEnrichmentStatus": {
        "type": "string",
        "enum": [
          "matched",
          "unmatched",
          "pending",
          "unavailable"
        ]
      },
      "UserWithdrawal": {
        "type": "object",
        "required": [
          "txHash",
          "amount",
          "currency",
          "status",
          "createdAt"
        ],
        "properties": {
          "txHash": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserWithdrawalStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UserWithdrawalStatus": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "failed"
        ]
      },
      "ValidationErrorDetail": {
        "type": "object",
        "required": [
          "name",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "ValidationError"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "VerifySiweRequest": {
        "type": "object",
        "required": [
          "address",
          "signature",
          "message"
        ],
        "properties": {
          "address": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "signature": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "VerifySiweSuccess": {
        "type": "object",
        "required": [
          "success",
          "accessToken",
          "refreshToken"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "uuid": {
        "type": "string",
        "format": "uuid"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "Bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://core.prod.gnosispay.com/user-api",
      "description": "Production",
      "variables": {}
    },
    {
      "url": "https://core.sandbox.gnosispay.in/user-api",
      "description": "Sandbox",
      "variables": {}
    }
  ]
}
