/v1/orders/{order_id}/refund

Deprecated

Важно

Этот метод устарел. Используйте новую версию v2/orders/{order_id}/refund.

Запрос на возврат средств за заказ.

Доступно только для платежей в статусе CAPTURED и PARTIALLY_REFUNDED. В случае успеха статус платежа изменится на REFUNDED или PARTIALLY_REFUNDED в зависимости от суммы и будет отправлено событие ORDER_STATUS_UPDATED. Событие OPERATION_STATUS_UPDATED будет отправлено как в случае успеха, так и при возникновении ошибки в процессе совершения возврата.

В запросе нужно передать итоговую корзину предоставляемых товаров и услуг. Итоговая корзина должна формироваться из текущей корзины исключением некоторых позиций, либо корректировкой стоимости имеющихся позиций, по которым производился возврат. Сумма корзины должна совпадать с текущей суммой платежа за вычетом суммы возврата.

Примечание

Сумма возврата не может быть менее 1 рубля, после частичного возврата оставшаяся сумма корзины не может быть менее 1 рубля

Request

POST

https://pay.yandex.ru/api/merchant/v1/orders/{order_id}/refund

Production

POST

https://sandbox.pay.yandex.ru/api/merchant/v1/orders/{order_id}/refund

Sandbox

Path parameters

Name

Description

order_id

Type: string

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

Max length: 2048

Example: ``

Body

application/json
{
  "cart": {
    "cartId": "example",
    "coupons": [
      {
        "description": "example",
        "status": "VALID",
        "value": "example"
      }
    ],
    "discounts": [
      {
        "amount": "123.45",
        "description": "example",
        "discountId": "example"
      }
    ],
    "externalId": "example",
    "items": [
      {
        "description": "example",
        "discountedUnitPrice": "123.45",
        "features": null,
        "measurements": null,
        "productId": "example",
        "quantity": null,
        "receipt": null,
        "skuId": "example",
        "subtotal": "123.45",
        "title": "example",
        "total": "123.45",
        "type": "UNSPECIFIED",
        "unitPrice": "123.45"
      }
    ],
    "measurements": {
      "height": 0.5,
      "length": 0.5,
      "weight": 0.5,
      "width": 0.5
    },
    "total": {
      "amount": "123.45",
      "externalAmount": "123.45"
    }
  },
  "externalOperationId": "example",
  "orderAmount": "123.45",
  "refundAmount": "123.45",
  "refundExternalAmount": 123.45,
  "shipping": {
    "amount": "123.45",
    "methodType": "DIRECT"
  }
}

Name

Description

orderAmount

Type: string<double>

Итоговая сумма заказа. Равна cart.total.amount + shipping.amount

Example: 123.45

refundAmount

Type: string<double>

Сумма к возврату. Минимальная сумма возврата — 1 рубль.

Example: 123.45

cart

All of 1 type
  • Type: CartWithRequiredTotalWithoutFinalPrice

    Example
    {
      "cartId": "example",
      "coupons": [
        {
          "description": "example",
          "status": "VALID",
          "value": "example"
        }
      ],
      "discounts": [
        {
          "amount": "123.45",
          "description": "example",
          "discountId": "example"
        }
      ],
      "externalId": "example",
      "items": [
        {
          "description": "example",
          "discountedUnitPrice": "123.45",
          "features": {
            "pointsDisabled": false,
            "tariffModifier": "VERY_LOW"
          },
          "measurements": {
            "height": 0.5,
            "length": 0.5,
            "weight": 0.5,
            "width": 0.5
          },
          "productId": "example",
          "quantity": {
            "available": "123.45",
            "count": "123.45"
          },
          "receipt": {
            "agent": {},
            "excise": "123.45",
            "markQuantity": {},
            "measure": 0,
            "paymentMethodType": 1,
            "paymentSubjectType": 1,
            "productCode": "example",
            "supplier": {},
            "tax": 1,
            "title": "example"
          },
          "skuId": "example",
          "subtotal": "123.45",
          "title": "example",
          "total": "123.45",
          "type": "UNSPECIFIED",
          "unitPrice": "123.45"
        }
      ],
      "measurements": null,
      "total": {
        "amount": "123.45",
        "externalAmount": "123.45"
      }
    }
    

