{
  "openapi": "3.1.0",
  "info": {
    "title": "Paayzen API",
    "version": "1.0.0",
    "description": "This reference covers the aggregator’s `/api/v2` routes as inspected in the local source code.\n\nThe API base URL is https://paayzen.com.\n\n**Signing:** Sign the exact bytes sent on the wire; verify the exact raw response or callback body before parsing it. The `Get Transactions` operation explicitly does not require a signature. The aggregator applies signature verification to payment creation and payouts; the other documented v2 routes do not use that middleware.\n\n## Authentication\n\nThe collection uses Bearer authentication in the `Authorization` header, with explicit no-auth overrides on some operations. See each operation for its authentication setting.\n\n**Headers:**\n\n- `Authorization: Bearer`\n    \n- `Content-Type: application/json`\n    \n- `Signature:`\n    \n\n## Signature Verification\n\nPayment creation and payout requests require an HMAC-SHA256 signature using your secret key. This ensures the integrity and authenticity of the data exchanged between your system and the API.\n\n### Generating a Signature\n\nTo generate a signature, create an HMAC-SHA256 hash of the request body using your secret key.\n\nThere is a simple piece of PHP code that shows how to generate a signature:\n\n``` php\n/** @var \\Psr\\Http\\Message\\RequestInterface $request */\n$signature = hash_hmac(\n  'sha256',\n  $request->getBody()->getContents(),\n  $secretKey\n);\n$request->withHeader('Signature', $signature);\n\n ```\n\nOr JavaScript/Node.js:\n\n``` javascript\nconst hmac = require('crypto-js/hmac-sha256');\nconst body = {\n    orderId: '123',\n    // ...\n};\nconst signature = hmac(JSON.stringify(body), 'secretKey')\n  .toString();\n// 0a059c58184f388c6fe56bc07bf0b71f941ad85175283b5257fc9490422d9f6e\n\n ```\n\nOr Python:\n\n``` python\nimport hashlib\nimport hmac\nimport json\ndef sign(data: str, secret_key: str):\n    secret_key = bytes(secret_key, \"utf8\")\n    return hmac.new(secret_key, data.encode(), hashlib.sha256).hexdigest()\ndata = {\n    'orderId': '123',\n    # ...\n}\npayload = json.dumps(data, separators=(\",\", \":\"))\nsignature = sign(payload, 'secretKey')\nprint(signature)\n# 0ff2fa58c4811407c4cd5fcb5adef76bf32c4213a579da5b17ebffb61525cb11\n\n ```\n\n## Signature Verification for Responses\n\nThe source collection describes signed responses and callbacks. The inspected routes do not establish that every response is signed; verify a signature over the raw body when one is present and confirm callback behavior with the API provider.\n\n**Example in JavaScript:**\n\n``` javascript\nconst crypto = require('crypto');\n// Use the exact raw response bytes, before parsing JSON.\nconst responseBody = rawResponseBody;\nconst signature = response.headers['Signature'];\nconst expectedSignature = crypto.createHmac('sha256', secretKey).update(responseBody).digest('hex');\nif (signature === expectedSignature) {\n  // Signature is valid\n} else {\n  // Signature is invalid\n}\n\n ```\n\n---\n\n**Example in PHP:**\n\n``` php\n/** @var \\Psr\\Http\\Message\\ResponseInterface $response */\nif($response->getHeaderLine('Signature') === hash_hmac('sha256', $response->getBody()->getContents(), $secretKey))\n{\n  // You can trust\n}\n\n ```\n\n---\n\n### Error Codes\n\nBelow is a summary of error codes that can be returned by the API:\n\n| HTTP Status | Code | Message | Details |\n| --- | --- | --- | --- |\n| 400 | 400 | Invalid amount | The amount should be between and . |\n| 400 | 40001 | Invalid orderId | The provided orderId is either malformed or already exists. |\n| 400 | 40002 | All requisites are busy | Unable to create an invoice; all requisites are currently busy. |\n| 400 | 40003 | Invalid payment method | The specified payment method is not associated with the merchant. |\n| 400 | 40004 | Insufficient funds | The merchant does not have sufficient funds to process this payout. |\n| 404 | 40401 | Merchant not found | The specified merchantId does not exist or is invalid. |\n| 404 | 40402 | Payment method not found | The specified payment method does not exist. |\n| 404 | 40403 | No payment methods found | The merchant does not have any associated payment methods. |\n| 409 | 40901 | Duplicate payment | Payment with this orderId already exists and has been processed. |\n| 500 | 50001 | An error occurred | Internal server error. |\n\n---\n\n## Callbacks\n\nWhen a payment's status changes, the system can send a callback to the `callbackUri` provided during payment creation. The callback will include a signed payload similar to the response from the \"[Get Payment Status](#tag/API-Methods/operation/getPaymentStatus)\" endpoint. Callbacks include a signature header.\n\n**Possible state Values:**\n\n- `created` - payment created without an invoice (no method selected, user is redirected to choose a method)\n    \n- `pending`\\- **payment successfully created with the chosen method!**\n    \n- `dispute`\\- dispute/appeal\n    \n- `in_check`\\- payment verification initiated by the user or an active payout in progress.\n    \n- `finished`\\- payment successfully completed (final status).\n    \n- `canceled`\\- canceled by the user or the gateway (final status for payouts).\n    \n- `expired`\\- payment expired.\n    \n- `failed`\\- payment creation failed; no suitable requisite found (final status)\n    \n\n---\n\n---\n\n## Notes\n\n- **Error Handling:** Always check for `status: false` in the response to handle errors gracefully.\n    \n- **Rate Limiting:** Excessive requests may result in rate limiting. Ensure your application handles HTTP 429 responses."
  },
  "servers": [
    {
      "url": "https://paayzen.com",
      "description": "Paayzen API server"
    }
  ],
  "tags": [
    {
      "name": "API Methods"
    }
  ],
  "paths": {
    "/api/v2/payments": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Create Payment (payin)",
        "operationId": "createPayment",
        "description": "### Create Payment\n\nThis endpoint allows you to create a new payment request.\n\n#### Request Body\n\n- `orderId` (string): The ID of the order.\n    \n- `merchantId` (string): Unique identifier of the merchant.\n    \n- `amount` (number): The amount of the payment.\n    \n- `assetOrBank` (string, optional): bank or crypto name.\n    \n- `senderBank` (string, optional, conditional-required for cross‑border methods) — Identifier of the payer’s bank. Used to select FX rate tables, routing rules, and limits for cross‑border payments. For example, `\"tbank\"`, `\"sber\"`, `\"vtb\"`, `\"alfa\"`.\n    \n- `method` (string): The payment method.\n    \n    - `p2p` - card-number transfer, EUR/USD\n        \n    - `upi` - UPI id mail transfer, INR\n        \n    - `krw` - bank account transfer, KRW\n        \n    - `mpesa`\\- mobile phone-based transfer, KES\n        \n    - `ars`\\- CVU number transfer, ARS\n        \n    - `c2ckz` - card-number transfer, KZT\n        \n    - `c2cuz` - mix card-number transfer, UZS\n        \n    - `humo` - HUMO card-number transfer, UZS\n        \n    - `uzcard` - UZCARD card-number transfer, UZS\n        \n    - `c2caz` - card-number transfer, AZN\n        \n    - `kgs` - card-number transfer, KGS\n        \n    - `c2c` - card-number transfer, RUB\n        \n    - `sbp` - phone-number transfer via Russia’s Faster Payments System (RUB)\n        \n    - `spay` - SberPay one-click QR transfer through Sberbank Online (RUB)\n        \n    - `tpay` - intrabank phone-number transfer in T-Bank (RUB)\n        \n    - `vpay` - intrabank phone-number transfer in VTB (RUB)\n        \n    - `apay` - intrabank phone-number transfer in Alfa-Bank (RUB)\n        \n    - `ozon` - intrabank phone-number transfer in OZON Bank (RUB)\n        \n    - `psb` - intrabank phone-number transfer in PSB (RUB)\n        \n    - `gazprom` - intrabank phone-number transfer in Gazprom (RUB)\n        \n    - `abh`\\- cross-border, RUB\n        \n    - `m2ctj` - cross-border card transfer to Tajikistan (RUB)\n        \n    - `m2ntj` - cross-border phone-number transfer to Tajikistan (RUB)\n        \n    - `m2nam` - cross-border phone-number transfer to Armenia (RUB)\n        \n    - `connectc2c` - card-number matching, RUB\n        \n    - `connectsbp` - phone-number matching via SBP, RUB\n        \n    - `nspk` - QR transfer through the Faster Payments System\n        \n    - `ecom` - classic 3-DS acquiring\n        \n    - `ecom` - classic 3-DS acquiring\n        \n    - `revo` - internal transfer, EUR\n        \n    - `paypal` - internal transfer, EUR\n        \n    - `crypto` - crypto processing (specify asset in `assetOrBank`) (\"BTC\" \"LTC\" \"DOGE\" \"XMR\" \"XRP\" \"ETH\" \"ETH-USDT\" \"ETH-USDC\" \"TRX\" \"USDT\" \"USDC\" \"AVAX\" \"AVALANCHE-USDT\" \"AVALANCHE-USDC\" \"BNB\" \"BNB-USDT\" \"BNB-USDC\" \"MATIC\" \"POLYGON-USDT\" \"POLYGON-USDC\")\n        \n- `currency` _(string, optional)_ - The currency of the payment\n    \n    - `RUB` - Russian Ruble\n        \n    - `UZS` - UZ Som\n        \n    - `KZT` - Kazakhstani tenge\n        \n    - `EUR` - Euros\n        \n    - ... - etc.\n        \n- `userId` (string): The ID of the user.\n    \n- `userIp` (string, optional): User IP. Higher chance of successful payment creation\n    \n- `callbackUri` (string): The URI to which the callback response will be sent. link to which server will send POST request with JSON payment processing result\n    \n- `successUri` (string): The URI to redirect to on successful payment.\n    \n- `failUri` (string): The URI to redirect to on failed payment.\n\n#### Signature\n\nCalculate the `Signature` header as the hexadecimal HMAC-SHA256 of the exact request body bytes using your secret key. Calculate it again whenever the body changes. Scalar does not generate the signature automatically.\n\nThe validator requires `orderId` (string, max 255), `merchantId` (string), and `amount` (number, minimum 1). Other fields described above are nullable in the shared validator; availability checks may impose additional requirements.\n\nMerchant IP allowlisting may restrict access to this route.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "example": {
                "amount": 5034,
                "method": "ozon",
                "currency": "RUB",
                "orderId": "3a72sfedseqsf24besadsdd5w4b3682ad3",
                "merchantId": "{{merchant_id}}",
                "callbackUri": "https://google.com/"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Success",
                    "value": {
                      "status": true,
                      "result": {
                        "id": "66dc4b308b78c",
                        "state": "pending",
                        "address": "+7 (999) 234-12-34",
                        "bank": "sber",
                        "recipient": "Иванов Иван Иванович",
                        "rate": 91.93,
                        "amount": 1000.0,
                        "init_amount": 1000.0,
                        "bankName": "Сбербанк"
                      },
                      "url": "https://checkout.com/66dc4b308b78c"
                    }
                  },
                  "example4": {
                    "summary": "transgran",
                    "value": {
                      "status": true,
                      "result": {
                        "id": "66dc4b308b78c",
                        "state": "pending",
                        "address": "+992200115507",
                        "bank": "dcitybank",
                        "recipient": "Иванов Иван Иванович",
                        "rate": 91.93,
                        "amount": 1000.0,
                        "init_amount": 1000.0,
                        "bankName": "Душанбе Сити Банк",
                        "message": "Выберите перевод по номеру телефона, введите скопированный номер, выберете банк Душанбе Сити Банк, введите сумму, подтвердите перевод"
                      },
                      "url": "https://checkout.com/66dc4b308b78c"
                    }
                  },
                  "example5": {
                    "summary": "INR UPI",
                    "value": {
                      "status": true,
                      "result": {
                        "id": "ae5d4e8df-1aa3-4942-b79a-5acddba8d3f0g",
                        "state": "pending",
                        "address": "8986768",
                        "bank": "indusind",
                        "recipient": "Namrata Cherian",
                        "rate": 85.26,
                        "amount": 1000.0,
                        "init_amount": 1000.0,
                        "bankName": "Indusind Bank"
                      },
                      "url": "https://checkout.com/66dc4b308b78c"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example2": {
                    "summary": "Invalid amount",
                    "value": {
                      "status": false,
                      "error": {
                        "code": 400,
                        "message": "Invalid amount",
                        "details": "The amount should be between 500 and 300000."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example3": {
                    "summary": "Merchant not found",
                    "value": {
                      "status": false,
                      "error": {
                        "code": 40401,
                        "message": "Merchant not found",
                        "details": "The specified merchantId does not exist or is invalid."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Signature",
            "in": "header",
            "required": true,
            "description": "Lowercase hexadecimal HMAC-SHA256 digest of the exact request body bytes, calculated using your secret key. Scalar does not calculate this automatically.",
            "schema": {
              "type": "string"
            },
            "example": "YOUR_CALCULATED_HMAC_SHA256"
          }
        ]
      }
    },
    "/api/v2/payouts": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Payout Request",
        "operationId": "createPayout",
        "description": "Creates a payout request to transfer funds to a specified card number.\n\n**Request Body Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `amount` | number | Yes | Amount to be transferred. |\n| `address` | string | Yes | Card or Phone(SBP) number of the recipient. |\n| `method` | string | Yes | Payment method code. See [Payment Methods](#tag/API-Methods/operation/getMethods). |\n| `currency` | string | No | Currency code. Default is `RUB`. |\n| `recipient` | string | No | Name of the recipient. |\n| `assetOrBank` | string | No | Bank of the recipient. |\n| `orderId` | string | No | Unique order ID. If not provided, a unique ID will be generated. |\n| `merchantId` | string | No | Unique identifier of the merchant. |\n| `callbackUri` | string | No | URI to which the callback response will be sent. |\n\nThe authenticated merchant is taken from the bearer token. The implementation requires `amount`, `method`, and either `address` or `cardNumber`; it does not require `merchantId` or `recipient` in its validator.\n\nMerchant IP allowlisting may restrict access to this route.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "example": {
                "amount": 1200,
                "address": "1234432112344321",
                "method": "c2c",
                "currency": "RUB",
                "recipient": "TEST TESTOVICH",
                "assetOrBank": "сберыч",
                "orderId": "test22t2e2st",
                "merchantId": "{{merchant_id}}",
                "callbackUri": "https://callback.xyz/callback/pay"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Success",
                    "value": {
                      "status": true,
                      "result": {
                        "address": "1234432112344321",
                        "recipient": "TEST TESTOVICH",
                        "amount": -3000,
                        "id": "672ab37e402a4",
                        "state": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example2": {
                    "summary": "Insufficient funds",
                    "value": {
                      "status": false,
                      "error": {
                        "code": 40004,
                        "message": "Insufficient funds",
                        "details": "The merchant does not have sufficient funds to process this payout."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Signature",
            "in": "header",
            "required": true,
            "description": "Lowercase hexadecimal HMAC-SHA256 digest of the exact request body bytes, calculated using your secret key. Scalar does not calculate this automatically.",
            "schema": {
              "type": "string"
            },
            "example": "YOUR_CALCULATED_HMAC_SHA256"
          }
        ]
      }
    },
    "/api/v2/status": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Payment Status",
        "operationId": "getPaymentStatus",
        "description": "### API Request Description\n\nThis POST request is used to retrieve the status of a payment with the provided merchant ID and payment ID. The request should include the merchant ID and payment ID in the request body.\n\n**Request Body Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `merchantId` | string | Yes | Unique identifier of the merchant. |\n| `paymentId` | string | No | The unique payment ID generated by the system. |\n| `orderId` | string | No | The original order ID provided during payment creation. |\n| `paymentIds` | array | No | An array of payment IDs to retrieve multiple statuses. |\n| `orderIds` | array | No | An array of order IDs to retrieve multiple statuses. |\n\nProvide `merchantId` and at least one of `paymentId`, `orderId`, `paymentIds`, or `orderIds`. When multiple fields are supplied, the controller checks them in that order.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "example": {
                "merchantId": "{{merchant_id}}",
                "paymentId": "a2190182a-a64c-4752-898d-836b8abe9cc6g"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Success",
                    "value": {
                      "datetime": 1755690497,
                      "id": "a2190182a-b64c-4756-898d-836b8abe9cc6g",
                      "orderId": "02c4f5da-2000-48b9-af2e-d7a498c95f08",
                      "created_at": "2025-08-20T11:47:48.000000Z",
                      "expired_at": "2025-08-20T12:02:48.000000Z",
                      "status": false,
                      "state": "pending",
                      "type": "payin",
                      "userId": "19bd3fs4-c8b7-411c-8641-502d2e0b586d81",
                      "amount": "2182.00",
                      "media": [],
                      "init_amount": "2182.00",
                      "amount_commission_less": 1941.98,
                      "currency": "RUB",
                      "rate": 80.79,
                      "commission": 11,
                      "method": "c2c"
                    }
                  },
                  "example2": {
                    "summary": "Success Array",
                    "value": [
                      {
                        "datetime": 1755690497,
                        "id": "a2190182a-b64c-4756-898d-836b8abe9cc6g",
                        "orderId": "02c4f5da-2000-48b9-af2e-d7a498c95f08",
                        "created_at": "2025-08-20T11:47:48.000000Z",
                        "expired_at": "2025-08-20T12:02:48.000000Z",
                        "status": false,
                        "state": "pending",
                        "type": "payin",
                        "userId": "19bd3fs4-c8b7-411c-8641-502d2e0b586d81",
                        "amount": "2182.00",
                        "media": [],
                        "init_amount": "2182.00",
                        "amount_commission_less": 1941.98,
                        "currency": "RUB",
                        "rate": 80.79,
                        "commission": 11,
                        "method": "c2c"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rate": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Rate (Commission)",
        "operationId": "getRate",
        "description": "### Get Commissions\n\n**Query Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `method_code` | string | No | Filter by payment method code. |\n\n**Response:**\n\n**Error Responses:**\n\n- { \"status\": false, \"error\": { \"code\": 40403, \"message\": \"No payment methods found\", \"details\": \"The merchant does not have any associated payment methods.\" }}",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "method_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "RUB"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Commissions",
                    "value": {
                      "data": [
                        {
                          "code": "c2c",
                          "currency": "RUB",
                          "sell": {
                            "commission": 7,
                            "rate": 91.23,
                            "total": 98.23
                          },
                          "buy": {
                            "commission": -2,
                            "rate": 92.66,
                            "total": 90.66
                          }
                        },
                        {
                          "code": "sbp",
                          "currency": "RUB",
                          "sell": {
                            "commission": 7,
                            "rate": 91.23,
                            "total": 98.23
                          },
                          "buy": {
                            "commission": -2,
                            "rate": 92.66,
                            "total": 90.66
                          }
                        },
                        {
                          "code": "spay",
                          "currency": "RUB",
                          "sell": {
                            "commission": 7,
                            "rate": 91.23,
                            "total": 98.23
                          },
                          "buy": {
                            "commission": -2,
                            "rate": 92.66,
                            "total": 90.66
                          }
                        },
                        {
                          "code": "a2a",
                          "currency": "RUB",
                          "sell": {
                            "commission": 6,
                            "rate": 91.23,
                            "total": 97.23
                          },
                          "buy": {
                            "commission": -2,
                            "rate": 92.66,
                            "total": 90.66
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/banks": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Asset (Bank)",
        "operationId": "getBanks",
        "description": "Retrieves the list of banks associated with payment methods for a specific currency.\n\nAttention, it does not give the full list of available banks. Request the list from support.\n\n**Query Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `currency` | string | Yes | Currency code (e.g., `RUB`, `USD`). |\n| `method_code` | string | No | Filter by payment method code. |",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "RUB",
            "description": "Required currency, which must exist in the available methods."
          },
          {
            "name": "method_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "sbp",
            "description": "Optional method code; must exist in method types."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Banks for method and currency",
                    "value": {
                      "data": [
                        {
                          "code": "sbp",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "example2": {
                    "summary": "Get Banks for currency",
                    "value": {
                      "data": [
                        {
                          "code": "c2c",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "sbp",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "m2c",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "c2cg",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "sbpg",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "spay",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "pc",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "st",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "a2a",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "cf",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "bz",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "pcsbp",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "stsbp",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "bzspb",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "cfspb",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "p2",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "p2sbp",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "lc",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        },
                        {
                          "code": "lcspb",
                          "currency": "RUB",
                          "banks": {
                            "banks": [
                              {
                                "slug": "sber",
                                "name": "Сбербанк"
                              },
                              {
                                "slug": "gazprombank",
                                "name": "Газпромбанк"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/methods": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Methods",
        "operationId": "getMethods",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Methods",
                    "value": {
                      "data": [
                        {
                          "code": "sbp",
                          "currency": "RUB"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "RUB",
            "description": "Required currency, which must exist in the available methods."
          },
          {
            "name": "method_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional method code; must exist in method types."
          }
        ],
        "description": "Return payment methods available to the authenticated merchant. Currency is required and must exist in configured methods; method_code is optional."
      }
    },
    "/api/v2/balance": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Balance",
        "operationId": "getBalance",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Balance",
                    "value": {
                      "balances": {
                        "USDT": 5.235386122859397,
                        "RUB": 0
                      },
                      "date": "2024.09.11 21:17"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Return the authenticated merchant’s balances by currency and a response date. Both balance routes call equivalent balance logic in the inspected code."
      }
    },
    "/api/v2/fiat_balance": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Fiat Balance",
        "operationId": "getFiatBalance",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Balance",
                    "value": {
                      "balances": {
                        "USDT": 3.230336986866127e-06,
                        "RUB": 30984.051908
                      },
                      "date": "2025.09.24 22:26"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Return the authenticated merchant’s balances by currency and a response date. Both balance routes call equivalent balance logic in the inspected code."
      }
    },
    "/api/v2/transactions": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Transactions",
        "operationId": "getTransactions",
        "description": "Returns the merchant's statement: transactions credited to or debited from the balance for a period (analogue of the statement in the merchant cabinet). Only transactions that are counted in the balance are returned, newest first. The merchant is determined by the Bearer token. The `Signature` header is not required.\n\nRate limit: 30 requests per minute.\n\n**Query Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `date_from` | string | Yes | Period start, inclusive. Date or datetime, ISO-8601, UTC if no offset (e.g. `2026-09-01` or `2026-09-01T00:00:00Z`). |\n| `date_to` | string | Yes | Period end, exclusive. Must be ≥ `date_from`; the period must not exceed 31 days. |\n| `type` | string | No | Filter by type: `payin`, `payout`, `withdrawal`, `deposit`, `converted`. |\n| `page` | integer | No | Page number, default `1`. |\n| `per_page` | integer | No | Items per page, 1–500, default `100`. |\n\nThe period filters by transaction creation time.\n\n**Response fields (`data[]`):**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | string | Payment ID in our system. |\n| `order_id` | string | Your order ID (`orderId` passed on creation). |\n| `type` | string | `payin`, `payout`, `withdrawal`, `deposit`, `converted`. |\n| `state` | string | Payment status. |\n| `created_at` | string | Creation time, ISO-8601 UTC. |\n| `updated_at` | string | Last update time, ISO-8601 UTC. |\n| `amount` | string | Payment amount in `currency`. Negative for payouts and other debits. |\n| `currency` | string | Payment currency. |\n| `rate` | string \\| null | Exchange rate applied to the transaction (`currency` per 1 USDT). `null` when the transaction is settled in `currency` without conversion. |\n| `commission_percent` | string | Commission, %. |\n| `credited_amount` | string | Amount credited to your balance after commission, in `credited_currency`. Negative for debits. |\n| `credited_currency` | string | Balance currency of the credit: `USDT`, or the payment currency when settled without conversion. |\n\n`pagination` contains `total`, `per_page`, `current_page`, `last_page`, `from`, `to`.\n\n**Errors:** `400` with code `40001` on invalid parameters.\n\nExample request:\n\n```bash\ncurl -G \"https://paayzen.com/api/v2/transactions\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Accept: application/json\" \\\n  --data-urlencode \"date_from=2026-10-01T00:00:00Z\" \\\n  --data-urlencode \"date_to=2026-10-26T00:00:00Z\" \\\n  --data-urlencode \"type=payin\" \\\n  --data-urlencode \"page=1\" \\\n  --data-urlencode \"per_page=100\"\n```\n\nThe accepted type is `payin`, not `pay_in`.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-10-26T00:00:00Z"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "payin",
                "payout",
                "withdrawal",
                "deposit",
                "converted"
              ]
            },
            "example": "payin",
            "description": "Transaction type. Use payin (not pay_in) for incoming payments."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "example": 1
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Transactions",
                    "value": {
                      "data": [
                        {
                          "id": "p9c1e5b0e-2f4a-4d1b-9a3e-0c6f1d2b7e8aa",
                          "order_id": "ORD-100045",
                          "type": "payin",
                          "state": "finished",
                          "created_at": "2026-09-15T10:21:04Z",
                          "updated_at": "2026-09-15T10:27:51Z",
                          "amount": "10000.00000",
                          "currency": "RUB",
                          "rate": "95.120000",
                          "commission_percent": "8.5",
                          "credited_amount": "96.194281",
                          "credited_currency": "USDT"
                        },
                        {
                          "id": "p1b7d3a9c-6e2f-4c8b-b1d4-7a9e3f5c2d10a",
                          "order_id": "PO-2031",
                          "type": "payout",
                          "state": "finished",
                          "created_at": "2026-09-14T08:02:11Z",
                          "updated_at": "2026-09-14T08:40:37Z",
                          "amount": "-5000.00000",
                          "currency": "RUB",
                          "rate": "95.300000",
                          "commission_percent": "-2",
                          "credited_amount": "-53.515215",
                          "credited_currency": "USDT"
                        }
                      ],
                      "pagination": {
                        "total": 2,
                        "per_page": 100,
                        "current_page": 1,
                        "last_page": 1,
                        "from": 1,
                        "to": 2
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example2": {
                    "summary": "Period over 31 days",
                    "value": {
                      "status": false,
                      "error": {
                        "code": 40001,
                        "message": "Validation failed",
                        "details": "The period between date_from and date_to must not exceed 31 days."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/{order_id}/status": {
      "patch": {
        "tags": [
          "API Methods"
        ],
        "summary": "Set Payment Status",
        "operationId": "setPaymentStatus",
        "description": "Endpoint to update the status of an order. For 'dispute' status, a file can be uploaded.\n\nUpdates the status of an order. For 'dispute' status, a file can be uploaded.\n\n**Path Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `order_id` | string | Yes | Unique identifier of the order. |\n\n**Request Body Parameters:**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `status` | string | Yes | New status of the order. |\n| `file` | base64 | No | File content |\n| `utr` | string | No | RRN for acutocomplited payment (INR) |\n\n**Possible Status Values:**\n\n- `dispute`\\- апеляция (Отправка чека доступна)\n    \n- `in_check`\\- инициация проверки оплаты от пользователя \"Я оплатил\". (Отправка чека доступна)\n    \n- `canceled`\\- инициация отмены оплаты от пользователя \"Отменить платеж\". (Отправка чека не доступна)\n    \n\n**Response:**\n\n- { \"message\": \"Order status updated successfully.\"}\n    \n\n**Error Responses:**\n\n- { \"message\": \"Payment not found.\"}\n\nThe validator accepts `canceled`, `in_check`, and `dispute`. A base64 `file` is required by the validator for `dispute`; `files` may contain additional base64 files.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "canceled",
                      "in_check",
                      "dispute"
                    ]
                  },
                  "file": {
                    "type": "string",
                    "description": "Base64 file; required for dispute."
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Additional base64 files."
                  },
                  "utr": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "status": "in_check",
                "utr": "123245",
                "reason": "subStatus"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Set Payment Status",
                    "value": {
                      "data": {
                        "id": "a4beef6f5-9939-4c6d-be0f-18e9e24bbf13g",
                        "order_id": "a4beef6f5-9939-4c6d-be0f-18e9e24bbf13g",
                        "orderId": "65ada1d8-5c9c-4291-8ab1-c3ec24c82989",
                        "external_id": "65ada1d8-5c9c-4291-8ab1-c3ec24c82989",
                        "status": false,
                        "state": "in_check",
                        "type": "payin",
                        "reason": null,
                        "amount": "5842.00",
                        "init_amount": "5842.00",
                        "userId": "739620040610",
                        "invoice": {
                          "address": "2202208438626294",
                          "bank": {
                            "code": "sber",
                            "name": "Сбербанк"
                          },
                          "message": null,
                          "recipient": "Дмитрий Игоревич К",
                          "method": {
                            "name": "P2P",
                            "logo": {
                              "name": "image/c2c.png",
                              "url": "https://aggrepay.pro/image/c2c.png"
                            },
                            "currency": "RUB"
                          },
                          "media": [],
                          "created_at": "2025-05-17T00:07:47.000000Z",
                          "updated_at": "2025-05-17T00:22:54.000000Z"
                        },
                        "success_uri": null,
                        "fail_uri": null,
                        "currency": "RUB",
                        "created_at": "2025-05-17T00:07:46.000000Z",
                        "updated_at": "2025-05-16T21:29:41.000000Z"
                      },
                      "status": true,
                      "message": "Payment status updated successfully."
                    }
                  },
                  "example2": {
                    "summary": "200 in_check utr",
                    "value": {
                      "data": {
                        "id": "a4beef6f5-9939-4c6d-be0f-18e9e24bbf13g",
                        "order_id": "a4beef6f5-9939-4c6d-be0f-18e9e24bbf13g",
                        "orderId": "65ada1d8-5c9c-4291-8ab1-c3ec24c82989",
                        "external_id": "65ada1d8-5c9c-4291-8ab1-c3ec24c82989",
                        "status": false,
                        "state": "in_check",
                        "type": "payin",
                        "reason": null,
                        "amount": "5842.00",
                        "init_amount": "5842.00",
                        "userId": "739620040610",
                        "invoice": {
                          "address": "2202208438626294",
                          "bank": {
                            "code": "sber",
                            "name": "Сбербанк"
                          },
                          "message": null,
                          "recipient": "Дмитрий Игоревич К",
                          "method": {
                            "name": "P2P",
                            "logo": {
                              "name": "image/c2c.png",
                              "url": "https://aggrepay.pro/image/c2c.png"
                            },
                            "currency": "RUB"
                          },
                          "media": [],
                          "created_at": "2025-05-17T00:07:47.000000Z",
                          "updated_at": "2025-05-17T00:22:54.000000Z"
                        },
                        "success_uri": null,
                        "fail_uri": null,
                        "currency": "RUB",
                        "created_at": "2025-05-17T00:07:46.000000Z",
                        "updated_at": "2025-05-16T21:29:41.000000Z"
                      },
                      "status": true,
                      "message": "Payment status updated successfully."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example3": {
                    "summary": "422 Unprocessable Content",
                    "value": {
                      "message": "The selected status is invalid.",
                      "errors": {
                        "status": [
                          "The selected status is invalid."
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/{order_id}": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Order by ID",
        "operationId": "getOrder",
        "description": "Получает информацию о платеже по его order_id.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Order by ID",
                    "value": {
                      "data": {
                        "order_id": "6755c96cdfab3",
                        "status": null,
                        "state": "created",
                        "amount": "1000.00",
                        "terminal_user_id": "123qweds1ss2dsыdsss342",
                        "merchant": {
                          "id": 42,
                          "name": "TesterTester",
                          "code": "ljsf1opu7eqrfoytme7rq8ol",
                          "created_at": "2024-02-02T07:27:16.000000Z",
                          "updated_at": "2024-11-09T06:52:16.000000Z"
                        },
                        "callback_uri": "https://yourdomain.com/callback",
                        "success_uri": "https://yourdomain.com/success",
                        "fail_uri": "https://yourdomain.com/fail",
                        "currency": "RUB",
                        "created_at": "2024-12-08T16:29:32.000000Z",
                        "updated_at": "2024-12-08T16:29:32.000000Z"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/{order_id}/banks": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Order Banks",
        "operationId": "getOrderBanks",
        "description": "Возвращает список доступных банков для данного платежа (order_id). Можно также использовать фильтры `method_code` и `currency`.\n\n`currency` is required by the request validator. Rate limit: 60 requests per minute.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order identifier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional method code; must exist in method types."
          },
          {
            "name": "currency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required currency, which must exist in the available methods."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "example1": {
                    "summary": "Get Order Banks",
                    "value": {
                      "data": [
                        {
                          "name": "P2P",
                          "code": "c2c",
                          "type": "CARD",
                          "logo": {
                            "name": "image/c2c.png",
                            "url": "https://aggrepay:8890/image/c2c.png"
                          },
                          "currency": "RUB",
                          "banks": []
                        },
                        {
                          "name": "СБП",
                          "code": "sbp",
                          "type": "PHONE",
                          "logo": {
                            "name": "image/sbp.png",
                            "url": "https://aggrepay:8890/image/sbp.png"
                          },
                          "currency": "RUB",
                          "banks": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/{order_id}/methods": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Order Methods",
        "operationId": "getOrderMethods",
        "description": "Возвращает список доступных методов оплаты для указанного order_id. Можно фильтровать по `method_code` и `currency`.\n\n`currency` is required by the request validator.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order identifier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional method code; must exist in method types."
          },
          {
            "name": "currency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required currency, which must exist in the available methods."
          }
        ],
        "responses": {
          "default": {
            "description": "Response example not provided in the source collection."
          }
        }
      }
    },
    "/api/v2/orders/{order_id}/payments": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Create Invoice for Selected Method",
        "operationId": "createInvoice",
        "description": "После выбора пользователем метода оплаты вызываем этот метод, чтобы создать инвойс для данного платежа (order_id).\n\nThe collection’s request example contained a comment; the JSON example shown here removes it.\n\n`method` is required. The payment and merchant are resolved from the order ID. The route does not apply bearer authentication middleware.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "method": "upi"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Response example not provided in the source collection."
          }
        }
      }
    },
    "/api/v2/payments/{order_id}/phone": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Submit Phone for Payment",
        "operationId": "submitPaymentPhone",
        "description": "Submit the payer phone number when an existing invoice requires a phone step. The authenticated merchant must own the payment. If a requisite already exists, it is returned without submitting another phone number.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Paayzen payment identifier (order_id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Phone number; the selected provider must support a phone step."
                  }
                }
              },
              "example": {
                "phone": "+79991234567"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Phone submitted or an existing requisite returned.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "result": {
                    "id": "example-payment-id",
                    "state": "pending",
                    "address": "example-requisite",
                    "requires_phone": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, unsupported phone step, or invalid phone number."
          },
          "404": {
            "description": "Payment not found or not accessible to the authenticated merchant."
          },
          "409": {
            "description": "Invoice has not been created."
          },
          "502": {
            "description": "Provider did not issue a requisite."
          }
        }
      }
    },
    "/api/v2/orders/{order_id}/phone": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Submit Phone for Order",
        "operationId": "submitOrderPhone",
        "description": "Submit the payer phone number when an existing invoice requires a phone step. This route does not apply bearer authentication middleware. If a requisite already exists, it is returned without submitting another phone number.",
        "security": [],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Paayzen payment identifier (order_id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Phone number; the selected provider must support a phone step."
                  }
                }
              },
              "example": {
                "phone": "+79991234567"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Phone submitted or an existing requisite returned.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "result": {
                    "id": "example-payment-id",
                    "state": "pending",
                    "address": "example-requisite",
                    "requires_phone": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, unsupported phone step, or invalid phone number."
          },
          "404": {
            "description": "Payment not found or not accessible to the authenticated merchant."
          },
          "409": {
            "description": "Invoice has not been created."
          },
          "502": {
            "description": "Provider did not issue a requisite."
          }
        }
      }
    },
    "/api/v2/payout_banks": {
      "get": {
        "tags": [
          "API Methods"
        ],
        "summary": "Get Payout Banks",
        "operationId": "getPayoutBanks",
        "description": "Return the configured list of payout banks grouped by currency. The list is defined in the aggregator and may change.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bank codes and names grouped by currency.",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "currency": "RUB",
                      "banks": [
                        {
                          "code": "absolutbank",
                          "name": "Абсолют Банк"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/qr-parse": {
      "post": {
        "tags": [
          "API Methods"
        ],
        "summary": "Parse Payout QR",
        "operationId": "parseQr",
        "description": "Parse decoded QR text using the specified method. The response contains the parsed result, a USDT exchange rate and payout commission when available.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method",
                  "qr_decoded"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "description": "Payment method code."
                  },
                  "qr_decoded": {
                    "type": "string",
                    "maxLength": 1024,
                    "description": "Decoded QR payload as text."
                  }
                }
              },
              "example": {
                "method": "example_method",
                "qr_decoded": "decoded QR text"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Parsed QR result. `rate` and `commission` can be null.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "rate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "commission": {},
                    "asset": {
                      "type": "string",
                      "const": "USDT"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters, unsupported method, or invalid QR."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token supplied by Paayzen."
      }
    }
  }
}
