/v1/operations/{external_operation_id}ㅤ

Запрос на получение деталей операций авторизации, списания, возврата или отмены платежа.

Request

GET

https://pay.yandex.ru/api/merchant/v1/operations/{external_operation_id}

Production

GET

https://sandbox.pay.yandex.ru/api/merchant/v1/operations/{external_operation_id}

Sandbox

Path parameters

Name

Description

external_operation_id

Type: string

Идентификатор операции на стороне продавца

Max length: 2048

Example: ``

Responses

200 OK

Body

application/json
{
  "code": 200,
  "data": {
    "operation": {
      "amount": "123.45",
      "created": "2025-01-01T00:00:00Z",
      "externalOperationId": "example",
      "operationId": "123e4567-e89b-12d3-a456-426614174000",
      "operationType": "AUTHORIZE",
      "orderId": "example",
      "params": {},
      "pointsAmount": "123.45",
      "reason": "example",
      "status": "PENDING",
      "updated": "2025-01-01T00:00:00Z"
    }
  },
  "status": "success"
}

Name

Description

code

Type: unknown

Default: 200

data

Type: OperationResponseData

Example
{
  "operation": {
    "amount": "123.45",
    "created": "2025-01-01T00:00:00Z",
    "externalOperationId": "example",
    "operationId": "123e4567-e89b-12d3-a456-426614174000",
    "operationType": "AUTHORIZE",
    "orderId": "example",
    "params": {},
    "pointsAmount": "123.45",
    "reason": "example",
    "status": "PENDING",
    "updated": "2025-01-01T00:00:00Z"
  }
}

status

Type: string

Default: success

Const: success

Operation

Name

Description

amount

Type: string<double>

Сумма операции в фиатной валюте

Example: 123.45

operationId

Type: string<uuid>

Max length: 2048

Example: 123e4567-e89b-12d3-a456-426614174000

operationType

Type: string

Enum: AUTHORIZE, BIND_CARD, REFUND, CAPTURE, VOID, RECURRING, PREPAYMENT, SUBMIT

orderId

Type: string

Уникальный идентификатор заказа на стороне продавца.

Используется:

  • как ключ идемпотентности;
  • для дальнейшего взаимодействия по заказу и платежу;
  • в сверках.

Max length: 2048

Example: example

created

Type: string<date-time>

Дата и время создания операции (ISO 8601)

Example: 2025-01-01T00:00:00Z

externalOperationId

Type: string

Идентификатор операции на стороне продавца

Max length: 2048

Example: example

params

Type: object

Дополнительные параметры операции. Список полей отличается в зависимости от типа операции.

При возврате сохраняются motive, branchId и managerId, которые вы указали в запросе /refund:

{
  "params": {
    "motive": "Товар не устроил", // причина возврата
    "branch_id": "42", // идентификатор точки продаж
    "manager_id": "12345" // идентификатор менеджера
  }
}

При отмене сохраняется reason, который вы указали в запросе /cancel:

{
  "params": {
    "cancel_reason": "Покупатель отказался" // причина отмены
  }
}
Example
{}

pointsAmount

Type: string<double>

Сумма операции в баллах Плюса

Example: 123.45

reason

Type: string

Причина ошибки

Max length: 2048

Example: example

status

Type: string

Default: PENDING

Enum: PENDING, SUCCESS, FAIL

updated

Type: string<date-time>

Дата и время обновления операции (ISO 8601)

Example: 2025-01-01T00:00:00Z

Example
{
  "amount": "123.45",
  "created": "2025-01-01T00:00:00Z",
  "externalOperationId": "example",
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "operationType": "AUTHORIZE",
  "orderId": "example",
  "params": {},
  "pointsAmount": "123.45",
  "reason": "example",
  "status": "PENDING",
  "updated": "2025-01-01T00:00:00Z"
}

OperationResponseData

Name

Description

operation

Type: Operation

Example
{
  "amount": "123.45",
  "created": "2025-01-01T00:00:00Z",
  "externalOperationId": "example",
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "operationType": "AUTHORIZE",
  "orderId": "example",
  "params": {},
  "pointsAmount": "123.45",
  "reason": "example",
  "status": "PENDING",
  "updated": "2025-01-01T00:00:00Z"
}
Example
{
  "operation": {
    "amount": "123.45",
    "created": "2025-01-01T00:00:00Z",
    "externalOperationId": "example",
    "operationId": "123e4567-e89b-12d3-a456-426614174000",
    "operationType": "AUTHORIZE",
    "orderId": "example",
    "params": {},
    "pointsAmount": "123.45",
    "reason": "example",
    "status": "PENDING",
    "updated": "2025-01-01T00:00:00Z"
  }
}

No longer supported, please use an alternative and newer version.

Предыдущая
Следующая