Итоговая корзина

Example
{
  "cartId": "example",
  "coupons": [
    {
      "description": "example",
      "status": "VALID",
      "value": "example"
    }
  ],
  "discounts": [
    {
      "amount": "123.45",
      "description": "example",
      "discountId": "example"
    }
  ],
  "externalId": "example",
  "items": [
    {
      "description": "example",
      "discountedUnitPrice": "123.45",
      "features": null,
      "measurements": null,
      "productId": "example",
      "quantity": null,
      "receipt": null,
      "skuId": "example",
      "subtotal": "123.45",
      "title": "example",
      "total": "123.45",
      "type": "UNSPECIFIED",
      "unitPrice": "123.45"
    }
  ],
  "measurements": null,
  "total": {
    "amount": "123.45",
    "externalAmount": "123.45"
  }
}

externalOperationId

Type: string

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

Max length: 2048

Example: example

refundExternalAmount

Type: number | null

Сумма внешней оплаты, которую вы вернули покупателю (сертификаты, подарочные карты, баллы лояльности).

Может быть не указана, равна 0 или больше 0.

Ограничение: Не должна превышать значение externalAmount, переданное в /orders при создании заказа.

Min value: 0

shipping

Type: ShippingPrice

Example
{
  "amount": "123.45",
  "methodType": "DIRECT"
}

Coupon

Name

Description

value

Type: string

Код купона

Max length: 2048

Example: example

description

Type: string

Описание. Например, "Скидка 3%"

Max length: 2048

Example: example

status

Type: string

Enum: VALID, INVALID, EXPIRED, null

Example: VALID

Example
{
  "description": "example",
  "status": "VALID",
  "value": "example"
}

Discount

Name

Description

amount

Type: string<double>

Сумма скидки

Example: 123.45

description

Type: string

Текстовое описание

Max length: 2048

Example: example

discountId

Type: string

Идентификатор скидки в системе мерчанта

Max length: 2048

Example: example

Example
{
  "amount": "123.45",
  "description": "example",
  "discountId": "example"
}

CartItemFeatures

Name

Description

pointsDisabled

Type: boolean

Не распределять баллы Плюса. Используется только при создании заказа. Если это поле не указано, то баллы будут распределены на товар

Default: false

tariffModifier

Type: string

Модификатор тарифа для расчета комиссии. Определяет, какой тариф будет применяться при расчете комиссии за обработку позиции в корзине.

Enum: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH, null

Example: VERY_LOW

Example
{
  "pointsDisabled": false,
  "tariffModifier": "VERY_LOW"
}

Measurements

Name

Description

height

Type: number

Высота, в метрах

length

Type: number

Длина, в метрах

weight

Type: number

Вес, в килограммах

width

Type: number

Ширина, в метрах

Example
{
  "height": 0.5,
  "length": 0.5,
  "weight": 0.5,
  "width": 0.5
}

ItemQuantity

Name

Description

count

Type: string<double>

Количество товара в заказе.

Это поле обязательно для формирования чека, если в личном кабинете подключена фискализация через Яндекс Пэй.

Example: 123.45

available

Type: string<double>

Максимально доступное количество товара

Example: 123.45

Example
{
  "available": "123.45",
  "count": "123.45"
}

PaymentsOperator

Name

Description

phones

Type: string[]

Example
[
  "example"
]
Example
{
  "phones": [
    "example"
  ]
}

TransferOperator

Name

Description

address

Type: string

Max length: 2048

Example: example

inn

Type: string

Max length: 2048

Example: example

name

Type: string

Max length: 2048

Example: example

phones

Type: string[]

Example
[
  "example"
]
Example
{
  "address": "example",
  "inn": "example",
  "name": "example",
  "phones": [
    "example"
  ]
}

Agent

Name

Description

agentType

Type: integer

Признак агента по предмету расчёта. См. значения

Enum: 1, 2, 3, 4, 5, 6, 7

operation

Type: string

Max length: 2048

Example: example

paymentsOperator

Type: PaymentsOperator

Example
{
  "phones": [
    "example"
  ]
}

phones

