{
  "openapi": "3.1.0",
  "info": {
    "title": "API reference",
    "summary": "\n### Intro\n\nLeanX API facilitates fast payments via bank transfers to specified beneficiaries.\n    ",
    "description": "",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.leanxtest.me",
      "description": "Leanx Test server"
    },
    {
      "url": "https://api.leanx.me",
      "description": "Leanx Production server"
    }
  ],
  "paths": {
    "/v2/debug": {
      "get": {
        "tags": [
          "v2-utilities"
        ],
        "summary": "Debug Get",
        "description": "Echo the request headers the API received, excluding internal `x-` headers. Use it to check that your requests reach the API. It does not report which corridors or features are enabled for your account.",
        "operationId": "debug_get_v2_debug_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Debug Get V2 Debug Get"
                },
                "example": {
                  "host": "api.leanxtest.me",
                  "user-agent": "curl/8.5.0",
                  "accept": "*/*"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/payment": {
      "post": {
        "tags": [
          "v2-quotes-payments"
        ],
        "summary": "Payment",
        "description": "Execute payment to beneficiary with specified bank details.",
        "operationId": "payment_v2_payment_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Payment"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseLive"
                }
              }
            }
          },
          "400": {
            "description": "The payment was not created. Fix the cause and resend with the same `external_id`; for an expired or used quote, request a fresh quote first. A duplicate `external_id` means a payment with it already exists: look it up with `GET /v2/payments/{external_id}?external=true` instead of resending.",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Duplicate `external_id` field detected.",
                    "value": {
                      "detail": "Duplicate `external_id` field detected."
                    }
                  },
                  "example2": {
                    "summary": "Quote already used",
                    "value": {
                      "detail": "Quote already used"
                    }
                  },
                  "example3": {
                    "summary": "Quote has expired",
                    "value": {
                      "detail": "Quote has expired"
                    }
                  },
                  "example4": {
                    "summary": "Insufficient balance detected (0.0)",
                    "value": {
                      "detail": "Insufficient balance detected (0.0)"
                    }
                  },
                  "example5": {
                    "summary": "Mismatching currency from quote (USD) and payment (AED)",
                    "value": {
                      "detail": "Mismatching currency from quote (USD) and payment (AED)"
                    }
                  },
                  "example6": {
                    "summary": "Payment `amount_destination` lower than minimum amount for selected quote: 100.0 INR",
                    "value": {
                      "detail": "Payment `amount_destination` lower than minimum amount for selected quote: 100.0 INR"
                    }
                  },
                  "example7": {
                    "summary": "Payment `amount_destination` greater than maximum amount for selected quote: 100000.0 INR",
                    "value": {
                      "detail": "Payment `amount_destination` greater than maximum amount for selected quote: 100000.0 INR"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/quote": {
      "post": {
        "tags": [
          "v2-quotes-payments"
        ],
        "summary": "Quote",
        "description": "Create quote for use with payment",
        "operationId": "quote_v2_quote_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/QuoteRequestV2"
                  },
                  {
                    "$ref": "#/components/schemas/QuoteRequestDestination"
                  }
                ],
                "title": "Quote request",
                "description": "Send `amount` to fix the source amount, or `amount_destination` to fix the payout amount."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Unable to fetch quote (min/max amount requirements)",
                    "value": {
                      "detail": "Unable to fetch quote (min/max amount requirements)"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Could not obtain quote.",
                    "value": {
                      "detail": "Could not obtain quote."
                    }
                  },
                  "example2": {
                    "summary": "Could not fetch quote at this time.",
                    "value": {
                      "detail": "Could not fetch quote at this time."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/quote/{id}": {
      "get": {
        "tags": [
          "v2-quotes-payments"
        ],
        "summary": "Quote Get",
        "description": "Get info about previously created Quote",
        "operationId": "quote_get_v2_quote__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "No quote with this id for your account, or it has expired.",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Not found (or expired)",
                    "value": {
                      "detail": "Not found (or expired)"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/payments/{id}": {
      "get": {
        "tags": [
          "v2-quotes-payments"
        ],
        "summary": "Payment Status",
        "description": "Get info about previously executed payment",
        "operationId": "payment_status_v2_payments__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Id"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry"
            }
          },
          {
            "name": "external",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true, the `id` supplied is `external_id` from the original payment request.",
              "default": false,
              "title": "External"
            },
            "description": "When true, the `id` supplied is `external_id` from the original payment request."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOrderInfoLive"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Path parameter `id` must be UUID when external=false",
                    "value": {
                      "detail": "Path parameter `id` must be UUID when external=false"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "No payment with this id for your account in the given `country`. A lookup in the wrong `country` returns the same 404 as an unknown id. With `external=true`, a 404 means no payment has been created with this `external_id`, which is the expected answer to a pre-send duplicate check.",
            "content": {
              "application/json": {
                "examples": {
                  "example1": {
                    "summary": "Not Found",
                    "value": {
                      "detail": "Not Found"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/payments": {
      "get": {
        "tags": [
          "v2-quotes-payments"
        ],
        "summary": "Payment History",
        "description": "List payments",
        "operationId": "payment_history_v2_payments_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 0,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "sorting_order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortingOrder",
              "description": "Sort direction on `timestamp`. Defaults to `desc` (newest first). Note `GET /v3/payments` names this `direction` and defaults to `asc`.",
              "default": "desc"
            },
            "description": "Sort direction on `timestamp`. Defaults to `desc` (newest first). Note `GET /v3/payments` names this `direction` and defaults to `asc`."
          },
          {
            "name": "start_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Ts"
            }
          },
          {
            "name": "end_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Ts"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentOrderState"
                  },
                  "maxItems": 9
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "search_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SearchType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search Type"
            }
          },
          {
            "name": "search_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search Term"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentOrderInfoLive"
                  },
                  "title": "Response Payment History V2 Payments Get"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/{report_type}": {
      "post": {
        "tags": [
          "v2-reports"
        ],
        "summary": "Report Create",
        "description": "Request an asynchronous report generation.\n\nCreates a report file record with status ``pending`` and enqueues a\nbackground job that builds the report from the supplied parameters\nand uploads it to storage.\n\nCurrently only the ``payout`` report type is supported.",
        "operationId": "report_create_v2_reports__report_type__post",
        "parameters": [
          {
            "name": "report_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ClientReportType"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientPayoutReportParams",
                "description": "Report generation parameters"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/list/": {
      "put": {
        "tags": [
          "v2-reports"
        ],
        "summary": "Report List",
        "description": "List generated reports, newest first.\n\nReturns only reports generated by the caller. Results can be\nnarrowed with the optional body filter (report type, country and\na ``created_at`` time range).",
        "operationId": "report_list_v2_reports_list__put",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 0,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ClientReportListFilter"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Report list filter",
                "title": "Filter By"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportResponse"
                  },
                  "title": "Response Report List V2 Reports List  Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/{id}": {
      "get": {
        "tags": [
          "v2-reports"
        ],
        "summary": "Report Get",
        "description": "Fetch a single generated report by id.\n\nOnly reports generated by the caller are visible. Use this to poll\n``file_status`` after requesting a report: ``pending`` and\n``processing`` mean the report is still being built, ``success``\nmeans it is ready for download and ``fail`` means generation failed.",
        "operationId": "report_get_v2_reports__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/{report_type}/latest": {
      "get": {
        "tags": [
          "v2-reports"
        ],
        "summary": "Report Latest",
        "description": "Fetch the caller's most recently created report of a given type.",
        "operationId": "report_latest_v2_reports__report_type__latest_get",
        "parameters": [
          {
            "name": "report_type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ClientReportType"
            }
          },
          {
            "name": "auto_generated",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Auto Generated"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/{id}/presigned-url": {
      "get": {
        "tags": [
          "v2-reports"
        ],
        "summary": "Report Presigned Url",
        "description": "Get a temporary download URL for a successfully generated report.",
        "operationId": "report_presigned_url_v2_reports__id__presigned_url_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportPresignedUrlResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/balance": {
      "get": {
        "tags": [
          "v2-balances"
        ],
        "summary": "Balance Info",
        "description": "Get balance info",
        "operationId": "balance_info_v2_balance_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry",
              "description": "Destination country"
            },
            "description": "Destination country"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/validate_account": {
      "post": {
        "tags": [
          "v2-validation"
        ],
        "summary": "Validate Account",
        "description": "Check that a beneficiary bank account exists and, when a name is supplied, that it matches the account holder. India only (`country` must be `IND`).",
        "operationId": "validate_account_v2_validate_account_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateBeneficiaryRequest",
                "description": "Beneficiary account details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ValidateBeneficiaryResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Validate Account V2 Validate Account Post"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before retrying this request.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/validate_bank": {
      "post": {
        "tags": [
          "v2-validation"
        ],
        "summary": "Validate Bank",
        "description": "Look up an Indian bank branch by its IFSC code. Returns the bank and branch details and whether the branch accepts NEFT, IMPS and RTGS. This is a directory lookup: it does not check a beneficiary account or send any funds (use `POST /v2/validate_account` to check an account). India only; any other `country` returns 400. Lookups are rate-limited per account.",
        "operationId": "validate_bank_v2_validate_bank_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateBankRequest",
                "description": "IFSC code to look up."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ValidateBankResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Validate Bank V2 Validate Bank Post"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/events": {
      "get": {
        "tags": [
          "v2-events"
        ],
        "summary": "Events",
        "description": "Stream payment events such as payment status or quote responses",
        "operationId": "events_v2_events_get",
        "responses": {
          "200": {
            "description": "Server-sent event stream of your payments. Each event has an `event` name and a JSON `data` line: `payment` carries the full payment (the same shape as `GET /v2/payments/{id}`); `payment-update` carries only its id, timestamp and new status.\n\nThe stream starts when you connect. Events carry no `id`, so there is no `Last-Event-ID` resume, and events sent while you were disconnected are not replayed: after reconnecting, fetch the payments you are waiting on with `GET /v2/payments/{id}`. Lines starting with `:` are comments (a ping every 30 seconds keeps the connection open) and carry no data. There is no filtering: you receive events for every payment on your account.\n\nThe `Authorization` header is required, so use a server-side SSE client; the browser `EventSource` API cannot send it.",
            "content": {
              "text/event-stream": {
                "itemSchema": {
                  "type": "object",
                  "properties": {
                    "event": {
                      "type": "string",
                      "enum": [
                        "payment",
                        "payment-update"
                      ],
                      "description": "Event type; selects the `data` shape."
                    },
                    "data": {
                      "type": "string",
                      "contentMediaType": "application/json",
                      "contentSchema": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PaymentOrderInfoLive"
                          },
                          {
                            "properties": {
                              "id": {
                                "description": "Payment id.",
                                "format": "uuid",
                                "title": "Id",
                                "type": "string"
                              },
                              "timestamp": {
                                "description": "When the status changed (UTC).",
                                "format": "date-time",
                                "title": "Timestamp",
                                "type": "string"
                              },
                              "status": {
                                "$ref": "#/components/schemas/PaymentOrderState",
                                "description": "The new payment state."
                              }
                            },
                            "required": [
                              "id",
                              "timestamp",
                              "status"
                            ],
                            "title": "PaymentStatusChange",
                            "type": "object"
                          }
                        ]
                      }
                    }
                  }
                },
                "examples": {
                  "payment_update": {
                    "summary": "payment-update: status changed",
                    "value": {
                      "event": "payment-update",
                      "data": "{\"id\":\"00000000-0000-4000-A000-000000000000\",\"timestamp\":\"2024-12-01T01:05:00Z\",\"status\":\"succeeded\"}"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "429": {
            "description": "Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/v3/info/payment_banks": {
      "get": {
        "tags": [
          "v3-utilities"
        ],
        "summary": "Banks",
        "description": "Banks reachable in this corridor. `swift_code` is what `payment_details.bank_code` carries, or `iban_code` for an institution with no BIC.",
        "operationId": "banks_v3_info_payment_banks_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry",
              "description": "Payment country"
            },
            "description": "Payment country"
          },
          {
            "name": "payment_method",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PaymentMethod"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Restrict to banks reachable on this rail",
              "title": "Payment Method"
            },
            "description": "Restrict to banks reachable on this rail"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankList"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/quote": {
      "post": {
        "tags": [
          "v3-quotes-payments"
        ],
        "summary": "Quote",
        "description": "Create quote for use with payment.\n\n`country` is also accepted as `payment_country`, the name `POST /v3/payment` uses for it.\n\n`country`, `payment_type` and `payment_method` are independent enums, but only 4 of the 128 combinations they can spell between them can be paid end to end:\n\n| Destination | Payment type | Payment method |\n|---|---|---|\n| India (`IND`) | `C2C` | `bank_transfer`, `instant_payment` |\n| Pakistan (`PAK`) | `C2C` | `bank_transfer` |\n| Nigeria (`NGA`) | `C2C` | `bank_transfer` |\n\n`B2B`, `B2C` and `C2B` have no payable combination on any corridor today, and `BGD`, `EGY`, `NPL`, `PHL` and `VNM` cannot be paid at all. Anything outside the table either fails the quote or, where `POST /v3/payment` still accepts the request, fails before the payment completes — do not build against it.\n\nWhether a listed combination is enabled for *your* account is a separate question, answered by the provider routes configured for it.",
        "operationId": "quote_v3_quote_post",
        "parameters": [
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 120,
              "minimum": 10,
              "default": 30,
              "title": "Timeout"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/quotes/{id}": {
      "get": {
        "tags": [
          "v3-quotes-payments"
        ],
        "summary": "Quote Get",
        "description": "Fetch quote info",
        "operationId": "quote_get_v3_quotes__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Quote id",
              "title": "Id"
            },
            "description": "Quote id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/payment": {
      "post": {
        "tags": [
          "v3-quotes-payments"
        ],
        "summary": "Payment",
        "description": "Execute payment to beneficiary with specified bank details.",
        "operationId": "payment_v3_payment_post",
        "parameters": [
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 120,
              "minimum": 10,
              "description": "How long to wait for the payment to be accepted. When the wait runs out the payment is failed with status reason `Submit timeout` and is never submitted to a provider.",
              "default": 30,
              "title": "Timeout"
            },
            "description": "How long to wait for the payment to be accepted. When the wait runs out the payment is failed with status reason `Submit timeout` and is never submitted to a provider."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentOrder"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/payments/{id}": {
      "get": {
        "tags": [
          "v3-quotes-payments"
        ],
        "summary": "Payment Get",
        "description": "Get info about previously executed payment",
        "operationId": "payment_get_v3_payments__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "description": "Payment id",
              "title": "Id"
            },
            "description": "Payment id"
          },
          {
            "name": "external",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true, the `id` supplied is `external_id` from the original payment request.",
              "default": false,
              "title": "External"
            },
            "description": "When true, the `id` supplied is `external_id` from the original payment request."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentInfo"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/payments": {
      "get": {
        "tags": [
          "v3-quotes-payments"
        ],
        "summary": "Payments History",
        "description": "History of executed payments. Returns up to 7 days worth of data",
        "operationId": "payments_history_v3_payments_get",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start timestamp (must be lower than `end`, max timespan 7 days)",
              "title": "Start"
            },
            "description": "Start timestamp (must be lower than `end`, max timespan 7 days)"
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End timestamp (must be greater than `start`, max timespan 7 days)",
              "title": "End"
            },
            "description": "End timestamp (must be greater than `start`, max timespan 7 days)"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentOrderState"
                  },
                  "maxItems": 9
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortingOrder",
              "description": "Sort direction on `timestamp`. Defaults to `asc` (oldest first). Note `GET /v2/payments` names this `sorting_order` and defaults to `desc`.",
              "default": "asc"
            },
            "description": "Sort direction on `timestamp`. Defaults to `asc` (oldest first). Note `GET /v2/payments` names this `sorting_order` and defaults to `desc`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/jsonl": {
                "itemSchema": {
                  "$ref": "#/components/schemas/PaymentInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/balance": {
      "get": {
        "tags": [
          "v3-balances"
        ],
        "summary": "Get Balance",
        "description": "Balance info",
        "operationId": "get_balance_v3_balance_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiCountry",
              "description": "Payment country"
            },
            "description": "Payment country"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceInfo"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events": {
      "get": {
        "tags": [
          "v3-events"
        ],
        "summary": "Get Events",
        "description": "Stream payment events such as payment status or quote responses",
        "operationId": "get_events_v3_events_get",
        "parameters": [
          {
            "name": "last-event-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "description": "SSE Last-Event-ID: the UUID7 id of the last event the client received. On reconnect, streaming resumes from that event's timestamp (browser EventSource sends this automatically). Replay is best-effort — only events still retained in the stream can be re-delivered, and same-millisecond events may be re-sent, so treat the SSE id as an idempotency key.",
              "title": "Last-Event-Id"
            },
            "description": "SSE Last-Event-ID: the UUID7 id of the last event the client received. On reconnect, streaming resumes from that event's timestamp (browser EventSource sends this automatically). Replay is best-effort — only events still retained in the stream can be re-delivered, and same-millisecond events may be re-sent, so treat the SSE id as an idempotency key."
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent event stream (`text/event-stream`). Each event carries an `event` name, a UUID7 `id` (echo it back via `Last-Event-ID` to resume), and a `data` line holding JSON: a `PaymentResponse` for `payment` events and a `PaymentError` for `payment-error` events.",
            "content": {
              "text/event-stream": {
                "itemSchema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "string",
                      "contentMediaType": "application/json",
                      "contentSchema": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PaymentResponse"
                          },
                          {
                            "properties": {
                              "id": {
                                "format": "uuid",
                                "title": "Id",
                                "type": "string"
                              },
                              "external_id": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "title": "External Id"
                              },
                              "detail": {
                                "title": "Detail",
                                "type": "string"
                              },
                              "status_code": {
                                "title": "Status Code",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "id",
                              "external_id",
                              "detail",
                              "status_code"
                            ],
                            "title": "PaymentError",
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "event": {
                      "type": "string",
                      "enum": [
                        "payment",
                        "payment-error"
                      ],
                      "description": "Event type / data payload variant"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "UUID7 event id (SSE Last-Event-ID cursor)"
                    },
                    "retry": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "examples": {
                  "payment_queued": {
                    "summary": "payment — accepted (queued)",
                    "value": {
                      "event": "payment",
                      "id": "019f8da0-6a1b-7c4e-8f21-0a1b2c3d4e5f",
                      "data": "{\"id\":\"019f8da0-591c-771e-b353-cdc75173dccc\",\"external_id\":\"29fc8b3dc79442c3\",\"timestamp\":\"2026-07-23T06:18:43.873162Z\",\"status\":\"queued\",\"msg\":\"Queued\",\"quote\":\"019f8da0-58d4-760a-8dcf-4a221003a022\"}"
                    }
                  },
                  "payment_processing": {
                    "summary": "payment — submitted to provider (processing)",
                    "value": {
                      "event": "payment",
                      "id": "019f8df6-6c12-7705-a34b-f2f812bd9785",
                      "data": "{\"id\":\"019f8df6-5ad5-7926-882f-f1995d89b2aa\",\"external_id\":\"8d6d0e0a7afb4c79\",\"timestamp\":\"2026-07-23T07:52:44.815311Z\",\"status\":\"processing\",\"msg\":\"OK\",\"quote\":\"019f8df6-5a86-7a5d-a643-34d25428f0f1\",\"amount\":101.0,\"currency\":\"INR\"}"
                    }
                  },
                  "payment_error": {
                    "summary": "payment-error — rejected (quote not found)",
                    "value": {
                      "event": "payment-error",
                      "id": "019f8da0-7b2c-7d5f-9a32-1b2c3d4e5f60",
                      "data": "{\"id\":\"019f8da0-591c-771e-b353-cdc75173dccc\",\"external_id\":\"29fc8b3dc79442c3\",\"detail\":\"Quote 019f8da0-58d4-760a-8dcf-4a221003a022 not found\",\"status_code\":400}"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/reports/payout": {
      "post": {
        "tags": [
          "v3-reports"
        ],
        "summary": "Payout Report",
        "description": "Payout report as CSV, one row per payment in the window, streamed as it is read.\n\n`start` and `end` bound the window on payment creation time, and `country` picks the corridor; both are required. `status` narrows to the listed statuses. `ids` narrows to specific payments — set `external` to supply the `external_id` values from the original payment requests instead of LeanX ids. An id that matches nothing still gets a row carrying just that id, so the report accounts for every id sent.\n\nBeneficiary account validation is not part of this report.",
        "operationId": "payout_report_v3_reports_payout_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutReportFilter",
                "description": "Report filter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/reports/statement": {
      "post": {
        "tags": [
          "v3-reports"
        ],
        "summary": "Statement Report",
        "description": "Statement report as CSV, one row per day from `date_from` to `date_to` (both inclusive) that has ledger activity in `country`.\n\n`timezone` defines where a day starts; omit it for UTC. Balance columns are named after the organization's settlement currency.",
        "operationId": "statement_report_v3_reports_statement_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatementReportFilter",
                "description": "Report filter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/reports/wallet": {
      "post": {
        "tags": [
          "v3-reports"
        ],
        "summary": "Wallet Report",
        "description": "Wallet report as CSV, one row per ledger entry in `api_country`, streamed as it is read. v2 and v3 entries alike, none hidden.\n\n`timestamp` bounds the window, both ends inclusive. `external_id` and `linked_txn` come from the payment in `txn`: `linked_txn` is the payment a reversal retry was made for. `timezone` sets the zone timestamps are written in; omit it for UTC.",
        "operationId": "wallet_report_v3_reports_wallet_post",
        "parameters": [
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SupportedTimeZone"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Timezone"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LedgerDataPublicFilterBy",
                "description": "Report filter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/validate_account": {
      "post": {
        "tags": [
          "v3-validation"
        ],
        "summary": "Validate Account",
        "description": "Check that a beneficiary bank account exists and, when a name is supplied, that it matches the account holder. India only (`country` must be `IND`).",
        "operationId": "validate_account_v3_validate_account_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountValidationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountValidationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad data in the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "One or more request fields are invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before retrying this request.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v3/debug": {
      "get": {
        "tags": [
          "v3-utilities"
        ],
        "summary": "Debug",
        "description": "Echo back the request headers the API received",
        "operationId": "debug_v3_debug_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Debug V3 Debug Get"
                }
              }
            }
          },
          "401": {
            "description": "Access token not valid or expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Access token missing permissions to access the resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error (contact administrator)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiCountry": {
        "type": "string",
        "enum": [
          "BGD",
          "IND",
          "PAK",
          "PHL",
          "NPL",
          "EGY",
          "VNM",
          "NGA"
        ],
        "title": "ApiCountry"
      },
      "BadRequestError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "BadRequestError"
      },
      "BalanceInfoResponse": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The destination country's local currency; `balance` is in it."
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "What you can pay out to this country right now, in `currency`. Check it before a payout."
          },
          "reserved_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserved Balance",
            "description": "Held by payments still in progress, in `wallet_currency`. `balance` and `wallet_balance` already exclude it."
          },
          "wallet_currency": {
            "type": "string",
            "title": "Wallet Currency",
            "description": "Your settlement wallet currency: `USD`, `USDT` or `USDC`.",
            "default": "USDT"
          },
          "wallet_currency_rate": {
            "type": "number",
            "title": "Wallet Currency Rate",
            "description": "Rate from `wallet_currency` to `currency`.",
            "default": 0
          },
          "wallet_balance": {
            "type": "number",
            "title": "Wallet Balance",
            "description": "The same funds as `balance`, in `wallet_currency`, including any credit line.",
            "default": 0
          },
          "deals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DealBalanceInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your rate-lock deal position for this corridor, in `wallet_currency`. Absent when you have no active deals."
          }
        },
        "type": "object",
        "required": [
          "currency",
          "balance"
        ],
        "title": "BalanceInfoResponse",
        "examples": [
          {
            "balance": 848879.12,
            "currency": "INR",
            "reserved_balance": 250,
            "wallet_balance": 10000,
            "wallet_currency": "USDT",
            "wallet_currency_rate": 84.887912
          }
        ]
      },
      "BangladeshPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "BGD",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "beneficiary_account_type": {
            "$ref": "#/components/schemas/BankAccountType",
            "description": "Bank account type",
            "default": "savings"
          },
          "bank_branch_code": {
            "type": "string",
            "title": "Bank Branch Code",
            "description": "SWIFT / BIC code of the beneficiary bank branch"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "bank_branch_code",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "BangladeshPayment",
        "examples": [
          {
            "amount": 100,
            "bank_branch_code": "ABBLBDDH201",
            "bank_name": "Bangladesh Bank",
            "beneficiary_account_number": "9934572443993487",
            "beneficiary_account_type": "savings",
            "beneficiary_address": "Main Road",
            "beneficiary_city": "Dhaka",
            "beneficiary_email": "bashir.ahmed@domain.com",
            "beneficiary_mobile": "+8801700000000",
            "beneficiary_name": "Bashir Ahmed",
            "country": "BGD",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "BankAccountStatus": {
        "type": "string",
        "enum": [
          "valid",
          "invalid",
          "nre",
          "pending"
        ],
        "title": "BankAccountStatus",
        "description": "Result of a beneficiary account check.",
        "x-enumDescriptions": {
          "invalid": "The account was not found, or is blocked, closed or inactive, or the IFSC code is invalid. Do not send a payment to it.",
          "nre": "The account exists and is an Indian NRE (Non-Resident External) account. It passes validation; payments to it are handled under NRE rules.",
          "pending": "The check is still running at the provider. This is not a failure: check again later.",
          "valid": "The account exists and is active."
        }
      },
      "BankAccountType": {
        "type": "string",
        "enum": [
          "savings",
          "current"
        ],
        "title": "BankAccountType"
      },
      "BatchJobItemStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "success",
          "fail"
        ],
        "title": "BatchJobItemStatus"
      },
      "ClientPayoutReportParams": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry"
          },
          "sorting_order": {
            "$ref": "#/components/schemas/SortingOrder",
            "default": "desc"
          },
          "start_ts": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Ts"
          },
          "end_ts": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Ts"
          },
          "status": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PaymentOrderState"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Ids"
          },
          "external": {
            "type": "boolean",
            "title": "External",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "country"
        ],
        "title": "ClientPayoutReportParams",
        "description": "Payout report parameters available to API clients.\n\nMirrors the client-facing parameters of ``stream_order_results`` so a\ngenerated report can be reproduced exactly from the persisted params."
      },
      "ClientReportListFilter": {
        "properties": {
          "report_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientReportType"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiCountry"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_ts": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Ts"
          },
          "end_ts": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Ts"
          }
        },
        "type": "object",
        "title": "ClientReportListFilter"
      },
      "ClientReportType": {
        "type": "string",
        "enum": [
          "payout"
        ],
        "title": "ClientReportType",
        "description": "Report types API clients can generate and filter by."
      },
      "CurrencyCode": {
        "type": "string",
        "enum": [
          "BHD",
          "EUR",
          "KWD",
          "MYR",
          "OMR",
          "QAR",
          "SAR",
          "SGD",
          "TRY",
          "AED",
          "USD",
          "INR",
          "PHP",
          "EGP",
          "VND",
          "PKR",
          "NGN"
        ],
        "title": "CurrencyCode"
      },
      "DealBalanceInfo": {
        "properties": {
          "committed": {
            "type": "number",
            "title": "Committed",
            "description": "Total approved amount across active deals in this corridor",
            "default": 0
          },
          "settled": {
            "type": "number",
            "title": "Settled",
            "description": "Of `committed`, how much has already been deducted from the ledger by payments that settled against those deals. The difference is what is still withheld from the spendable balance -- the settled part is not withheld again",
            "default": 0
          }
        },
        "type": "object",
        "title": "DealBalanceInfo",
        "description": "The deal position for one corridor, in the wallet currency.\n\nSummed over the organization's active deals there. Lives here because\n`BalanceInfoResponse` carries it and the v3 models import this module."
      },
      "DestinationCurrency": {
        "type": "string",
        "enum": [
          "BDT",
          "INR",
          "PKR",
          "PHP",
          "NPR",
          "EGP",
          "VND",
          "NGN"
        ],
        "title": "DestinationCurrency"
      },
      "EgyptPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "EGY",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "EgyptPayment",
        "examples": [
          {
            "amount": 100,
            "bank_name": "National Bank of Egypt",
            "beneficiary_account_number": "1234567890123456",
            "beneficiary_address": "Main Road",
            "beneficiary_city": "Cairo",
            "beneficiary_email": "omar.salah@domain.com",
            "beneficiary_mobile": "+201000000000",
            "beneficiary_name": "Omar Salah",
            "country": "EGY",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "ExternalIdStr": {
        "type": "string",
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[A-Za-z0-9._#-]+$",
        "description": "Unique ID provided by API user. Alphanumerics and `-`, `_`, `.`, `#` only."
      },
      "ForbiddenError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "ForbiddenError"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IdentityDocumentType": {
        "type": "string",
        "enum": [
          "idcard",
          "passport",
          "resident_card",
          "other"
        ],
        "title": "IdentityDocumentType",
        "description": "Type of the sender's identity document.",
        "x-enumDescriptions": {
          "idcard": "A national identity card, issued by the sender's country of citizenship.",
          "other": "Any other government-issued identity document.",
          "passport": "A passport.",
          "resident_card": "A residence identity card, issued by the sender's country of residence."
        }
      },
      "IndiaPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "IND",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number, validated as an Indian number and normalised to ITU E.164 (`+91` prefix) before the order is stored."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "beneficiary_account_type": {
            "$ref": "#/components/schemas/BankAccountType",
            "description": "Bank account type",
            "default": "savings"
          },
          "bank_branch_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank Branch Name",
            "description": "Branch name of the specified bank. OPTIONAL — omit it or send null. Passed through to providers that accept a branch name; the branch is identified by `bank_branch_code` (IFSC), not by this field."
          },
          "bank_branch_code": {
            "type": "string",
            "title": "Bank Branch Code",
            "description": "Bank branch code (e.g. for India it is equivalent to IFSC)"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "bank_branch_code",
          "sender_identity_doc",
          "sender_identity_doc_type"
        ],
        "title": "IndiaPayment",
        "examples": [
          {
            "amount": 8488.79,
            "bank_branch_code": "HDFC0001234",
            "bank_name": "HDFC Bank",
            "beneficiary_account_number": "7823732431829188",
            "beneficiary_account_type": "savings",
            "beneficiary_address": "Linking Road",
            "beneficiary_city": "Mumbai",
            "beneficiary_email": "rkgupta@domain.com",
            "beneficiary_mobile": "+918834907438",
            "beneficiary_name": "Rakesh Gupta",
            "country": "IND",
            "currency": "USD",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "InternalServerError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "InternalServerError"
      },
      "NepalPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "NPL",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation"
        ],
        "title": "NepalPayment"
      },
      "NigeriaPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "NGA",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "bank_code": {
            "type": "string",
            "title": "Bank Code",
            "description": "NIBSS Instant Payment (NIP) bank code: the 6-digit NIBSS institution code of the beneficiary's bank (e.g. Access Bank `000014`, GTBank `000013`, Zenith Bank `000015`)."
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "bank_code",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "NigeriaPayment",
        "examples": [
          {
            "amount": 100,
            "bank_code": "000014",
            "bank_name": "Access Bank",
            "beneficiary_account_number": "0123456789",
            "beneficiary_address": "Victoria Island",
            "beneficiary_city": "Lagos",
            "beneficiary_email": "chinedu.okeke@domain.com",
            "beneficiary_mobile": "+2348012345678",
            "beneficiary_name": "Chinedu Okeke",
            "country": "NGA",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "NotFoundError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "NotFoundError"
      },
      "PakistanPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "PAK",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "beneficiary_account_type": {
            "$ref": "#/components/schemas/BankAccountType",
            "description": "Bank account type",
            "default": "savings"
          },
          "bank_code": {
            "type": "string",
            "title": "Bank Code",
            "description": "SWIFT / BIC code of the beneficiary bank, full or 8-character (e.g. ALFHPKKAXXX or ALFHPKKA), or the four characters an IBAN carries (e.g. ALFH)"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "bank_code",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "PakistanPayment",
        "examples": [
          {
            "amount": 100,
            "bank_code": "ALFHPKKAXXX",
            "bank_name": "Pakistan Bank",
            "beneficiary_account_number": "PK12ABCD1234567891234567",
            "beneficiary_account_type": "savings",
            "beneficiary_address": "Main Road",
            "beneficiary_city": "Karachi",
            "beneficiary_email": "ahmad.khan@domain.com",
            "beneficiary_mobile": "+923001234567",
            "beneficiary_name": "Ahmad Khan",
            "country": "PAK",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "Payment": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/IndiaPayment"
          },
          {
            "$ref": "#/components/schemas/PakistanPayment"
          },
          {
            "$ref": "#/components/schemas/BangladeshPayment"
          },
          {
            "$ref": "#/components/schemas/PhilippinesPayment"
          },
          {
            "$ref": "#/components/schemas/NepalPayment"
          },
          {
            "$ref": "#/components/schemas/EgyptPayment"
          },
          {
            "$ref": "#/components/schemas/VietnamPayment"
          },
          {
            "$ref": "#/components/schemas/NigeriaPayment"
          }
        ],
        "discriminator": {
          "propertyName": "country",
          "mapping": {
            "BGD": "#/components/schemas/BangladeshPayment",
            "EGY": "#/components/schemas/EgyptPayment",
            "IND": "#/components/schemas/IndiaPayment",
            "NGA": "#/components/schemas/NigeriaPayment",
            "NPL": "#/components/schemas/NepalPayment",
            "PAK": "#/components/schemas/PakistanPayment",
            "PHL": "#/components/schemas/PhilippinesPayment",
            "VNM": "#/components/schemas/VietnamPayment"
          }
        }
      },
      "PaymentOrderInfoLive": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "order": {
            "$ref": "#/components/schemas/Payment"
          },
          "response": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentResponseLive"
              },
              {
                "type": "null"
              }
            ]
          },
          "quote": {
            "$ref": "#/components/schemas/QuoteResponseV2"
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ValidateBeneficiaryResponsePublic"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "order",
          "response",
          "quote"
        ],
        "title": "PaymentOrderInfoLive"
      },
      "PaymentOrderState": {
        "type": "string",
        "enum": [
          "queued",
          "rejected",
          "pending",
          "processing",
          "succeeded",
          "failed",
          "canceled",
          "unknown",
          "reversed"
        ],
        "title": "PaymentOrderState"
      },
      "PaymentResponseLive": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Payment id, as returned by `POST /v2/payment`."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "When this status was recorded (UTC)."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentOrderState",
            "description": "Payment state. Release funds to your customer only on `succeeded`."
          },
          "msg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Msg",
            "description": "Free-text processing message. Not a failure reason; do not parse it."
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount",
            "description": "Payout amount, in `amount_currency`."
          },
          "amount_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payout (destination) currency."
          },
          "base_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Amount",
            "description": "Source amount from the quote, in `base_currency`."
          },
          "base_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source currency from the quote."
          },
          "wallet_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wallet Amount",
            "description": "The payout converted to `wallet_currency` at the quote's `wallet_rate`. Premium and transaction cost are reported separately."
          },
          "wallet_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StableCoin"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wallet Currency",
            "description": "Your settlement wallet currency."
          },
          "wallet_premium": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wallet Premium",
            "description": "Premium charged, in `wallet_currency`."
          },
          "wallet_txn_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wallet Txn Cost",
            "description": "Transaction cost charged, in `wallet_currency`."
          },
          "bank_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank Reference",
            "description": "Bank or processor reference for the transfer, when available."
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "status"
        ],
        "title": "PaymentResponseLive",
        "examples": [
          {
            "id": "00000000-0000-4000-A000-000000000000",
            "msg": "OK",
            "status": "queued",
            "timestamp": "2024-12-01T01:02:03.000000Z"
          },
          {
            "id": "00000000-0000-4000-A000-000000000000",
            "status": "processing",
            "timestamp": "2024-12-01T01:02:03.000000Z"
          },
          {
            "amount": 8488.79,
            "amount_currency": "INR",
            "bank_reference": "412345678901",
            "base_amount": 100,
            "base_currency": "USD",
            "id": "00000000-0000-4000-A000-000000000000",
            "msg": "OK",
            "status": "succeeded",
            "timestamp": "2024-12-01T01:05:00.000000Z",
            "wallet_amount": 100,
            "wallet_currency": "USDT",
            "wallet_premium": 0.5,
            "wallet_txn_cost": 1
          }
        ]
      },
      "PhilippinesPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "PHL",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "PhilippinesPayment",
        "examples": [
          {
            "amount": 100,
            "bank_name": "Philippine Bank",
            "beneficiary_account_number": "123456789012345",
            "beneficiary_address": "Main Road",
            "beneficiary_city": "Manila",
            "beneficiary_email": "juan.delacruz@domain.com",
            "beneficiary_mobile": "+639171234567",
            "beneficiary_name": "Juan Dela Cruz",
            "country": "PHL",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "QuoteRequestDestination": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Which currencies you can use depends on the exchange rates configured for your account and this corridor; a currency without a rate returns no quote."
          },
          "beneficiary_account_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. [OPTIONAL]"
          },
          "bank_branch_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank Branch Code",
            "description": "Bank branch code of the beneficiary (e.g. IFSC for India) [OPTIONAL]"
          },
          "amount_destination": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount Destination",
            "description": "The amount the beneficiary is to receive, in the DESTINATION country's local currency (e.g INR for `country=IND`);\n            `currency` remains the SOURCE currency you fund from. Rounded to 2 decimal places."
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "amount_destination"
        ],
        "title": "QuoteRequestDestination",
        "description": "Quote request with destination amount"
      },
      "Relation": {
        "type": "string",
        "enum": [
          "aunt",
          "brother",
          "colleague",
          "cousin",
          "daughter",
          "father",
          "friend",
          "husband",
          "inlaws",
          "mother",
          "nephew",
          "niece",
          "other",
          "own",
          "self",
          "sister",
          "son",
          "uncle",
          "wife"
        ],
        "title": "Relation",
        "description": "What the beneficiary is to the sender.",
        "x-enumDescriptions": {
          "inlaws": "The beneficiary is a relative by marriage.",
          "other": "None of the listed relations.",
          "own": "The beneficiary is the sender: a transfer to the sender's own account. Use this value.",
          "self": "Same as `own`; accepted for compatibility."
        }
      },
      "ReportPresignedUrlResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "expires_in"
        ],
        "title": "ReportPresignedUrlResponse"
      },
      "ReportResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Report id, for `GET /v2/reports/{id}` and the presigned download URL."
          },
          "file_name": {
            "type": "string",
            "title": "File Name",
            "description": "Report file name."
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "description": "MIME type of the file."
          },
          "report_type": {
            "$ref": "#/components/schemas/ReportType",
            "description": "Kind of report."
          },
          "file_status": {
            "$ref": "#/components/schemas/BatchJobItemStatus",
            "description": "Generation status. The file can be downloaded once this is `success`."
          },
          "auto_generated": {
            "type": "boolean",
            "title": "Auto Generated",
            "description": "`true` if the scheduler created this report, `false` if you requested it."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the report was created (UTC)."
          },
          "params": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientPayoutReportParams"
              },
              {
                "type": "null"
              }
            ],
            "title": "Params",
            "description": "The filters the report was generated with."
          }
        },
        "type": "object",
        "required": [
          "id",
          "file_name",
          "content_type",
          "report_type",
          "file_status",
          "auto_generated",
          "created_at",
          "params"
        ],
        "title": "ReportResponse",
        "description": "A generated report file.",
        "examples": [
          {
            "auto_generated": false,
            "content_type": "text/csv",
            "created_at": "2024-12-01T01:02:03.000000Z",
            "file_name": "payout_IND_2024-12-01.csv",
            "file_status": "success",
            "id": "00000000-0000-4000-A000-000000000000",
            "report_type": "payout"
          }
        ]
      },
      "ReportType": {
        "type": "string",
        "enum": [
          "payout",
          "statement",
          "wallet",
          "funding_history",
          "pnl",
          "reversed_payouts",
          "agent_payout"
        ],
        "title": "ReportType"
      },
      "SearchType": {
        "type": "string",
        "enum": [
          "id",
          "external_id",
          "linked_txn"
        ],
        "title": "SearchType"
      },
      "SortingOrder": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "title": "SortingOrder",
        "description": "ORDER BY direction with explicit nulls handling.\n\n`ASC` => `ASC NULLS LAST`\n`DESC` => `DESC NULLS LAST`\n\nBoth place nulls at the end, which should be a sane default"
      },
      "StableCoin": {
        "type": "string",
        "enum": [
          "USDT",
          "USDC",
          "ETH"
        ],
        "title": "StableCoin",
        "description": "A coin a balance can be denominated in.\n\nDespite the name, not every member is dollar-pegged. Payouts settle in\n`USDT` or `USDC` today; `ETH` is accepted by the type but no provider\nsettles in it."
      },
      "TooManyRequestsError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "TooManyRequestsError"
      },
      "UnauthorizedError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "UnauthorizedError"
      },
      "UnprocessableError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "UnprocessableError"
      },
      "ValidateBankRequest": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country. Only `IND` is supported."
          },
          "bank_branch_code": {
            "type": "string",
            "title": "Bank Branch Code",
            "description": "IFSC code of the branch, e.g. `HDFC0002019`."
          }
        },
        "type": "object",
        "required": [
          "country",
          "bank_branch_code"
        ],
        "title": "ValidateBankRequest"
      },
      "ValidateBankResponse": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid",
            "description": "Whether the IFSC code exists."
          },
          "bank": {
            "type": "string",
            "title": "Bank",
            "description": "Bank name."
          },
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Bank code."
          },
          "ifsc": {
            "type": "string",
            "title": "Ifsc",
            "description": "The IFSC code."
          },
          "micr": {
            "type": "string",
            "title": "Micr",
            "description": "MICR code of the branch."
          },
          "branch": {
            "type": "string",
            "title": "Branch",
            "description": "Branch name."
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Branch city."
          },
          "district": {
            "type": "string",
            "title": "District",
            "description": "Branch district."
          },
          "state": {
            "type": "string",
            "title": "State",
            "description": "Branch state."
          },
          "address": {
            "type": "string",
            "title": "Address",
            "description": "Branch address."
          },
          "neft": {
            "type": "boolean",
            "title": "Neft",
            "description": "Whether the branch accepts NEFT."
          },
          "imps": {
            "type": "boolean",
            "title": "Imps",
            "description": "Whether the branch accepts IMPS."
          },
          "rtgs": {
            "type": "boolean",
            "title": "Rtgs",
            "description": "Whether the branch accepts RTGS."
          }
        },
        "type": "object",
        "required": [
          "valid",
          "bank",
          "code",
          "ifsc",
          "micr",
          "branch",
          "city",
          "district",
          "state",
          "address",
          "neft",
          "imps",
          "rtgs"
        ],
        "title": "ValidateBankResponse"
      },
      "ValidateBeneficiaryRequest": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country. Must be `IND` — account validation is available for India only, because it is the only corridor with the bank reference data the validation backends need. Any other value is a 400."
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/payment` takes as `beneficiary_account_number`."
          },
          "bank_branch_code": {
            "type": "string",
            "title": "Bank Branch Code",
            "description": "Indian Financial System Code (IFSC) of the bank branch, e.g. `HDFC0001234`."
          },
          "beneficiary_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Name",
            "description": "Bank account holder name"
          }
        },
        "type": "object",
        "required": [
          "country",
          "account_number",
          "bank_branch_code"
        ],
        "title": "ValidateBeneficiaryRequest"
      },
      "ValidateBeneficiaryResponse": {
        "properties": {
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary."
          },
          "bank_branch_code": {
            "type": "string",
            "title": "Bank Branch Code",
            "description": "Indian Financial System Code (IFSC) of the bank branch"
          },
          "status": {
            "$ref": "#/components/schemas/BankAccountStatus"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "account_number",
          "bank_branch_code",
          "status"
        ],
        "title": "ValidateBeneficiaryResponse"
      },
      "ValidateBeneficiaryResponsePublic": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/BankAccountStatus"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "ValidateBeneficiaryResponsePublic"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VietnamPayment": {
        "properties": {
          "country": {
            "type": "string",
            "const": "VNM",
            "title": "Country",
            "description": "ISO 3166-1 alpha-3 Country Code"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Must be the `currency` of the quote in `quote`; the amount is converted to the local currency at that quote's rate."
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID4`) as returned by `POST /v2/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the DESTINATION (local) currency - INR for `country=IND`, PKR for `PAK`, and so on.\n            Send the `amount_destination` value returned by `POST /v2/quote` verbatim; do not recompute it. Note the naming trap: `amount`\n            is the SOURCE amount on `POST /v2/quote` and the DESTINATION amount here. The value is rounded to 2 decimal places and must fall\n            inside the quote's `min_amount_destination` / `max_amount_destination` band, which is the only amount check performed - a value outside the band is a 400.\n            "
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held."
          },
          "beneficiary_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Beneficiary Name",
            "description": "Full name of the beneficiary (name and surname)."
          },
          "beneficiary_city": {
            "type": "string",
            "title": "Beneficiary City",
            "description": "Beneficiary address (city)"
          },
          "beneficiary_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Beneficiary Address",
            "description": "Beneficiary address (street and number)"
          },
          "beneficiary_account_number": {
            "type": "string",
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. The same value `POST /v2/validate_account` takes as `account_number`."
          },
          "beneficiary_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Mobile",
            "description": "Beneficiary mobile number in ITU E.164 format: the destination country's calling-code prefix followed by the national number, with no spaces, hyphens or parentheses."
          },
          "beneficiary_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Email",
            "description": "If specified, must be a valid email address"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary info and notes for tracking the transaction."
          },
          "sender_name": {
            "type": "string",
            "title": "Sender Name",
            "description": "Full name of Sender (name and surname)"
          },
          "sender_birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Birthdate",
            "description": "Sender birthdate"
          },
          "sender_identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Exp",
            "description": "Expiry date for the sender identity document"
          },
          "sender_identity_doc_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Identity Doc Country",
            "description": "Sender country (nationality) (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_city": {
            "type": "string",
            "title": "Sender City",
            "description": "Sender residency/address (city)"
          },
          "sender_address": {
            "type": "string",
            "maxLength": 70,
            "title": "Sender Address",
            "description": "Sender residency/address (street and number)"
          },
          "sender_country": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Sender Country",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)"
          },
          "sender_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Mobile",
            "description": "Sender mobile number (ITU E.164 format)"
          },
          "sender_relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp",
            "description": "Timestamp of the order (will be filled in automatically server side)"
          },
          "sender_identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "sender_identity_doc": {
            "type": "string",
            "title": "Sender Identity Doc",
            "description": "Sender identity document number"
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "quote",
          "amount",
          "bank_name",
          "beneficiary_name",
          "beneficiary_city",
          "beneficiary_address",
          "beneficiary_account_number",
          "sender_name",
          "sender_city",
          "sender_address",
          "sender_country",
          "sender_relation",
          "sender_identity_doc_type",
          "sender_identity_doc"
        ],
        "title": "VietnamPayment",
        "examples": [
          {
            "amount": 100,
            "bank_name": "Vietcombank",
            "beneficiary_account_number": "0123456789012345",
            "beneficiary_address": "District 1",
            "beneficiary_city": "Ho Chi Minh City",
            "beneficiary_email": "nguyenvanan@domain.com",
            "beneficiary_mobile": "+84901234567",
            "beneficiary_name": "Nguyen Van An",
            "country": "VNM",
            "currency": "AED",
            "quote": "00000000-0000-4000-A000-000000000000",
            "remarks": "test",
            "sender_address": "Jumeirah Beach Road",
            "sender_birthdate": "1970-01-01",
            "sender_city": "Dubai",
            "sender_country": "ARE",
            "sender_identity_doc": "A987654",
            "sender_identity_doc_country": "ARE",
            "sender_identity_doc_exp": "2038-01-19",
            "sender_identity_doc_type": "idcard",
            "sender_mobile": "+9715850185684",
            "sender_name": "Ahmed Ahmed",
            "sender_relation": "other"
          }
        ]
      },
      "QuoteResponseV2": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Quote id. Send it as `quote` on `POST /v2/payment`; a quote can back one payment only."
          },
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country."
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency, the one `amount` is in."
          },
          "amount": {
            "type": "number",
            "title": "Amount",
            "description": "What you pay, in the source currency."
          },
          "amount_destination": {
            "type": "number",
            "title": "Amount Destination",
            "description": "What the beneficiary receives, in the destination currency. Send it verbatim as `amount` on `POST /v2/payment`."
          },
          "rate": {
            "type": "number",
            "title": "Rate",
            "description": "Exchange rate from the source currency to the destination currency. This is the rate your customer sees."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "When the quote was issued (UTC)."
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "title": "Expires",
            "description": "When the quote stops being usable (UTC), currently 15 minutes after `timestamp`. Read this value rather than hard-coding the window."
          },
          "wallet_rate": {
            "type": "number",
            "title": "Wallet Rate",
            "description": "Exchange rate from your settlement wallet currency to the destination currency. For settlement only: do not show it to your customer or use it to compute a payout."
          },
          "min_amount_destination": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Amount Destination",
            "description": "Smallest payout your account may send on this corridor, in the destination currency. Set per account, so read it from every quote rather than caching it."
          },
          "max_amount_destination": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Amount Destination",
            "description": "Largest payout your account may send on this corridor, in the destination currency. Set per account, so read it from every quote rather than caching it."
          }
        },
        "type": "object",
        "required": [
          "id",
          "country",
          "currency",
          "amount",
          "amount_destination",
          "rate",
          "timestamp",
          "expires",
          "wallet_rate"
        ],
        "title": "QuoteResponse",
        "examples": [
          {
            "amount": 100,
            "amount_destination": 8488.79,
            "country": "IND",
            "currency": "USD",
            "expires": "2024-12-01T01:17:03.000000Z",
            "id": "00000000-0000-4000-A000-000000000000",
            "max_amount_destination": 100000,
            "min_amount_destination": 100,
            "rate": 84.887912,
            "timestamp": "2024-12-01T01:02:03.000000Z",
            "wallet_rate": 84.887912
          }
        ]
      },
      "QuoteRequestV2": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Which currencies you can use depends on the exchange rates configured for your account and this corridor; a currency without a rate returns no quote."
          },
          "beneficiary_account_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Account Number",
            "description": "Bank account id of the beneficiary. [OPTIONAL]"
          },
          "bank_branch_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank Branch Code",
            "description": "Bank branch code of the beneficiary (e.g. IFSC for India) [OPTIONAL]"
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The amount to convert, in the SOURCE currency - the one named in `currency` (e.g. AED, USD), not the destination country's.\n            Rounded to 4 decimal places."
          }
        },
        "type": "object",
        "required": [
          "country",
          "currency",
          "amount"
        ],
        "title": "QuoteRequest"
      },
      "AccountValidationRequest": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country. Must be `IND` — account validation is available for India only, because it is the only corridor with the bank reference data the validation backends need. Any other value is a 400."
          },
          "payment_type": {
            "$ref": "#/components/schemas/PaymentType",
            "description": "Payment type the beneficiary will be paid out under; picks the provider route the validation runs on",
            "default": "C2C"
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary"
          },
          "branch_code": {
            "type": "string",
            "title": "Branch Code",
            "description": "Bank branch code (IFSC code for India)"
          },
          "beneficiary_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Name",
            "description": "Bank account holder name, when known"
          }
        },
        "type": "object",
        "required": [
          "country",
          "account_number",
          "branch_code"
        ],
        "title": "AccountValidationRequest",
        "examples": [
          {
            "account_number": "99345724439934",
            "beneficiary_name": "Nikhil Sharma",
            "branch_code": "FDRL0001883",
            "country": "IND",
            "payment_type": "C2C"
          }
        ]
      },
      "AccountValidationResponse": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country"
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary"
          },
          "branch_code": {
            "type": "string",
            "title": "Branch Code",
            "description": "Bank branch code (IFSC code for India)"
          },
          "status": {
            "$ref": "#/components/schemas/BankAccountStatus",
            "description": "Account status as reported by the validation backend. `pending` means the backend has queued the check and the account should be validated again later"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Account holder name reported by the backend"
          }
        },
        "type": "object",
        "required": [
          "country",
          "account_number",
          "branch_code",
          "status"
        ],
        "title": "AccountValidationResponse",
        "examples": [
          {
            "account_number": "99345724439934",
            "branch_code": "FDRL0001883",
            "country": "IND",
            "name": "Nikhil Sharma",
            "status": "valid"
          }
        ]
      },
      "BalanceInfo": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The corridor's local currency; `available`, `reserved` and `total` are in it."
          },
          "available": {
            "type": "number",
            "title": "Available",
            "description": "What you can pay out now, in `currency`. Already net of `reserved` and of any deal hold."
          },
          "reserved": {
            "type": "number",
            "title": "Reserved",
            "description": "Held by payments still in progress, on either API version, in `currency`.",
            "default": 0
          },
          "total": {
            "type": "number",
            "title": "Total",
            "description": "`available` plus `reserved` plus the amount held for active deals, in `currency`."
          },
          "wallet": {
            "$ref": "#/components/schemas/WalletBalanceInfo",
            "description": "The same position in your wallet currency."
          },
          "deals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DealBalanceInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your rate-lock deal position for this corridor, in the wallet currency. Absent when you have no active deals."
          }
        },
        "type": "object",
        "required": [
          "currency",
          "available",
          "total",
          "wallet"
        ],
        "title": "BalanceInfo"
      },
      "BankInfo": {
        "properties": {
          "swift_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Swift Code"
          },
          "iban_code": {
            "type": "string",
            "title": "Iban Code"
          },
          "bank_name": {
            "type": "string",
            "title": "Bank Name"
          },
          "segment": {
            "$ref": "#/components/schemas/BankSegment"
          }
        },
        "type": "object",
        "required": [
          "iban_code",
          "bank_name",
          "segment"
        ],
        "title": "BankInfo"
      },
      "BankList": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry"
          },
          "banks": {
            "items": {
              "$ref": "#/components/schemas/BankInfo"
            },
            "type": "array",
            "title": "Banks"
          }
        },
        "type": "object",
        "required": [
          "country",
          "banks"
        ],
        "title": "BankList"
      },
      "BankSegment": {
        "type": "string",
        "enum": [
          "bank",
          "m_wallet",
          "other"
        ],
        "title": "BankSegment",
        "description": "What a `bank_codes_pak` entry is on the local rails. Keys a registry\nboth generations read, so it lives here; `app.models.v3` re-exports it."
      },
      "BeneficiaryX2B": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "country": {
            "$ref": "#/components/schemas/CountryAlpha3"
          }
        },
        "type": "object",
        "required": [
          "name",
          "address",
          "country"
        ],
        "title": "Beneficiary[X2B,PaymentCountry,PaymentMethod]"
      },
      "BeneficiaryX2C": {
        "properties": {
          "first_name": {
            "$ref": "#/components/schemas/PersonName",
            "description": "Beneficiary first name"
          },
          "last_name": {
            "$ref": "#/components/schemas/PersonName",
            "description": "Beneficiary last name (surname)"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Beneficiary address (city)"
          },
          "address": {
            "type": "string",
            "maxLength": 70,
            "title": "Address",
            "description": "Beneficiary address (street and number)"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile",
            "description": "Beneficiary mobile number (ITU E.164 format with country code prefix)"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Beneficiary email address"
          }
        },
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "city",
          "address"
        ],
        "title": "Beneficiary[X2C,PaymentCountry,PaymentMethod]"
      },
      "CountryAlpha3": {
        "type": "string",
        "maxLength": 3,
        "minLength": 3
      },
      "LedgerDataPublicFilterBy": {
        "properties": {
          "api_country": {
            "$ref": "#/components/schemas/ApiCountry"
          },
          "operation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LedgerOperation"
              },
              {
                "type": "null"
              }
            ]
          },
          "txn": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Txn"
          },
          "timestamp": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "api_country"
        ],
        "title": "LedgerDataPublicFilterBy"
      },
      "LedgerOperation": {
        "type": "string",
        "enum": [
          "add",
          "deduct",
          "reverse"
        ],
        "title": "LedgerOperation"
      },
      "PaymentB2BIndia": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "B2B",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "IND",
            "title": "Payment Country"
          },
          "payment_method": {
            "type": "string",
            "const": "bank_transfer",
            "title": "Payment Method"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetailsB2BIndiaBankTransfer"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[B2B,India,BankTransfer]"
      },
      "PaymentB2CIndia": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "B2C",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "IND",
            "title": "Payment Country"
          },
          "payment_method": {
            "type": "string",
            "const": "bank_transfer",
            "title": "Payment Method"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetailsB2CIndiaBankTransfer"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[B2C,India,BankTransfer]"
      },
      "PaymentC2BIndia": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "C2B",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "IND",
            "title": "Payment Country"
          },
          "payment_method": {
            "type": "string",
            "const": "bank_transfer",
            "title": "Payment Method"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetailsC2BIndiaBankTransfer"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[C2B,India,BankTransfer]"
      },
      "PaymentDetailsB2BIndiaBankTransfer": {
        "properties": {},
        "type": "object",
        "title": "PaymentDetailsB2BIndiaBankTransfer"
      },
      "PaymentDetailsB2CIndiaBankTransfer": {
        "properties": {},
        "type": "object",
        "title": "PaymentDetailsB2CIndiaBankTransfer"
      },
      "PaymentDetailsC2BIndiaBankTransfer": {
        "properties": {},
        "type": "object",
        "title": "PaymentDetailsC2BIndiaBankTransfer"
      },
      "PaymentDetailsC2CIndiaBankTransfer": {
        "properties": {
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held"
          },
          "branch_code": {
            "type": "string",
            "title": "Branch Code",
            "description": "Bank branch code (IFSC code)"
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary"
          },
          "branch_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch Name",
            "description": "Branch name of the specified bank. OPTIONAL — omit it or send null. Passed through to providers that accept a branch name; the branch is identified by `branch_code` (IFSC), not by this field."
          }
        },
        "type": "object",
        "required": [
          "bank_name",
          "branch_code",
          "account_number"
        ],
        "title": "PaymentDetailsC2CIndiaBankTransfer"
      },
      "PaymentDetailsC2CIndiaInstantPayment": {
        "properties": {
          "virtual_payment_address": {
            "type": "string",
            "title": "Virtual Payment Address",
            "description": "UPI virtual payment address of the beneficiary."
          }
        },
        "type": "object",
        "required": [
          "virtual_payment_address"
        ],
        "title": "PaymentDetailsC2CIndiaInstantPayment"
      },
      "PaymentDetailsC2CNigeriaBankTransfer": {
        "properties": {
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held"
          },
          "bank_code": {
            "type": "string",
            "title": "Bank Code",
            "description": "NIBSS Instant Payment (NIP) bank code: the 6-digit NIBSS institution code of the beneficiary's bank (e.g. Access Bank `000014`, GTBank `000013`, Zenith Bank `000015`)."
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary"
          }
        },
        "type": "object",
        "required": [
          "bank_name",
          "bank_code",
          "account_number"
        ],
        "title": "PaymentDetailsC2CNigeriaBankTransfer"
      },
      "PaymentDetailsC2CPakistanBankTransfer": {
        "properties": {
          "bank_name": {
            "type": "string",
            "title": "Bank Name",
            "description": "Bank name where the beneficiary account is held"
          },
          "bank_code": {
            "type": "string",
            "title": "Bank Code",
            "description": "SWIFT/BIC code of the beneficiary bank, full or 8-character (e.g. ABPAPKKA443 or ABPAPKKA), or the four characters an IBAN carries (e.g. ABPA). Listed by `GET /v3/info/payment_banks?country=PAK`"
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Bank account id of the beneficiary"
          }
        },
        "type": "object",
        "required": [
          "bank_name",
          "bank_code",
          "account_number"
        ],
        "title": "PaymentDetailsC2CPakistanBankTransfer"
      },
      "PaymentExchangeInfo": {
        "properties": {
          "amount": {
            "type": "number",
            "title": "Amount",
            "description": "Source currency amount"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "title": "PaymentExchangeInfo"
      },
      "PaymentInfo": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Payment id."
          },
          "quote": {
            "$ref": "#/components/schemas/QuoteResponse",
            "description": "The quote this payment was made against."
          },
          "order": {
            "$ref": "#/components/schemas/PaymentOrder",
            "description": "The payment as you submitted it."
          },
          "response": {
            "$ref": "#/components/schemas/PaymentResponse",
            "description": "Current status and processing result."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ValidateBeneficiaryResponsePublic"
              },
              {
                "type": "null"
              }
            ],
            "description": "Beneficiary account validation result, when validation ran."
          }
        },
        "type": "object",
        "required": [
          "id",
          "quote",
          "order",
          "response"
        ],
        "title": "PaymentInfo"
      },
      "PaymentMethod": {
        "type": "string",
        "enum": [
          "bank_transfer",
          "cash_pickup",
          "mobile_wallet",
          "instant_payment"
        ],
        "title": "PaymentMethod",
        "description": "The rail a payment travels on.\n\nKeys `pricing_flat`, `api_access`, `deals` and the v3 payment models, so\nit is defined here rather than in v3 -- this module cannot import that\none. `app.models.v3.common` re-exports it."
      },
      "PaymentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentOrderState"
          },
          "msg": {
            "type": "string",
            "title": "Msg",
            "description": "Status info message"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount",
            "description": "The amount in destination currency"
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentExchangeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentWalletInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Reference",
            "description": "Payment reference (e.g. UTR for bank transfers in India)"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "status",
          "msg",
          "quote"
        ],
        "title": "PaymentResponse"
      },
      "PaymentType": {
        "type": "string",
        "enum": [
          "B2B",
          "B2C",
          "C2B",
          "C2C"
        ],
        "title": "PaymentType",
        "description": "Who is paying whom: consumer or business, either side."
      },
      "PaymentWalletInfo": {
        "properties": {
          "amount": {
            "type": "number",
            "title": "Amount",
            "description": "Wallet currency amount"
          },
          "rate": {
            "type": "number",
            "title": "Rate",
            "description": "Wallet currency rate"
          },
          "currency": {
            "$ref": "#/components/schemas/WalletCurrency",
            "description": "Wallet currency"
          },
          "premium": {
            "type": "number",
            "title": "Premium",
            "description": "Premium in wallet currency"
          },
          "txn_cost": {
            "type": "number",
            "title": "Txn Cost",
            "description": "Per transaction cost in wallet currency"
          },
          "fx": {
            "type": "number",
            "title": "Fx",
            "description": "FX spread in wallet currency",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "amount",
          "rate",
          "currency",
          "premium",
          "txn_cost"
        ],
        "title": "PaymentWalletInfo"
      },
      "PayoutReportFilter": {
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "title": "Start",
            "description": "Start of the window, on order creation"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "title": "End",
            "description": "End of the window, exclusive"
          },
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Payment country"
          },
          "status": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PaymentOrderState"
                },
                "type": "array",
                "maxItems": 9
              },
              {
                "type": "null"
              }
            ],
            "title": "Status",
            "description": "Filter on the effective status — the one the report reports, overrides applied"
          },
          "external": {
            "type": "boolean",
            "title": "External",
            "description": "When true, `ids` holds `external_id` values from the original payment requests rather than LeanX ids",
            "default": false
          },
          "ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 10000
              },
              {
                "type": "null"
              }
            ],
            "title": "Ids",
            "description": "Only report these payments. An id that matches nothing still gets a row, carrying just the id."
          },
          "sorting_order": {
            "$ref": "#/components/schemas/SortingOrder",
            "default": "desc"
          }
        },
        "type": "object",
        "required": [
          "start",
          "end",
          "country"
        ],
        "title": "PayoutReportFilter",
        "description": "Payout report parameters available to API clients."
      },
      "PersonName": {
        "type": "string",
        "maxLength": 64
      },
      "Problem": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "status": {
            "type": "integer",
            "title": "Status"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance"
          }
        },
        "type": "object",
        "required": [
          "type",
          "title",
          "status"
        ],
        "title": "Problem",
        "description": "An RFC 9457 problem detail object."
      },
      "ProblemError": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail"
          },
          "pointer": {
            "type": "string",
            "title": "Pointer"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "input": {
            "title": "Input"
          }
        },
        "type": "object",
        "required": [
          "detail",
          "pointer"
        ],
        "title": "ProblemError"
      },
      "QuoteAmountType": {
        "type": "string",
        "enum": [
          "destination",
          "source"
        ],
        "title": "QuoteAmountType"
      },
      "QuoteLimits": {
        "properties": {
          "expires": {
            "type": "string",
            "format": "date-time",
            "title": "Expires",
            "description": "Quote expiration timestamp (in the future)"
          },
          "min_amount_destination": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Amount Destination",
            "description": "Minimum payment amount for this quote"
          },
          "max_amount_destination": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Amount Destination",
            "description": "Maximum payment amount for this quote"
          }
        },
        "type": "object",
        "required": [
          "expires",
          "min_amount_destination",
          "max_amount_destination"
        ],
        "title": "QuoteLimits"
      },
      "QuoteRequest": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country. Also accepted as `payment_country`, the name `POST /v3/payment` uses for the same value."
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational — it is fixed by `country`, and is rejected if it disagrees. Filled in from `country` when omitted."
          },
          "payment_type": {
            "$ref": "#/components/schemas/PaymentType",
            "description": "Payment type for the quote"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod",
            "description": "Payment method/rail for the quote. Not every country/payment_type/payment_method combination has a payment variant — see the table on this operation for the supported set."
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency. Which currencies you can use depends on the exchange rates configured for your account and this corridor; a currency without a rate returns no quote."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "Valid amount in source or destination currency"
          },
          "amount_type": {
            "$ref": "#/components/schemas/QuoteAmountType",
            "default": "source"
          },
          "deal": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal",
            "description": "Price this quote against an active deal instead of the live rate. The deal must cover this country, payment type and payment method, and must have room for the amount."
          }
        },
        "type": "object",
        "required": [
          "country",
          "payment_type",
          "payment_method",
          "currency",
          "amount"
        ],
        "title": "QuoteRequest",
        "examples": [
          {
            "amount": 100,
            "amount_type": "source",
            "country": "IND",
            "currency": "USD",
            "payment_method": "bank_transfer",
            "payment_type": "C2C"
          },
          {
            "amount": 8488.79,
            "amount_type": "destination",
            "country": "IND",
            "currency": "USD",
            "payment_method": "bank_transfer",
            "payment_type": "C2C"
          },
          {
            "amount": 100,
            "amount_type": "source",
            "country": "IND",
            "currency": "USD",
            "payment_method": "instant_payment",
            "payment_type": "C2C"
          }
        ]
      },
      "QuoteResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "default": "Quote ID"
          },
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Destination country"
          },
          "payment_type": {
            "$ref": "#/components/schemas/PaymentType",
            "description": "Payment type for the quote"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod",
            "description": "Payment method/rail for the quote"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency"
          },
          "amount_source": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount Source",
            "description": "Amount in the source currency"
          },
          "amount_destination": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount Destination",
            "description": "Amount in the destination currency"
          },
          "rate": {
            "type": "number",
            "title": "Rate",
            "description": "Currency rate"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Quote creation timestamp"
          },
          "limits": {
            "$ref": "#/components/schemas/QuoteLimits",
            "default": "Quote limits"
          },
          "wallet_info": {
            "$ref": "#/components/schemas/QuoteWalletInfo",
            "description": ""
          }
        },
        "type": "object",
        "required": [
          "country",
          "payment_type",
          "payment_method",
          "currency",
          "amount_source",
          "amount_destination",
          "rate",
          "timestamp",
          "wallet_info"
        ],
        "title": "QuoteResponse",
        "examples": [
          {
            "amount_destination": 8488.79,
            "amount_source": 100,
            "country": "IND",
            "currency": "USD",
            "id": "00000000-0000-7000-8000-000000000000",
            "limits": {
              "expires": "2024-12-01T01:17:03.000000Z",
              "max_amount_destination": 100000,
              "min_amount_destination": 100
            },
            "payment_method": "bank_transfer",
            "rate": 84.887912,
            "timestamp": "2024-12-01T01:02:03.000000Z",
            "wallet_info": {
              "currency": "USDT",
              "rate": 84.887912
            }
          },
          {
            "amount_destination": 8488.79,
            "amount_source": 100,
            "country": "IND",
            "currency": "USD",
            "id": "00000000-0000-7000-8000-000000000000",
            "limits": {
              "expires": "2024-12-01T01:17:03.000000Z",
              "max_amount_destination": 100000,
              "min_amount_destination": 100
            },
            "payment_method": "instant_payment",
            "rate": 84.887912,
            "timestamp": "2024-12-01T01:02:03.000000Z",
            "wallet_info": {
              "currency": "USDT",
              "rate": 84.887912
            }
          }
        ]
      },
      "QuoteWalletInfo": {
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/WalletCurrency",
            "description": "Active wallet currency"
          },
          "rate": {
            "type": "number",
            "title": "Rate",
            "description": "Wallet currency rate (against destination)"
          }
        },
        "type": "object",
        "required": [
          "currency",
          "rate"
        ],
        "title": "QuoteWalletInfo"
      },
      "SenderB2X": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "country": {
            "$ref": "#/components/schemas/CountryAlpha3"
          },
          "id": {
            "type": "string",
            "title": "ID",
            "description": "Business registration id/number"
          }
        },
        "type": "object",
        "required": [
          "name",
          "address",
          "country",
          "id"
        ],
        "title": "Sender[B2X, PaymentCountry, PaymentMethod]"
      },
      "SenderC2X": {
        "properties": {
          "first_name": {
            "$ref": "#/components/schemas/PersonName",
            "description": "Sender first name"
          },
          "last_name": {
            "$ref": "#/components/schemas/PersonName",
            "description": "Sender last name (surname)"
          },
          "birthdate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Birthdate",
            "description": "Sender birthdate"
          },
          "identity_doc_type": {
            "$ref": "#/components/schemas/IdentityDocumentType",
            "description": "Sender identity document type"
          },
          "identity_doc": {
            "type": "string",
            "title": "Identity Doc",
            "description": "Sender identity document number"
          },
          "identity_doc_exp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identity Doc Exp",
            "description": "Expiry date for the sender identity document (must be in the future)"
          },
          "identity_doc_country": {
            "$ref": "#/components/schemas/CountryAlpha3",
            "description": "Country that issued the sender identity document (ISO 3166-1 alpha-3 Country Code)",
            "default": "ARE"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Sender address (city)"
          },
          "address": {
            "type": "string",
            "maxLength": 70,
            "title": "Address",
            "description": "Sender address (street and number)"
          },
          "country": {
            "$ref": "#/components/schemas/CountryAlpha3",
            "description": "Sender residency/country (ISO 3166-1 alpha-3 Country Code)",
            "default": "ARE"
          },
          "relation": {
            "$ref": "#/components/schemas/Relation",
            "description": "What the beneficiary is to the sender: `father` means the beneficiary is the sender's father. Use `own` for a transfer to the sender's own account."
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile",
            "description": "Sender mobile number (ITU E.164 format with country code prefix)"
          }
        },
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "identity_doc_type",
          "identity_doc",
          "city",
          "address",
          "relation"
        ],
        "title": "Sender[C2X,PaymentCountry,PaymentMethod]"
      },
      "StatementReportFilter": {
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "First day, inclusive"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "Last day, inclusive"
          },
          "country": {
            "$ref": "#/components/schemas/ApiCountry",
            "description": "Payment country"
          },
          "timezone": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportedTimeZone"
              },
              {
                "type": "null"
              }
            ],
            "description": "Timezone that defines a day. Omit for UTC."
          }
        },
        "type": "object",
        "required": [
          "date_from",
          "date_to",
          "country"
        ],
        "title": "StatementReportFilter",
        "description": "Statement report parameters available to API clients."
      },
      "SupportedTimeZone": {
        "type": "string",
        "enum": [
          "Asia/Kolkata",
          "Asia/Karachi",
          "Asia/Dubai",
          "Canada/Mountain",
          "Europe/Paris"
        ],
        "title": "SupportedTimeZone"
      },
      "ValidationProblem": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "status": {
            "type": "integer",
            "title": "Status"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ProblemError"
            },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "errors"
        ],
        "title": "ValidationProblem"
      },
      "WalletBalanceInfo": {
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/WalletCurrency",
            "description": "Your settlement wallet currency."
          },
          "rate": {
            "type": "number",
            "title": "Rate",
            "description": "Rate from the wallet currency to the corridor's local currency."
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "What you can pay out now, in the wallet currency. Already net of reserved amounts and deal holds."
          }
        },
        "type": "object",
        "required": [
          "currency",
          "rate",
          "balance"
        ],
        "title": "WalletBalanceInfo"
      },
      "WalletCurrency": {
        "type": "string",
        "enum": [
          "USD",
          "USDT",
          "USDC",
          "ETH"
        ],
        "title": "WalletCurrency",
        "description": "The currency a wallet is denominated in — what your balance is held\nand settled in.\n\nPayouts settle in `USD`, `USDT` or `USDC`. `ETH` is accepted by the type\nbut no provider settles in it today."
      },
      "PaymentC2CIndia": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "C2C",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "IND",
            "title": "Payment Country"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "payment_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentDetailsC2CIndiaBankTransfer"
              },
              {
                "$ref": "#/components/schemas/PaymentDetailsC2CIndiaInstantPayment"
              }
            ],
            "title": "Payment Details"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[C2C,India,PaymentMethod]"
      },
      "PaymentC2CPakistan": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "C2C",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "PAK",
            "title": "Payment Country"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetailsC2CPakistanBankTransfer"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[C2C,Pakistan,PaymentMethod]"
      },
      "PaymentC2CNigeria": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalIdStr"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_type": {
            "type": "string",
            "const": "C2C",
            "title": "Payment Type"
          },
          "payment_country": {
            "type": "string",
            "const": "NGA",
            "title": "Payment Country"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetailsC2CNigeriaBankTransfer"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode",
            "description": "Source currency (the currency will be automatically converted to local currency using the provided quote)"
          },
          "quote": {
            "type": "string",
            "format": "uuid",
            "title": "Quote",
            "description": "Valid currency quote id (`UUID`) as returned by `POST /v3/quote`. Quote currency must match base currency."
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "title": "Amount",
            "description": "The payout amount, in the destination (local) currency. Send the quote's `amount_destination` verbatim; do not recompute it from `rate`. It must fall inside the quote's `limits.min_amount_destination` / `limits.max_amount_destination` band."
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderB2X"
              },
              {
                "$ref": "#/components/schemas/SenderC2X"
              }
            ],
            "title": "Sender",
            "description": "Sender details"
          },
          "beneficiary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryX2B"
              },
              {
                "$ref": "#/components/schemas/BeneficiaryX2C"
              }
            ],
            "title": "Beneficiary",
            "description": "Beneficiary details"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remarks",
            "description": "Supplementary note"
          },
          "payment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination currency. Informational -- it is fixed by `payment_country`, and is rejected if it disagrees. Filled in from `payment_country` when omitted."
          }
        },
        "type": "object",
        "required": [
          "payment_type",
          "payment_country",
          "payment_method",
          "payment_details",
          "currency",
          "quote",
          "amount",
          "sender",
          "beneficiary"
        ],
        "title": "Payment[C2C,Nigeria,PaymentMethod]"
      },
      "PaymentOrder": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PaymentB2BIndia"
          },
          {
            "$ref": "#/components/schemas/PaymentB2CIndia"
          },
          {
            "$ref": "#/components/schemas/PaymentC2BIndia"
          },
          {
            "$ref": "#/components/schemas/PaymentC2CIndia"
          },
          {
            "$ref": "#/components/schemas/PaymentC2CPakistan"
          },
          {
            "$ref": "#/components/schemas/PaymentC2CNigeria"
          }
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Bearer token: a JWT signed with the credentials issued to you. See Authentication for the required claims and supported algorithms."
      }
    }
  },
  "tags": [
    {
      "name": "guide-changelog",
      "x-displayName": "Changelog",
      "x-traitTag": true,
      "description": "Newest first. **Breaking** marks a change that needs work on your side.\n\n#### 3.0.0 (2026-07-02) v3 API\n\n- New major version under `/v3`, running alongside v2. v2 is unchanged.\n- Quotes and payments take `payment_type` and `payment_method`. Payable\n  today: C2C to India (bank transfer, and UPI as `instant_payment`),\n  Pakistan (bank transfer) and Nigeria (bank transfer). See the table on\n  `POST /v3/quote`.\n- Nested request bodies: `sender`, `beneficiary` and `payment_details`.\n- Errors are RFC 9457 problem responses.\n- `POST /v3/payment` takes a `timeout`; the event stream resumes with\n  `Last-Event-ID`.\n- v3 is enabled per organisation.\n\n#### 2.5.1 (2025-07-15) Amount required for quote **Breaking**\n\n- `POST /v2/quote` requires an amount (`amount` or `amount_destination`),\n  so every quote carries a rate.\n- The quote's `amount` is in the source currency; a payment's `amount` is in\n  the destination currency. Send the quote's `amount_destination` as the\n  payment amount; it is checked against the quote's min/max band.\n\n#### 2.5.0 (2025-07-11) Sender details required for payments **Breaking**\n\n- `POST /v2/payment` requires sender details (name, date of birth, identity\n  document and more). `/v2/payment_ext` is merged into it; do not use\n  `/v2/payment_ext`.\n- Quotes are single-use: one payment per quote.\n- Quotes accept amount and bank details for better routing.\n\n#### 2.1.1 (2025-06-24) External ID for payments\n\n- `POST /v2/payment` accepts your own `external_id`; look a payment up by it\n  with `GET /v2/payments/{external_id}?external=true`.\n\n#### 2.1.0 (2025-06-05) Extended quote and payment API\n\n- `POST /v2/quote` accepts `amount`, `beneficiary_account_number` and\n  `bank_branch_code` for a better quote and higher success rate.\n- `/v2/payment_ext` added for sender details. Superseded in 2.5.0.\n\n#### 2.0.0 Initial release of the v2 API"
    },
    {
      "name": "guide-credentials",
      "x-displayName": "Credentials",
      "x-traitTag": true,
      "description": "Before using this API you need credentials issued by LeanX:\n\n- ACCESS KEY — identifies you, and is sent as the JWT's `kid` and `sub`\n  claims. A random base64 string with a readable prefix.\n- A signing credential, whose kind depends on the authentication method\n  LeanX selects for your integration: a SECRET KEY (a random base64\n  string) for `HS256`, or a private/public key pair for `RS256`. See\n  Authentication below.\n\nThe ACCESS KEY carries a prefix for convenience, e.g.\n\n```\n    company-test-sIEUpUP7b41n51WY\n```\n\nwhere the first part is your company tag, followed by a key usage hint and a\nrandom value.\n\nKeep your ACCESS KEY private where you can, and never share your SECRET KEY\nor your RS256 private key."
    },
    {
      "name": "guide-authentication",
      "x-displayName": "Authentication",
      "x-traitTag": true,
      "description": "For API authentication we use JWT/Bearer tokens, passed on the\n`Authorization: Bearer <token>` header.\n\nCurrently supported JWT algorithms are:\n- `HS256` — symmetric: the token is signed with your `SECRET KEY`.\n- `RS256` — asymmetric: LeanX issues you a private/public key pair. You sign\n  the token with the private key, and LeanX verifies it with the matching\n  public key. Use this when you prefer not to sign with a shared secret.\n\nThe LeanX team will select and deliver the authentication method to be used\nfor your integration. The algorithm is selected from the token's `alg` header,\nso the same endpoint accepts either. The required claims are identical for\nboth; only the header and signing method differ.\n\nJWT token header MUST include `kid`:\n\n```json\n{\n  \"alg\": \"HS256\",\n  \"typ\": \"JWT\",\n  \"kid\": \"someuser-demo-1234567890ABCDEF\"\n}\n```\n\nSend `\"alg\": \"RS256\"` instead when LeanX has issued you a key pair.\n\nFor `HS256` the `kid` is your `ACCESS KEY`. For `RS256` the `kid` identifies\nwhich of the public keys issued to you by LeanX should be used to verify the\nsignature.\n\nJWT token body MUST include the following claims:\n\n```json\n{\n    \"sub\": \"someuser-demo-1234567890ABCD\",\n    \"exp\": 1767225600,\n    \"iat\": 1767225300,\n    \"aud\": \"https://api.leanx.me\",\n    \"iss\": \"https://api.leanx.me\"\n}\n```\n\n- `sub` — your `ACCESS KEY`, the same value as `kid`.\n- `exp` — expiry, UNIX timestamp in UTC. Keep tokens short-lived.\n- `iat` — issued-at, UNIX timestamp in UTC.\n- `aud` and `iss` — **the same value in both**: the base URL of the server\n  you are calling, with no path (see Servers). Setting them to different\n  values, or appending a path, is the usual cause of a `401`."
    },
    {
      "name": "guide-signing-a-token",
      "x-displayName": "Signing a token",
      "x-traitTag": true,
      "description": "Sign tokens inside your own application with a standard JWT library — for\nexample `PyJWT` (Python), `jsonwebtoken` (Node), `jjwt` (Java) or\n`golang-jwt` (Go). Mint a short-lived token and refresh it rather than\nholding a long-lived one:\n\n```python\nimport jwt  # PyJWT\nfrom datetime import UTC, datetime, timedelta\n\nnow = datetime.now(tz=UTC)\ntoken = jwt.encode(\n    {\n        \"sub\": ACCESS_KEY,\n        \"iat\": int(now.timestamp()),\n        \"exp\": int((now + timedelta(minutes=5)).timestamp()),\n        \"aud\": API_URL,\n        \"iss\": API_URL,\n    },\n    SIGNING_KEY,\n    algorithm=\"RS256\",  # or \"HS256\"\n    headers={\"kid\": KEY_ID},\n)\n```\n\n`KEY_ID` is your `ACCESS KEY` for `HS256`; for `RS256` it is the id of the\nkey pair LeanX issued you.\n\nThe same with `jsonwebtoken` (Node):\n\n```javascript\nconst jwt = require(\"jsonwebtoken\");\n\nconst now = Math.floor(Date.now() / 1000); // seconds, not milliseconds\nconst token = jwt.sign(\n  { sub: ACCESS_KEY, iat: now, exp: now + 300, aud: API_URL, iss: API_URL },\n  SIGNING_KEY,\n  { algorithm: \"RS256\", keyid: KEY_ID }, // or \"HS256\"\n);\n```\n\n**Never paste a SECRET KEY or an RS256 private key into a web-based JWT\ntool.** [jwt.io](https://jwt.io) is useful for *inspecting* a token you\nalready hold — decoding requires no key — but not for signing one."
    },
    {
      "name": "guide-why-am-i-getting-a-401",
      "x-displayName": "Why am I getting a 401?",
      "x-traitTag": true,
      "description": "| Symptom | Likely cause | Fix |\n|---|---|---|\n| `401` on every call | `aud` and `iss` differ, carry a path (`/v2`, `/v3`), or name another environment's host | Set both to the base URL you call, with no path |\n| `401` on every call | `iat`/`exp` in milliseconds, or `exp` already passed | Use Unix seconds; mint a fresh short-lived token |\n| `401` on every call | Signed with the wrong key or algorithm, or `kid` names a different key | Sign with the key issued for this environment; put its id in `kid` |\n| `404` on every call | `kid` in the header does not equal the `sub` claim | Send your key id in both |\n| `401` on `/v3` only, `/v2` works | v3 is not enabled for your organisation | Ask us to enable v3 |\n| `401` with no token checks at all | `Authorization` header missing or not `Bearer <token>` | Send `Authorization: Bearer <token>` |"
    },
    {
      "name": "guide-transaction-states",
      "x-displayName": "Transaction states",
      "x-traitTag": true,
      "description": "Transactions accepted by the API can be in one of the following states.\nAs soon as the order is accepted you will get a unique id in the response, which\ncan be used to track the transaction.\n\nPlease note that orders rejected up-front by the API with 4xx (authentication or\nvalidation errors) are not represented in the state table, since they've never been accepted\nfor processing.\n\n\n| Status Category  | Status       | Description                   | Notes                                                                               |\n|------------------|--------------|-------------------------------|-------------------------------------------------------------------------------------|\n| **In Progress**  | `queued`     | Payment order accepted        | Order is accepted and waiting to be submitted for processing                                |\n| **In Progress**  | `pending`    | Payment order pending         | Reported by a processor that accepts a payment before it begins processing it               |\n| **In Progress**  | `processing` | Payment order is processing   | Payment submitted and accepted by processor                                                 |\n| **Success**      | `succeeded`  | Payment executed successfully | Funds delivered; your balance is debited                                                    |\n| **Failed**       | `failed`     | Payment failed                | Payment failed by the processor                                                             |\n| **Failed**       | `rejected`   | Payment rejected              | Payment rejected by processor or by API during processing (e.g. API could not route)        |\n| **Failed**       | `canceled`   | Payment is canceled           | Cancelled or expired by the processor before it settled; no funds moved                     |\n| **Failed**       | `reversed`   | Payment is reversed           | Reversed (and refunded) by the processor after it had succeeded; the debit is credited back |\n| **Call Support** | `unknown`    | Payment state is unknown      | Payment has encountered an unknown status at the processor and needs manual intervention    |"
    },
    {
      "name": "guide-settlement-currencies",
      "x-displayName": "Settlement currencies",
      "x-traitTag": true,
      "description": "This API enables processing and settlement of transactions in fiat currency USD, and stable coins: USDT and USDC. \nIt supports seamless currency conversion, validation, and settlement routing between traditional and digital assets."
    },
    {
      "name": "v2-quotes-payments",
      "description": "v2 is supported and not deprecated, with no sunset date. New integrations should use v3.",
      "x-displayName": "Quotes & payments"
    },
    {
      "name": "v2-validation",
      "description": "Check a beneficiary account or bank branch before paying.",
      "x-displayName": "Beneficiary validation"
    },
    {
      "name": "v2-balances",
      "description": "What you can pay out, per corridor.",
      "x-displayName": "Balances"
    },
    {
      "name": "v2-events",
      "description": "Payment updates as server-sent events.",
      "x-displayName": "Event stream"
    },
    {
      "name": "v2-reports",
      "description": "Generate and download payout reports.",
      "x-displayName": "Reports"
    },
    {
      "name": "v2-utilities",
      "description": "Connectivity checks.",
      "x-displayName": "Utilities"
    },
    {
      "name": "v3-quotes-payments",
      "description": "v3 is the current version: build new integrations against it. v3 has to be enabled for your organisation; it does not come with your credentials automatically, and until it is, `/v3` calls return 401 with a token that works on `/v2`.",
      "x-displayName": "Quotes & payments"
    },
    {
      "name": "v3-validation",
      "description": "Check a beneficiary account before paying it.",
      "x-displayName": "Beneficiary validation"
    },
    {
      "name": "v3-balances",
      "description": "What you can pay out, per corridor.",
      "x-displayName": "Balances"
    },
    {
      "name": "v3-events",
      "description": "Payment updates as server-sent events.",
      "x-displayName": "Event stream"
    },
    {
      "name": "v3-reports",
      "description": "Generate payout, statement and wallet reports.",
      "x-displayName": "Reports"
    },
    {
      "name": "v3-utilities",
      "description": "Reference data and connectivity checks.",
      "x-displayName": "Utilities"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Getting started",
      "tags": [
        "guide-changelog",
        "guide-credentials",
        "guide-authentication",
        "guide-signing-a-token",
        "guide-why-am-i-getting-a-401",
        "guide-transaction-states",
        "guide-settlement-currencies"
      ]
    },
    {
      "name": "API v3 (current)",
      "tags": [
        "v3-quotes-payments",
        "v3-validation",
        "v3-balances",
        "v3-events",
        "v3-reports",
        "v3-utilities"
      ]
    },
    {
      "name": "API v2 (maintenance)",
      "tags": [
        "v2-quotes-payments",
        "v2-validation",
        "v2-balances",
        "v2-events",
        "v2-reports",
        "v2-utilities"
      ]
    }
  ]
}