Брокерские платёжные поручения
OpenAPI 1.0.0
Создание и получение брокерских платёжных поручений
Варианты
- Паблик
Операции API
GET /v1/payments/orders — Получение списка платёжных поручений
Метод возвращает платёжные поручения организаций, доступных пользователю
{
"tags": [
"brokerage-payment-orders"
],
"operationId": "getPaymentOrders",
"summary": "Получение списка платёжных поручений",
"description": "Метод возвращает платёжные поручения организаций, доступных пользователю",
"parameters": [
{
"$ref": "#/components/parameters/PageNumberParam"
},
{
"$ref": "#/components/parameters/PageSizeParam"
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"description": "Список платёжных поручений",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentOrder"
}
},
"examples": {
"simple": {
"$ref": "#/components/examples/PaymentOrderListResponseExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
}
}POST /v1/payments/orders — Создание платёжного поручения
Метод создаёт подписанное брокерское платёжное поручение
{
"tags": [
"brokerage-payment-orders"
],
"operationId": "createPaymentOrder",
"summary": "Создание платёжного поручения",
"description": "Метод создаёт подписанное брокерское платёжное поручение",
"parameters": [
{
"$ref": "#/components/parameters/SignatureHeader"
},
{
"$ref": "#/components/parameters/CryptoProfileIdHeader"
},
{
"$ref": "#/components/parameters/SkipSecurityCacheHeader"
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"description": "Данные платёжного поручения",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentOrderCreateRequest"
},
"examples": {
"simple": {
"$ref": "#/components/examples/PaymentOrderCreateRequestExample"
}
}
}
}
},
"responses": {
"200": {
"description": "Созданное платёжное поручение",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentOrder"
},
"examples": {
"simple": {
"$ref": "#/components/examples/PaymentOrderResponseExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
}
}GET /v1/payments/orders/{id} — Получение платёжного поручения
Метод возвращает платёжное поручение по идентификатору
{
"tags": [
"brokerage-payment-orders"
],
"operationId": "getPaymentOrder",
"summary": "Получение платёжного поручения",
"description": "Метод возвращает платёжное поручение по идентификатору",
"parameters": [
{
"$ref": "#/components/parameters/PaymentOrderIdPathParam"
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"description": "Платёжное поручение",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentOrder"
},
"examples": {
"simple": {
"$ref": "#/components/examples/PaymentOrderResponseExample"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
}
}Схемы и примеры
{
"parameters": {
"PageNumberParam": {
"name": "page",
"in": "query",
"description": "Номер страницы, начиная с нуля",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0
},
"example": 0
},
"PageSizeParam": {
"name": "size",
"in": "query",
"description": "Количество элементов на странице",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 20
},
"example": 20
},
"SignatureHeader": {
"name": "X-Signature-Sign",
"in": "header",
"description": "Электронная подпись канонического JSON-тела запроса",
"required": true,
"schema": {
"type": "string"
},
"example": "MEUCIQDxExampleSignature"
},
"CryptoProfileIdHeader": {
"name": "X-Signature-Crypto-Profile-Id",
"in": "header",
"description": "Идентификатор криптографического профиля подписанта",
"required": true,
"schema": {
"type": "string"
},
"example": "6a9b8c7d-1234-4567-890a-bcdef1234567"
},
"SkipSecurityCacheHeader": {
"name": "X-Skip-Security-Cache",
"in": "header",
"description": "Признак принудительного обновления полномочий пользователя",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"example": false
},
"PaymentOrderIdPathParam": {
"name": "id",
"in": "path",
"description": "Идентификатор платёжного поручения",
"required": true,
"schema": {
"$ref": "#/components/schemas/PaymentOrderId"
},
"example": 128745
},
"IdTokenHeader": {
"name": "Id-Token",
"in": "header",
"description": "Идентификационный токен пользователя",
"required": true,
"schema": {
"type": "string",
"format": "byte",
"example": "SUQgVE9LRU4gRk9SIFRFU1RJTkc="
}
},
"AuthorizationHeader": {
"name": "Authorization",
"in": "header",
"description": "Токен доступа",
"required": true,
"schema": {
"type": "string",
"format": "byte",
"example": "Bearer QXV0aG9yaXphdGlvbiBIZWFkZXIgRm9yIFRlc3Rpbmc="
}
}
},
"schemas": {
"PaymentOrderCreateRequest": {
"type": "object",
"properties": {
"agreementNumber": {
"type": "string",
"description": "Номер брокерского договора",
"example": "35463"
},
"accountFrom": {
"type": "string",
"description": "Счёт списания",
"example": "40702810900000000001"
},
"accountTo": {
"type": "string",
"description": "Счёт зачисления",
"example": "40702810900000000002"
},
"description": {
"type": "string",
"description": "Назначение платежа",
"example": "Пополнение брокерского счёта"
},
"amount": {
"type": "number",
"description": "Сумма платежа",
"example": 150000.5
}
}
},
"PaymentOrder": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/PaymentOrderId"
},
"agreementNumber": {
"type": "string",
"description": "Номер брокерского договора",
"example": "35463"
},
"accountFrom": {
"type": "string",
"description": "Счёт списания",
"example": "40702810900000000001"
},
"accountTo": {
"type": "string",
"description": "Счёт зачисления",
"example": "40702810900000000002"
},
"description": {
"type": "string",
"description": "Назначение платежа",
"example": "Пополнение брокерского счёта"
},
"amount": {
"type": "number",
"description": "Сумма платежа",
"example": 150000.5
},
"status": {
"$ref": "#/components/schemas/PaymentOrderStatus"
},
"errorDescription": {
"type": "string",
"nullable": true,
"description": "Описание ошибки обработки поручения",
"example": null
}
}
},
"PaymentOrderId": {
"type": "integer",
"format": "int64",
"description": "Идентификатор платёжного поручения",
"example": 128745
},
"PaymentOrderStatus": {
"type": "string",
"description": "Статус обработки платёжного поручения",
"enum": [
"IN_PROGRESS",
"SUCCESS",
"ERROR"
],
"example": "SUCCESS"
},
"ErrorResponse": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Код ошибки",
"example": "VALIDATION_ERROR"
},
"message": {
"type": "string",
"description": "Описание ошибки",
"example": "Параметры запроса не прошли проверку"
},
"traceId": {
"type": "string",
"description": "Идентификатор трассировки запроса",
"example": "4bf92f3577b34da6a3ce929d0e0e4736"
},
"errors": {
"type": "object",
"nullable": true,
"description": "Детали ошибок по полям",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"responses": {
"BadRequest": {
"description": "Некорректный запрос",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"simple": {
"$ref": "#/components/examples/ErrorResponseExample"
}
}
}
}
},
"Forbidden": {
"description": "Недостаточно прав для выполнения операции",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"simple": {
"$ref": "#/components/examples/ErrorResponseExample"
}
}
}
}
},
"NotFound": {
"description": "Платёжное поручение не найдено",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"simple": {
"$ref": "#/components/examples/ErrorResponseExample"
}
}
}
}
},
"InternalServerError": {
"description": "Внутренняя ошибка сервиса",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"simple": {
"$ref": "#/components/examples/ErrorResponseExample"
}
}
}
}
},
"Unauthorized": {
"description": "Аутентификация не пройдена"
},
"InternalError": {
"description": "Внутренняя ошибка"
}
},
"examples": {
"PaymentOrderCreateRequestExample": {
"summary": "Пример создания платёжного поручения",
"description": "PaymentOrderCreateRequest",
"value": {
"agreementNumber": "35463",
"accountFrom": "40702810900000000001",
"accountTo": "40702810900000000002",
"description": "Пополнение брокерского счёта",
"amount": 150000.5
}
},
"PaymentOrderResponseExample": {
"summary": "Пример платёжного поручения",
"description": "PaymentOrder",
"value": {
"id": 128745,
"agreementNumber": "35463",
"accountFrom": "40702810900000000001",
"accountTo": "40702810900000000002",
"description": "Пополнение брокерского счёта",
"amount": 150000.5,
"status": "SUCCESS",
"errorDescription": null
}
},
"PaymentOrderListResponseExample": {
"summary": "Пример списка платёжных поручений",
"description": "PaymentOrderList",
"value": [
{
"id": 128745,
"agreementNumber": "35463",
"accountFrom": "40702810900000000001",
"accountTo": "40702810900000000002",
"description": "Пополнение брокерского счёта",
"amount": 150000.5,
"status": "SUCCESS",
"errorDescription": null
},
{
"id": 128746,
"agreementNumber": "35463",
"accountFrom": "40702810900000000001",
"accountTo": "40702810900000000002",
"description": "Пополнение брокерского счёта",
"amount": 25000,
"status": "IN_PROGRESS",
"errorDescription": null
}
]
},
"ErrorResponseExample": {
"summary": "Пример ошибки",
"description": "ErrorResponse",
"value": {
"code": "VALIDATION_ERROR",
"message": "Параметры запроса не прошли проверку",
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": null
}
}
}
}