Type: string[]

Example
[
  "example"
]

transferOperator

Type: TransferOperator

Example
{
  "address": "example",
  "inn": "example",
  "name": "example",
  "phones": [
    "example"
  ]
}
Example
{
  "agentType": 1,
  "operation": "example",
  "paymentsOperator": {
    "phones": [
      "example"
    ]
  },
  "phones": [
    "example"
  ],
  "transferOperator": {
    "address": "example",
    "inn": "example",
    "name": "example",
    "phones": [
      "example"
    ]
  }
}

MarkQuantity

Name

Description

denominator

Type: integer

numerator

Type: integer

Example
{
  "denominator": 0,
  "numerator": 0
}

Supplier

Name

Description

inn

Type: string

Max length: 2048

Example: example

name

Type: string

Max length: 2048

Example: example

phones

Type: string[]

Example
[
  "example"
]
Example
{
  "inn": "example",
  "name": "example",
  "phones": [
    "example"
  ]
}

ItemReceipt

Данные для формирования чека.

Name

Description

tax

Type: integer

Ставка НДС. Описание значений: Ссылка.

Это поле обязательно для формирования чека, если в личном кабинете подключена фискализация через Яндекс Пэй.

Enum: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

agent

Type: Agent

Example
{
  "agentType": 1,
  "operation": "example",
  "paymentsOperator": {
    "phones": [
      "example"
    ]
  },
  "phones": [
    "example"
  ],
  "transferOperator": {
    "address": "example",
    "inn": "example",
    "name": "example",
    "phones": [
      "example"
    ]
  }
}

excise

Type: string<double>

Не должно содержать больше двух знаков после запятой. Например: 1.12, 5.1, 10, 11.00 .

Example: 123.45

markQuantity

Type: MarkQuantity

Example
{
  "denominator": 0,
  "numerator": 0
}

measure

Type: integer

Описание значений: Ссылка

Enum: 0, 10, 11, 12, 20, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51, 70, 71, 72, 73, 80, 81, 82, 83, 255, null

paymentMethodType

Type: integer

Описание значений: Ссылка

Enum: 1, 2, 3, 4, 5, 6, 7, null

paymentSubjectType

Type: integer

Описание значений: Ссылка

Enum: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, null

productCode

Type: string<base64>

Код товара (base64 кодированный массив от 1 до 32 байт)

Example: example

supplier

Type: Supplier

Example
{
  "inn": "example",
  "name": "example",
  "phones": [
    "example"
  ]
}

title

Type: string

Max length: 2048

Example: example

Example
{
  "agent": {
    "agentType": 1,
    "operation": "example",
    "paymentsOperator": {
      "phones": [
        "example"
      ]
    },
    "phones": [
      "example"
    ],
    "transferOperator": {
      "address": "example",
      "inn": "example",
      "name": "example",
      "phones": [
        "example"
      ]
    }
  },
  "excise": "123.45",
  "markQuantity": {
    "denominator": 0,
    "numerator": 0
  },
  "measure": 0,
  "paymentMethodType": 1,
  "paymentSubjectType": 1,
  "productCode": "example",
  "supplier": {
    "inn": "example",
    "name": "example",
    "phones": [
      "example"
    ]
  },
  "tax": 1,
  "title": "example"
}

CartItemWithoutFinalPriceCamelCase

Name

Description

productId

Type: string

Id товара в системе продавца. В параметрах запроса каждый идентификатор товара productId должен быть уникальным

Max length: 2048

Example: example

quantity

All of 1 type
  • Type: ItemQuantity

    Example
    {
      "available": "123.45",
      "count": "123.45"
    }
    

Количество товара в заказе

Example
{
  "available": "123.45",
  "count": "123.45"
}

description

Type: string

Описание товара

Max length: 2048

Example: example

discountedUnitPrice

Type: string<double>

Цена за единицу товара с учётом скидок на позицию

Example: 123.45

features

All of 1 type
  • Type: CartItemFeatures

    Example
    {
      "pointsDisabled": false,
      "tariffModifier": "VERY_LOW"
    }
    

Промо параметры товара

Example
{
  "pointsDisabled": false,
  "tariffModifier": "VERY_LOW"
}

measurements

All of 1 type
  • Type: Measurements

    Example
    {
      "height": 0.5,
      "length": 0.5,
      "weight": 0.5,
      "width": 0.5
    }
    

Размеры и вес товара. Обязательно для товара типа PHYSICAL

Example
{
  "height": 0.5,
  "length": 0.5,
  "weight": 0.5,
  "width": 0.5
}

receipt

All of 1 type
  • Type: ItemReceipt

    Данные для формирования чека.

    Example
    {
      "agent": {
        "agentType": 1,
        "operation": "example",
        "paymentsOperator": {
          "phones": [
            "example"
          ]
        },
        "phones": [
          "example"
        ],
        "transferOperator": {
          "address": "example",
          "inn": "example",
          "name": "example",
          "phones": [
            "example"
          ]
        }
      },
      "excise": "123.45",
      "markQuantity": {
        "denominator": 0,
        "numerator": 0
      },
      "measure": 0,
      "paymentMethodType": 1,
      "paymentSubjectType": 1,
      "productCode": "example",
      "supplier": {
        "inn": "example",
        "name": "example",
        "phones": [
          "example"
        ]
      },
      "tax": 1,
      "title": "example"
    }
    

Данные для формирования чека.

Example
{
  "agent": {
    "agentType": 1,
    "operation": "example",
    "paymentsOperator": {
      "phones": [
        "example"
      ]
    },
    "phones": [
      "example"
    ],
    "transferOperator": {
      "address": "example",
      "inn": "example",
      "name": "example",
      "phones": [
        "example"
      ]
    }
  },
  "excise": "123.45",
  "markQuantity": {
    "denominator": 0,
    "numerator": 0
  },
  "measure": 0,
  "paymentMethodType": 1,
  "paymentSubjectType": 1,
  "productCode": "example",
  "supplier": {
    "inn": "example",
    "name": "example",
    "phones": [
      "example"
    ]
  },
  "tax": 1,
  "title": "example"
}

skuId

Type: string

Уникальный id, который описывает единицу ассортимента. Необходим для применения индивидуального тарифа.

Max length: 2048

Example: example

subtotal

Type: string<double>

Суммарная цена за позицию без учета скидок

Example: 123.45

title

Type: string

Наименование товара

Max length: 2048

Example: example

total

Type: string<double>

Итоговая цена позиции с учетом примененных скидок.

Важно

Убедитесь, что цена за единицу товара (total / quantity.count) имеет максимум 2 знака в дробной части. Иначе вернется ошибка ORDER_CART_DATA_ERROR.

Чтобы избежать ошибок, вынесите товары в отдельные позиции с разными productId.

Пример

Правильно:

{
  "productId": "xxx-123",
  "quantity": {
    "count": "2"
  },
  "title": "Мармелад",
  "total": "100.50"
}

Цена за единицу 100.50 / 2 = 50.25 c двумя знаками в дробной части.

Неправильно:

{
  "productId": "xxx-123",
  "quantity": {
    "count": "2"
  },
  "title": "Мармелад",
  "total": "100.25"
}

Цена за единицу 100.25 / 2 = 50.125 c тремя знаками в дробной части.

В таком случае разбейте на две позиции:

[
  {
    "productId": "xxx-123-1",
    "quantity": {
      "count": "1"
    },
    "title": "Мармелад",
    "total": "50.25"
  },
  {
    "productId": "xxx-123-2",
    "quantity": {
      "count": "1"
    },
    "title": "Мармелад со скидкой",
    "total": "50"
  }
]

Example: 123.45

type

Type: string

Тип товара. Важен для интеграции с доставками

Default: UNSPECIFIED

Enum: PHYSICAL, DIGITAL, UNSPECIFIED

unitPrice

Type: string<double>

Полная цена за единицу товара без учетка скидки

Example: 123.45

Example
{
  "description": "example",
  "discountedUnitPrice": "123.45",
  "features": {
    "pointsDisabled": false,
    "tariffModifier": "VERY_LOW"
  },
  "measurements": {
    "height": 0.5,
    "length": 0.5,
    "weight": 0.5,
    "width": 0.5
  },
  "productId": "example",
  "quantity": {
    "available": "123.45",
    "count": "123.45"
  },
  "receipt": {
    "agent": {
      "agentType": 1,
      "operation": "example",
      "paymentsOperator": {
        "phones": [
          null
        ]
      },
      "phones": [
        "example"
      ],
      "transferOperator": {
        "address": "example",
        "inn": "example",
        "name": "example",
        "phones": [
          null
        ]
      }
    },
    "excise": "123.45",
    "markQuantity": {
      "denominator": 0,
      "numerator": 0
    },
    "measure": 0,
    "paymentMethodType": 1,
    "paymentSubjectType": 1,
    "productCode": "example",
    "supplier": {
      "inn": "example",
      "name": "example",
      "phones": [
        "example"
      ]
    },
    "tax": 1,
    "title": "example"
  },
  "skuId": "example",
  "subtotal": "123.45",
  "title": "example",
  "total": "123.45",
  "type": "UNSPECIFIED",
  "unitPrice": "123.45"
}

CartTotal

Name

Description

amount

Type: string<double>

Стоимость корзины с учетом всех скидок.

Это поле обязательно для формирования чека, если в личном кабинете подключена фискализация через Яндекс Пэй.

Example: 123.45

externalAmount

Type: string<double>

Сумма внешней оплаты (сертификаты, подарочные карты, баллы лояльности).

Может быть не указана, равна 0 или больше 0.

Ограничения:

  • Нельзя создать заказ с amount: "0" (полная оплата внешними средствами). Минимальная сумма для оплаты через Яндекс Пэй — 1 рубль.
  • Сумма amount + externalAmount должна равняться сумме всех items в корзине.
  • (Для двухстадийных платежей) При списании средств методом /orders/{order_id}/capture не должна превышать значение, переданное в /orders при создании заказа.

Example: 123.45

Example
{
  "amount": "123.45",
  "externalAmount": "123.45"
}

CartWithRequiredTotalWithoutFinalPrice

Name

Description

items

Type: CartItemWithoutFinalPriceCamelCase[]

Example
[
  {
    "description": "example",
    "discountedUnitPrice": "123.45",
    "features": {
      "pointsDisabled": false,
      "tariffModifier": "VERY_LOW"
    },
    "measurements": {
      "height": 0.5,
      "length": 0.5,
      "weight": 0.5,
      "width": 0.5
    },
    "productId": "example",
    "quantity": {
      "available": "123.45",
      "count": "123.45"
    },
    "receipt": {
      "agent": {
        "agentType": 1,
        "operation": "example",
        "paymentsOperator": {},
        "phones": [
          null
        ],
        "transferOperator": {}
      },
      "excise": "123.45",
      "markQuantity": {
        "denominator": 0,
        "numerator": 0
      },
      "measure": 0,
      "paymentMethodType": 1,
      "paymentSubjectType": 1,
      "productCode": "example",
      "supplier": {
        "inn": "example",
        "name": "example",
        "phones": [
          null
        ]
      },
      "tax": 1,
      "title": "example"
    },
    "skuId": "example",
    "subtotal": "123.45",
    "title": "example",
    "total": "123.45",
    "type": "UNSPECIFIED",
    "unitPrice": "123.45"
  }
]

total

Type: CartTotal

Example
{
  "amount": "123.45",
  "externalAmount": "123.45"
}

cartId

Type: string

Внутренний идентификатор корзины на стороне Яндекс Пэй.

Max length: 2048

Example: example

coupons

Type: Coupon[]

Купоны, применённые к корзине

Example
[
  {
    "description": "example",
    "status": "VALID",
    "value": "example"
  }
]

discounts

Type: Discount[]

Скидки, применённые к корзине

Example
[
  {
    "amount": "123.45",
    "description": "example",
    "discountId": "example"
  }
]

externalId

Type: string

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

Max length: 2048

Example: example

measurements

Type: Measurements

Example
{
  "height": 0.5,
  "length": 0.5,
  "weight": 0.5,
  "width": 0.5
}
Example
{
  "cartId": "example",
  "coupons": [
    {
      "description": "example",
      "status": "VALID",
      "value": "example"
    }
  ],
  "discounts": [
    {
      "amount": "123.45",
      "description": "example",
      "discountId": "example"
    }
  ],
  "externalId": "example",
  "items": [
    {
      "description": "example",
      "discountedUnitPrice": "123.45",
      "features": {
        "pointsDisabled": false,
        "tariffModifier": "VERY_LOW"
      },
      "measurements": {
        "height": 0.5,
        "length": 0.5,
        "weight": 0.5,
        "width": 0.5
      },
      "productId": "example",
      "quantity": {
        "available": "123.45",
        "count": "123.45"
      },
      "receipt": {
        "agent": {},
        "excise": "123.45",
        "markQuantity": {},
        "measure": 0,
        "paymentMethodType": 1,
        "paymentSubjectType": 1,
        "productCode": "example",
        "supplier": {},
        "tax": 1,
        "title": "example"
      },
      "skuId": "example",
      "subtotal": "123.45",
      "title": "example",
      "total": "123.45",
      "type": "UNSPECIFIED",
      "unitPrice": "123.45"
    }
  ],
  "measurements": null,
  "total": {
    "amount": "123.45",
    "externalAmount": "123.45"
  }
}

ShippingPrice

Name

Description

amount

Type: string<double>

Не должно содержать больше двух знаков после запятой. Например: 1.12, 5.1, 10, 11.00 .

Example: 123.45

methodType

Type: string

Enum: DIRECT, PICKUP, COURIER, YANDEX_DELIVERY

Example
{
  "amount": "123.45",
  "methodType": "DIRECT"
}

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

CartItemWithoutFinalPriceCamelCase

Name

Description

productId

Type: string

Id товара в системе продавца. В параметрах запроса каждый идентификатор товара productId должен быть уникальным

Max length: 2048

Example: example

quantity

All of 1 type
  • Type: ItemQuantity

    Example
    {
      "available": "123.45",
      "count": "123.45"
    }
    

Количество товара в заказе

Example
{
  "available": "123.45",
  "count": "123.45"
}

description

Type: string

Описание товара

Max length: 2048

Example: example

discountedUnitPrice

Type: string<double>

Цена за единицу товара с учётом скидок на позицию

Example: 123.45

features

All of 1 type
  • Type: CartItemFeatures

    Example
    {
      "pointsDisabled": false,
      "tariffModifier": "VERY_LOW"
    }
    

Промо параметры товара

Example
{
  "pointsDisabled": false,
  "tariffModifier": "VERY_LOW"
}

measurements

All of 1 type
  • Type: Measurements

    Example
    {
      "height": 0.5,
      "length": 0.5,
      "weight": 0.5,
      "width": 0.5
    }
    

Размеры и вес товара. Обязательно для товара типа PHYSICAL

Example
{
  "height": 0.5,
  "length": 0.5,
  "weight": 0.5,
  "width": 0.5
}

pointsAmount

Type: string<double>

Количество баллов Плюса

Поле только для чтения. Переданные значения будут проигнорированы.

Example: 123.45

receipt

All of 1 type
  • Type: ItemReceipt

    Данные для формирования чека.

    Example
    {
      "agent": {
        "agentType": 1,
        "operation": "example",
        "paymentsOperator": {
          "phones": [
            "example"
          ]
        },
        "phones": [
          "example"
        ],
        "transferOperator": {
          "address": "example",
          "inn": "example",
          "name": "example",
          "phones": [
            "example"
          ]
        }
      },
      "excise": "123.45",
      "markQuantity": {
        "denominator": 0,
        "numerator": 0
      },
      "measure": 0,
      "paymentMethodType": 1,
      "paymentSubjectType": 1,
      "productCode": "example",
      "supplier": {
        "inn": "example",
        "name": "example",
        "phones": [
          "example"
        ]
      },
      "tax": 1,
      "title": "example"
    }
    

Данные для формирования чека.

Example
{
  "agent": {
    "agentType": 1,
    "operation": "example",
    "paymentsOperator": {
      "phones": [
        "example"
      ]
    },
    "phones": [
      "example"
    ],
    "transferOperator": {
      "address": "example",
      "inn": "example",
      "name": "example",
      "phones": [
        "example"
      ]
    }
  },
  "excise": "123.45",
  "markQuantity": {
    "denominator": 0,
    "numerator": 0
  },
  "measure": 0,
  "paymentMethodType": 1,
  "paymentSubjectType": 1,
  "productCode": "example",
  "supplier": {
    "inn": "example",
    "name": "example",
    "phones": [
      "example"
    ]
  },
  "tax": 1,
  "title": "example"
}

skuId

Type: string

Уникальный id, который описывает единицу ассортимента. Необходим для применения индивидуального тарифа.

Max length: 2048

Example: example

subtotal

Type: string<double>

Суммарная цена за позицию без учета скидок

Example: 123.45

title

Type: string

Наименование товара

Max length: 2048

Example: example

total

Type: string<double>

Итоговая цена позиции с учетом примененных скидок.

Важно

Убедитесь, что цена за единицу товара (total / quantity.count) имеет максимум 2 знака в дробной части. Иначе вернется ошибка ORDER_CART_DATA_ERROR.

Чтобы избежать ошибок, вынесите товары в отдельные позиции с разными productId.

Пример

Правильно:

{
  "productId": "xxx-123",
  "quantity": {
    "count": "2"
  },
  "title": "Мармелад",
  "total": "100.50"
}

Цена за единицу 100.50 / 2 = 50.25 c двумя знаками в дробной части.

Неправильно:

{
  "productId": "xxx-123",
  "quantity": {
    "count": "2"
  },
  "title": "Мармелад",
  "total": "100.25"
}

Цена за единицу 100.25 / 2 = 50.125 c тремя знаками в дробной части.

В таком случае разбейте на две позиции:

[
  {
    "productId": "xxx-123-1",
    "quantity": {
      "count": "1"
    },
    "title": "Мармелад",
    "total": "50.25"
  },
  {
    "productId": "xxx-123-2",
    "quantity": {
      "count": "1"
    },
    "title": "Мармелад со скидкой",
    "total": "50"
  }
]

Example: 123.45

type

Type: string

Тип товара. Важен для интеграции с доставками

Default: UNSPECIFIED

Enum: PHYSICAL, DIGITAL, UNSPECIFIED

unitPrice

Type: string<double>

Полная цена за единицу товара без учетка скидки

Example: 123.45

Example
{
  "description": "example",
  "discountedUnitPrice": "123.45",
  "features": {
    "pointsDisabled": false,
    "tariffModifier": "VERY_LOW"
  },
  "measurements": {
    "height": 0.5,
    "length": 0.5,
    "weight": 0.5,
    "width": 0.5
  },
  "pointsAmount": "123.45",
  "productId": "example",
  "quantity": {
    "available": "123.45",
    "count": "123.45"
  },
  "receipt": {
    "agent": {
      "agentType": 1,
      "operation": "example",
      "paymentsOperator": {
        "phones": [
          null
        ]
      },
      "phones": [
        "example"
      ],
      "transferOperator": {
        "address": "example",
        "inn": "example",
        "name": "example",
        "phones": [
          null
        ]
      }
    },
    "excise": "123.45",
    "markQuantity": {
      "denominator": 0,
      "numerator": 0
    },
    "measure": 0,
    "paymentMethodType": 1,
    "paymentSubjectType": 1,
    "productCode": "example",
    "supplier": {
      "inn": "example",
      "name": "example",
      "phones": [
        "example"
      ]
    },
    "tax": 1,
    "title": "example"
  },
  "skuId": "example",
  "subtotal": "123.45",
  "title": "example",
  "total": "123.45",
  "type": "UNSPECIFIED",
  "unitPrice": "123.45"
}

CartTotal

Name

Description

amount

Type: string<double>

Стоимость корзины с учетом всех скидок.

Это поле обязательно для формирования чека, если в личном кабинете подключена фискализация через Яндекс Пэй.

Example: 123.45

externalAmount

Type: string<double>

Сумма внешней оплаты (сертификаты, подарочные карты, баллы лояльности).

Может быть не указана, равна 0 или больше 0.

Ограничения:

  • Нельзя создать заказ с amount: "0" (полная оплата внешними средствами). Минимальная сумма для оплаты через Яндекс Пэй — 1 рубль.
  • Сумма amount + externalAmount должна равняться сумме всех items в корзине.
  • (Для двухстадийных платежей) При списании средств методом /orders/{order_id}/capture не должна превышать значение, переданное в /orders при создании заказа.

Example: 123.45

pointsAmount

Type: string<double>

Количество баллов Плюса

Поле только для чтения. Переданные значения будут проигнорированы.

Example: 123.45

Example
{
  "amount": "123.45",
  "externalAmount": "123.45",
  "pointsAmount": "123.45"
}

CartWithRequiredTotalWithoutFinalPrice

Name

Description

items

Type: CartItemWithoutFinalPriceCamelCase[]

Example
[
  {
    "description": "example",
    "discountedUnitPrice": "123.45",
    "features": {
      "pointsDisabled": false,
      "tariffModifier": "VERY_LOW"
    },
    "measurements": {
      "height": 0.5,
      "length": 0.5,
      "weight": 0.5,
      "width": 0.5
    },
    "pointsAmount": "123.45",
    "productId": "example",
    "quantity": {
      "available": "123.45",
      "count": "123.45"
    },
    "receipt": {
      "agent": {
        "agentType": 1,
        "operation": "example",
        "paymentsOperator": {},
        "phones": [
          null
        ],
        "transferOperator": {}
      },
      "excise": "123.45",
      "markQuantity": {
        "denominator": 0,
        "numerator": 0
      },
      "measure": 0,
      "paymentMethodType": 1,
      "paymentSubjectType": 1,
      "productCode": "example",
      "supplier": {
        "inn": "example",
        "name": "example",
        "phones": [
          null
        ]
      },
      "tax": 1,
      "title": "example"
    },
    "skuId": "example",
    "subtotal": "123.45",
    "title": "example",
    "total": "123.45",
    "type": "UNSPECIFIED",
    "unitPrice": "123.45"
  }
]

total

Type: CartTotal

Example
{
  "amount": "123.45",
  "externalAmount": "123.45",
  "pointsAmount": "123.45"
}

cartId

Type: string

Внутренний идентификатор корзины на стороне Яндекс Пэй.

Max length: 2048

Example: example

coupons

Type: Coupon[]

Купоны, применённые к корзине

Example
[
  {
    "description": "example",
    "status": "VALID",
    "value": "example"
  }
]

discounts

Type: Discount[]

Скидки, применённые к корзине

Example
[
  {
    "amount": "123.45",
    "description": "example",
    "discountId": "example"
  }
]

externalId

Type: string

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

Max length: 2048

Example: example

measurements

Type: Measurements

Example
{
  "height": 0.5,
  "length": 0.5,
  "weight": 0.5,
  "width": 0.5
}
Example
{
  "cartId": "example",
  "coupons": [
    {
      "description": "example",
      "status": "VALID",
      "value": "example"
    }
  ],
  "discounts": [
    {
      "amount": "123.45",
      "description": "example",
      "discountId": "example"
    }
  ],
  "externalId": "example",
  "items": [
    {
      "description": "example",
      "discountedUnitPrice": "123.45",
      "features": {
        "pointsDisabled": false,
        "tariffModifier": "VERY_LOW"
      },
      "measurements": {
        "height": 0.5,
        "length": 0.5,
        "weight": 0.5,
        "width": 0.5
      },
      "pointsAmount": "123.45",
      "productId": "example",
      "quantity": {
        "available": "123.45",
        "count": "123.45"
      },
      "receipt": {
        "agent": {},
        "excise": "123.45",
        "markQuantity": {},
        "measure": 0,
        "paymentMethodType": 1,
        "paymentSubjectType": 1,
        "productCode": "example",
        "supplier": {},
        "tax": 1,
        "title": "example"
      },
      "skuId": "example",
      "subtotal": "123.45",
      "title": "example",
      "total": "123.45",
      "type": "UNSPECIFIED",
      "unitPrice": "123.45"
    }
  ],
  "measurements": null,
  "total": {
    "amount": "123.45",
    "externalAmount": "123.45",
    "pointsAmount": "123.45"
  }
}

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.

Предыдущая