---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.uz/support/split-business/en/custom/backend/merchant-api/webhook.md
  - https://yandex.uz/support/split-business/ru/custom/backend/merchant-api/webhook.md
  - https://yandex.uz/support/split-business/uz/custom/backend/merchant-api/webhook.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.uz/support/split-business/uz/llms.txt

<div class="openapi">

# /v1/webhook

<!-- markdownlint-disable-file -->

Status o‘zgarishi haqida bildirishnomalar.

Buyurtma statusi yoki buyurtma bo‘yicha operatsiya statusi o‘zgarganda so‘rov yuboriladi.

Dastaklanadigan hodisalar:

- `ORDER_STATUS_UPDATED` – buyurtma holati yangilash;
- `OPERATION_STATUS_UPDATED` – mablag‘ yechish, qaytarish yoki to‘lovni bekor qilish operatsiyasi holatni yangilash.
<!-- - `SUBSCRIPTION_STATUS_UPDATED` — сейчас этот статус не отдаем? -->

## So‘rov formati {#webhook-format}

So‘rov `application/octet-stream` formatida yuboriladi va ES256 algoritmi bilan imzolangan JWT-token ko‘rinishida bo‘ladi. So‘rovni qayta ishlashdan oldin uning haqiqiyligini tekshiring. Buni qanday qilish haqida [Autentifikatsiya](https://yandex.uz/support/split-business/uz/custom/backend/merchant-api/index.md)bo‘limida o‘qing.

Tekshirilib dekod qilingan JWT-tokenning payload qismi hodisa ma’lumotlarini o‘z ichiga olgan JSON'dan iborat bo‘ladi. [Hodisalar misollarini](#webhook-examples) ko‘ring.

{% note warning "Agar token ichida so‘rov tanasi mavjud bo‘lmasa" %}

- Do‘kon bekendi `Content-Type: application/octet-stream` sarlavhasi bilan keladigan xabarlarni qabul qila olishiga ishonch hosil qiling.
- Brandmauer kiruvchi so‘rovlarni bloklamayotganini va so‘rov tanasini kesib tashlamayotganini tekshiring.

Boshqa xatoliklarni [Webhooklar bilan bog‘liq muammolarni hal qilish](https://yandex.uz/support/split-business/uz/custom/backend/merchant-api/index.md#troubleshooting)bo‘limida ko‘ring.

{% endnote %}

## Operatsiyalar idempotentligi {#idempotency}

Buyurtma bilan bog‘liq amallarni bajarishda, masalan, [/v2/orders/{order_id}/refund](https://yandex.uz/support/split-business/uz/custom/backend/yandex-pay-api/order/merchant_v2_refund-post.md) metodi orqali mablag‘larni qaytarishda, operatsiyaning noyob identifikatori – `externalOperationId`ni uzating.

U yordamida siz:
- qaysi operatsiya bo‘yicha bildirishnoma kelganini aniqlashingiz;
- [v1/operations/{external_operation_id}](https://yandex.uz/support/split-business/uz/custom/backend/yandex-pay-api/operation/merchant_v1_operations-get.md) metodi orqali operatsiya holatini tekshirishingiz;
- operatsiya takrorlanishidan himoyalanishingiz mumkin.

Agar siz bir xil `externalOperationId` bilan so‘rovni qayta yuborsangiz, quyidagilardan birini olasiz:
- operatsiya jarayonda bo‘lsa, joriy operatsiya haqida ma’lumot;
- operatsiya yakunlangan bo‘lsa, `reasonCode: "DUPLICATE_EXTERNAL_OPERATION_ID"` xatosi.

## Hodisalar misollari {#webhook-examples}

### Buyurtma to‘lovi

{% list tabs %}

- Muvaffaqiyatli

  ```json
  {
    "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
    "event": "ORDER_STATUS_UPDATED",
    "eventTime": "2023-11-26T08:11:09.359370+00:00",
    "order":{
      "orderId": "700aa3f04df64b3b8712d6b51f752e8b",
      "paymentStatus": "CAPTURED"
    }
  }
  ```

  JWT-token namunasi bilan [jwt.io](https://jwt.io/#debugger-io?token=eyJhbGciOiJFUzI1NiIsImV4cCI6MTcwMDk4NzYwMCwiaWF0IjoxNzAwOTg3MzAwLCJraWQiOiIxLW1lcmNoYW50LWFwaSIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoieHh4eHh4eHh4LXh4eC01eHh4LXh4eHh4LXh4eHh4eHh4IiwiZXZlbnQiOiJPUkRFUl9TVEFUVVNfVVBEQVRFRCIsImV2ZW50VGltZSI6IjIwMjMtMTEtMjZUMDg6MTE6MDkuMzU5MzcwKzAwOjAwIiwib3JkZXIiOnsib3JkZXJJZCI6IjcwMGFhM2YwNGRmNjRiM2I4NzEyZDZiNTFmNzUyZThiIiwicGF5bWVudFN0YXR1cyI6IkNBUFRVUkVEIn19.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) saytida tanishishingiz mumkin.

  **Yandex tomonidan do‘kon bekendiga yuboriladigan so‘rov namunasi:**

  ```(bash)
    curl -X POST https://test.uz/some/prefix/v1/webhook \
      --header 'User-Agent: YandexPay/1.0' \
      --header 'Accept: \*/\*' \
      --header 'Content-Type: application/octet-stream' \
      --header 'X-Request-Id: ff2a54885c4e45309853d2e33af1d63b\\_3a70f3062db640fcb2f3c34de1a27bd5' \
      --header 'X-Request-Timeout: 13970' \
      --compressed \
      -d eyJhbGciOiJFUzI1NiIsImV4cCI6MTcwMDk4NzYwMCwiaWF0IjoxNzAwOTg3MzAwLCJraWQiOiIxLW1lcmNoYW50LWFwaSIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoieHh4eHh4eHh4LXh4eC01eHh4LXh4eHh4LXh4eHh4eHh4IiwiZXZlbnQiOiJPUkRFUl9TVEFUVVNfVVBEQVRFRCIsImV2ZW50VGltZSI6IjIwMjMtMTEtMjZUMDg6MTE6MDkuMzU5MzcwKzAwOjAwIiwib3JkZXIiOnsib3JkZXJJZCI6IjcwMGFhM2YwNGRmNjRiM2I4NzEyZDZiNTFmNzUyZThiIiwicGF5bWVudFN0YXR1cyI6IkNBUFRVUkVEIn19.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  ```

- Omadsiz

  ```json
  {
    "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
    "event": "ORDER_STATUS_UPDATED",
    "eventTime": "2024-04-25T07:56:29.974810+00:00",
    "order":{
      "orderId": "253222_1714029088",
      "paymentStatus": "FAILED"
    }
  }
  ```

  JWT-token namunasi bilan [jwt.io](https://jwt.io/#debugger-io?token=eyJhbGciOiJFUzI1NiIsImV4cCI6MTcxNDAzMjIyMSwiaWF0IjoxNzE0MDMxOTIxLCJraWQiOiIxLW1lcmNoYW50LWFwaSIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoieHh4eHh4eHh4LXh4eC01eHh4LXh4eHh4LXh4eHh4eHh4IiwiZXZlbnQiOiJPUkRFUl9TVEFUVVNfVVBEQVRFRCIsImV2ZW50VGltZSI6IjIwMjQtMDQtMjVUMDc6NTY6MjkuOTc0ODEwKzAwOjAwIiwib3JkZXIiOnsib3JkZXJJZCI6IjI1MzIyMl8xNzE0MDI5MDg4IiwicGF5bWVudFN0YXR1cyI6IkZBSUxFRCJ9fQ.v9dw_cR3_b4R5v0D8WRisrSPABxhegSSpEq4kz9s10fr5cUK150yWnwJREYCGQCm5BZK1Yydsquh-WE6OyRR2APOST) saytida tanishishingiz mumkin.

{% endlist %}

### Qaytarish

{% note tip %}

Avval qaytarishlar qanday ishlashini [/v2/orders/{order_id}/refund](https://yandex.uz/support/split-business/uz/custom/backend/yandex-pay-api/order/merchant_v2_refund-post.md) bo‘limida o‘rganing.

{% endnote %}

#### To‘liq qaytarish

Buyurtma holati o‘zgargan-o‘zgarmaganidan qat’i nazar, 2 ta notifikatsiya yuboriladi: operatsiya bo‘yicha va buyurtma bo‘yicha.

{% list tabs %}

- Muvaffaqiyatli

  1. `OPERATION_STATUS_UPDATED` – qaytarish operatsiyasi muvaffaqiyatli yakunlandi:

      ```json
      {
        "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
        "event": "OPERATION_STATUS_UPDATED",
        "eventTime": "2024-04-19T10:27:53.323878+00:00",
        "operation":{
          "operationId": "73dec2cd-db5c-4386-be6d-10c5b5a2ee09",
          "orderId": "86283",
          "status": "SUCCESS",
          "operationType": "REFUND"
        }
      }
      ```

  2. `ORDER_STATUS_UPDATED` – buyurtma yakuniy `REFUNDED` holatiga o‘tdi. Endi qaytarishlarni chaqirish mumkin emas.

      ```json
      {
        "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
        "event": "ORDER_STATUS_UPDATED",
        "eventTime": "2024-04-19T12:16:28.766392+00:00",
        "order":{
          "orderId": "86283",
          "paymentStatus": "REFUNDED"
        }
      }
      ```

      JWT-token namunasi bilan [jwt.io](https://jwt.io/#debugger-io?token=eyJhbGciOiJFUzI1NiIsImV4cCI6MTcxMzUyOTI4OSwiaWF0IjoxNzEzNTI4OTg5LCJraWQiOiIxLW1lcmNoYW50LWFwaSIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoieHh4eHh4eHh4LXh4eC01eHh4LXh4eHh4LXh4eHh4eHh4IiwiZXZlbnQiOiJPUkRFUl9TVEFUVVNfVVBEQVRFRCIsImV2ZW50VGltZSI6IjIwMjQtMDQtMTlUMTI6MTY6MjguNzY2MzkyKzAwOjAwIiwib3JkZXIiOnsib3JkZXJJZCI6Ijg2MjgzIiwicGF5bWVudFN0YXR1cyI6IlJFRlVOREVEIn19.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) saytida tanishishingiz mumkin.

- Omadsiz

  1. `OPERATION_STATUS_UPDATED` – qaytarish operatsiyasi muvaffaqiyatsiz yakunlandi:

      ```json
      {
        "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
        "event": "OPERATION_STATUS_UPDATED",
        "eventTime": "2024-06-13T22:27:53.323878+00:00",
        "operation":{
          "operationId": "73dec2cd-db5c-4386-be6d-10c5b5a2ee08",
          "orderId": "9c8aed6d-a8e5-4c6a-acd8-645538173f66",
          "status": "FAIL",
          "operationType": "REFUND"
        }
      }
      ```

      JWT-token namunasi bilan [jwt.io](https://jwt.io/#debugger-io?token=eyJhbGciOiJFUzI1NiIsImV4cCI6MTcxODMxNzk3NCwiaWF0IjoxNzE4MzE3Njc0LCJraWQiOiIxLW1lcmNoYW50LWFwaSIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudElkIjoieHh4eHh4eHh4LXh4eC01eHh4LXh4eHh4LXh4eHh4eHh4IiwiZXZlbnQiOiJPUEVSQVRJT05fU1RBVFVTX1VQREFURUQiLCJldmVudFRpbWUiOiIyMDI0LTA2LTEzVDIyOjI3OjUzLjMyMzg3OCswMDowMCIsIm9wZXJhdGlvbiI6eyJvcGVyYXRpb25JZCI6IjczZGVjMmNkLWRiNWMtNDM4Ni1iZTZkLTEwYzViNWEyZWUwOCIsIm9yZGVySWQiOiI5YzhhZWQ2ZC1hOGU1LTRjNmEtYWNkOC02NDU1MzgxNzNmNjYiLCJzdGF0dXMiOiJGQUlMIiwib3BlcmF0aW9uVHlwZSI6IlJFRlVORCJ9fQ.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) saytida tanishishingiz mumkin.

  2. `ORDER_STATUS_UPDATED` – buyurtma avvalgi `CAPTURED` holatida qoldi:

      ```json
      {
        "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
        "event": "ORDER_STATUS_UPDATED",
        "eventTime": "2024-06-13T22:27:54.323878+00:00",
        "order":{
          "orderId": "9c8aed6d-a8e5-4c6a-acd8-645538173f66",
          "paymentStatus": "CAPTURED"
        }
      }
      ```

{% endlist %}

#### Qisman qaytarish

Siz buyurtmaning to‘liq summasini bir nechta qisman qaytarishlar orqali qaytarishingiz mumkin. Barcha qaytarishlar summasi buyurtmaning to‘liq qiymatiga yetganda, buyurtma yakuniy `REFUNDED` holatiga o‘tadi. Undan keyin qaytarishlarni amalga oshirib bo‘lmaydi.

Buyurtma holati o‘zgargan-o‘zgarmaganidan qat’i nazar, 2 ta notifikatsiya yuboriladi: operatsiya bo‘yicha va buyurtma bo‘yicha.

Misol sifatida uchta sharbatdan iborat buyurtmani ko‘rib chiqamiz.

1. Bitta sharbat uchun qisman qaytarish amalga oshirildi. Sizga 2 ta bildirishnoma keladi:

    1. `OPERATION_STATUS_UPDATED` – qaytarish operatsiyasi muvaffaqiyatli yakunlandi:

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "OPERATION_STATUS_UPDATED",
          "eventTime": "2024-04-19T10:27:53.323878+00:00",
          "operation":{
            "operationId": "73dec3cs-sd5t-4356-ne6d-10c79b5d2ee09",
            "externalOperationId": "123-partial-refund-1",
            "orderId": "123",
            "status": "SUCCESS",
            "operationType": "REFUND"
          }
        }
        ```

    2. `ORDER_STATUS_UPDATED` – buyurtma `PARTIALLY_REFUNDED` holatiga o‘tdi:

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "ORDER_STATUS_UPDATED",
          "eventTime": "2024-04-19T12:16:28.766392+00:00",
          "order":{
            "orderId": "123",
            "paymentStatus": "PARTIALLY_REFUNDED"
          }
        }
        ```

2. Ikkinchi marta bir dona sharbat uchun qisman qaytarish amalga oshirildi. Sizga 2 ta bildirishnoma keladi:

    1. `OPERATION_STATUS_UPDATED` – qaytarish operatsiyasi muvaffaqiyatli yakunlandi:

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "OPERATION_STATUS_UPDATED",
          "eventTime": "2024-04-19T13:27:53.323878+00:00",
          "operation":{
            "operationId": "28fba9ds-kl2m-7891-qw3r-45e82c7f1bb12",
            "externalOperationId": "123-partial-refund-2",
            "orderId": "123",
            "status": "SUCCESS",
            "operationType": "REFUND"
          }
        }
        ```

    2. `ORDER_STATUS_UPDATED` – buyurtma `PARTIALLY_REFUNDED` holatida qoldi:

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "ORDER_STATUS_UPDATED",
          "eventTime": "2024-04-19T13:27:54.321878+00:00",
          "order":{
            "orderId": "123",
            "paymentStatus": "PARTIALLY_REFUNDED"
          }
        }
        ```

3. Uchinchi qisman qaytarish amalga oshirildi. Barcha qaytarishlar summasi buyurtmaning to‘liq qiymatiga yetdi. Sizga 2 ta bildirishnoma keladi:

    1. `OPERATION_STATUS_UPDATED` – qaytarish operatsiyasi muvaffaqiyatli yakunlandi:

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "OPERATION_STATUS_UPDATED",
          "eventTime": "2024-04-19T13:40:51.323878+00:00",
          "operation":{
            "operationId": "64abc2ts-rj4y-3187-mf5g-56b71e9a4dd67",
            "externalOperationId": "123-partial-refund-3",
            "orderId": "123",
            "status": "SUCCESS",
            "operationType": "REFUND"
          }
        }
        ```

    2. `ORDER_STATUS_UPDATED` – buyurtma yakuniy `REFUNDED` holatiga o‘tdi. Endi qaytarishlarni chaqirish mumkin emas.

        ```json
        {
          "merchantId": "xxxxxxxxx-xxx-5xxx-xxxxx-xxxxxxxx",
          "event": "ORDER_STATUS_UPDATED",
          "eventTime": "2024-04-19T14:16:28.766392+00:00",
          "order":{
            "orderId": "123",
            "paymentStatus": "REFUNDED"
          }
        }
        ```

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://example.merchant.uz/v1/webhook
```

</div>

Production

</div>

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://sandbox.example.merchant.uz/v1/webhook
```

</div>

Sandbox

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "event": "TRANSACTION_STATUS_UPDATE",
  "eventTime": "2025-05-26T21:00:36.08847+00:00",
  "merchantId": "123e4567-e89b-12d3-a456-426614174000",
  "operation": {
    "externalOperationId": "example",
    "operationId": "5d32f295-8723-457d-81f9-ab13f17b7bd6",
    "operationType": "AUTHORIZE",
    "orderId": "example",
    "status": "PENDING"
  },
  "order": {
    "cartUpdated": true,
    "orderId": "example",
    "paymentStatus": "PENDING"
  },
  "subscription": {
    "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
    "nextWriteOff": "2025-01-01T00:00:00Z",
    "status": "NEW",
    "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_event_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Hodisa turi:
- `ORDER_STATUS_UPDATED` – buyurtma holati yangilash;
- `OPERATION_STATUS_UPDATED` – mablag‘ yechish, qaytarish yoki to‘lovni bekor qilish operatsiyasi holatni yangilash.

_Enum:_{.json-schema-reset .json-schema-value} `TRANSACTION_STATUS_UPDATE`, `ORDER_STATUS_UPDATED`, `OPERATION_STATUS_UPDATED`, `SUBSCRIPTION_STATUS_UPDATED`
{.table-cell}
||
||

_eventTime_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Hodisa vaqti `RFC 3339` formatida: `YYYY-MM-DDThh:mm:ssTZD`.

_Example:_{.json-schema-reset .json-schema-example} `2025-05-26T21:00:36.08847+00:00`
{.table-cell}
||
||

_merchantId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Sotuvchining ID (identifikatori) raqami.

_Example:_{.json-schema-reset .json-schema-example} `123e4567-e89b-12d3-a456-426614174000`
{.table-cell}
||
||

_operation_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [OperationWebhookData](#entity-OperationWebhookData)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "externalOperationId": "example",
    "operationId": "5d32f295-8723-457d-81f9-ab13f17b7bd6",
    "operationType": "AUTHORIZE",
    "orderId": "example",
    "status": "PENDING"
  }
  ```

  {% endcut %}

{% endcut %}

Operatsiya haqida ma’lumot. Ma’lumot `OPERATION_STATUS_UPDATED` hodisasi bilan birga keladi

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "externalOperationId": "example",
  "operationId": "5d32f295-8723-457d-81f9-ab13f17b7bd6",
  "operationType": "AUTHORIZE",
  "orderId": "example",
  "status": "PENDING"
}
```

{% endcut %}
{.table-cell}
||
||

_order_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [OrderWebhookData](#entity-OrderWebhookData)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "cartUpdated": true,
    "orderId": "example",
    "paymentStatus": "PENDING"
  }
  ```

  {% endcut %}

{% endcut %}

Buyurtma haqida ma’lumot. Ma’lumot `ORDER_STATUS_UPDATED` hodisasi bilan birga keladi.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "cartUpdated": true,
  "orderId": "example",
  "paymentStatus": "PENDING"
}
```

{% endcut %}
{.table-cell}
||
||

_subscription_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [SubscriptionWebhookData](#entity-SubscriptionWebhookData)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
    "nextWriteOff": "2025-01-01T00:00:00Z",
    "status": "NEW",
    "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
  }
  ```

  {% endcut %}

{% endcut %}

Obuna holati.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
  "nextWriteOff": "2025-01-01T00:00:00Z",
  "status": "NEW",
  "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### OperationWebhookData {#entity-OperationWebhookData}

#|
|| **Name** | **Description** ||
||

_operationId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Operatsiya identifikatori.

_Example:_{.json-schema-reset .json-schema-example} `5d32f295-8723-457d-81f9-ab13f17b7bd6`
{.table-cell}
||
||

_operationType_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Operatsiya turi. Operatsiya turlari haqida batafsil ma’lumotni [Operatsiya holatlari](../../../payments/statuses) bo‘limida o‘qing.

_Enum:_{.json-schema-reset .json-schema-value} `AUTHORIZE`, `BIND_CARD`, `REFUND`, `CAPTURE`, `VOID`, `RECURRING`, `PREPAYMENT`, `SUBMIT`
{.table-cell}
||
||

_orderId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Buyurtma yaratilganda [v1/orders](https://yandex.uz/support/split-business/uz/custom/backend/yandex-pay-api/order/merchant_v1_orders-post.md) metodiga yuborilgan buyurtma ID raqami.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Operatsiya holati. Operatsiya holatlari haqida batafsil ma’lumotni [Operatsiya holatlari](../../../payments/statuses) bo‘limida o‘qing.

_Enum:_{.json-schema-reset .json-schema-value} `PENDING`, `SUCCESS`, `FAIL`
{.table-cell}
||
||

_externalOperationId_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Sotuvchi tizimidagi operatsiya identifikatori. U noyob bo‘lishi kerak.

Muayyan operatsiyani [v1/operations/{external_operation_id}](../yandex-pay-api/operation/merchant_v1_operations-get) metodi orqali kuzatish uchun ushbu parametrni yuboring.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "externalOperationId": "example",
  "operationId": "5d32f295-8723-457d-81f9-ab13f17b7bd6",
  "operationType": "AUTHORIZE",
  "orderId": "example",
  "status": "PENDING"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### OrderWebhookData {#entity-OrderWebhookData}

#|
|| **Name** | **Description** ||
||

_orderId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Buyurtma yaratilganda [v1/orders](https://yandex.uz/support/split-business/uz/custom/backend/yandex-pay-api/order/merchant_v1_orders-post.md) metodiga yuborilgan buyurtma ID raqami.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_paymentStatus_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Buyurtma holati. Batafsil ma’lumotni [Buyurtma holati](https://yandex.uz/support/split-business/uz/payments/statuses.md) bo‘limida o‘qing.

_Enum:_{.json-schema-reset .json-schema-value} `PENDING`, `AUTHORIZED`, `CAPTURED`, `VOIDED`, `REFUNDED`, `CONFIRMED`, `PARTIALLY_REFUNDED`, `FAILED`
{.table-cell}
||
||

_cartUpdated_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Savatcha yangilangan yoki yo‘qligi. Ballar orqali to‘lov amalga oshirilganda qaytariladi. Agar flag qiymati `true` bo‘lsa, yangilangan savatchani oling.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "cartUpdated": true,
  "orderId": "example",
  "paymentStatus": "PENDING"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SubscriptionWebhookData {#entity-SubscriptionWebhookData}

#|
|| **Name** | **Description** ||
||

_customerSubscriptionId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Obuna ID raqami. Obuna muvaffaqiyatli yaratilganda SDK tomonidan qaytariladi. Shuningdek, obunani u bo‘yicha kelgan birinchi bildirishnoma orqali ham saqlab qo‘yish mumkin. Ushbu obuna bo‘yicha keyingi yangilanishlar aynan shu maydon qiymati bilan yuboriladi.

_Example:_{.json-schema-reset .json-schema-example} `123e4567-e89b-12d3-a456-426614174000`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Obuna holati

_Enum:_{.json-schema-reset .json-schema-value} `NEW`, `ACTIVE`, `CANCELLED`, `EXPIRED`
{.table-cell}
||
||

_subscriptionPlanId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Shaxsiy kabinetda yoki API orqali yaratilgan obuna rejasi ID raqami.

_Example:_{.json-schema-reset .json-schema-example} `123e4567-e89b-12d3-a456-426614174000`
{.table-cell}
||
||

_nextWriteOff_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Obuna bo‘yicha keyingi pul yechish urinishining sanasi

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
  "nextWriteOff": "2025-01-01T00:00:00Z",
  "status": "NEW",
  "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Vebhuk muvaffaqiyatli qabul qilindi va qayta ishlangan.
Javob tanasi ixtiyoriy bo‘lishi mumkin, ammo quyidagini yuborish tavsiya etiladi: `{"status": "success"}`.
Agar `200` status kodi qaytarilsa, Yandex vebhuklarni qayta yuborishni to‘xtatadi.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "status": "success"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `success`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Vebhukni qayta ishlashda xatolik.
Agar javob bo‘lmasa yoki `200`dan boshqa status qaytarilsa, Yandex yangi JWT-token yaratadi va vebhukni qayta yuboradi:
- dastlabki 10 ta urinish har 5 ms dan keyin;
- keyin interval eksponentsial ravishda oshib boradi va 15 daqiqagacha yetadi;
- shundan so‘ng 24 soat davomida har 15 daqiqada yuboriladi.
Qayta yuborishlarning umumiy davomiyligi – 24 soat. Shundan keyin vebhuk yetkazilmagan deb hisoblanadi.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "reason": "example",
  "reasonCode": "FORBIDDEN",
  "status": "fail"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_reasonCode_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Xatolik kodi:

- `FORBIDDEN` – buyurtma mavjud, ammo to‘lov Yandex Split orqali amalga oshirilmagan;
- `ORDER_NOT_FOUND` – buyurtma sotuvchi tizimida topilmadi;
- `ORDER_AMOUNT_MISMATCH` – buyurtma summasi sotuvchi tizimidagi summa bilan mos kelmaydi;
- `ORDER_DETAILS_MISMATCH` – buyurtma tafsilotlari sotuvchi tizimidagi ma’lumotlardan farq qiladi;
- `OTHER` – umumiy xatolik;
- `UNAUTHORIZED` – JWT-token imzosini tekshirish muvaffaqiyatsiz tugadi;
- `TOKEN_EXPIRED` – JWT-token amal qilish muddati tugagan;
- `CONFLICT` – bildirishnomadagi ma’lumotlar sotuvchi tizimidagi buyurtma holati bilan mos kelmaydi. Masalan, bekor qilingan buyurtma uchun to‘lov haqida bildirishnoma kelib tushdi.

_Enum:_{.json-schema-reset .json-schema-value} `FORBIDDEN`, `ITEM_NOT_FOUND`, `ORDER_NOT_FOUND`, `ORDER_AMOUNT_MISMATCH`, `ORDER_DETAILS_MISMATCH`, `OUT_OF_INVENTORY`, `PICKUP_POINT_NOT_FOUND`, `SHIPPING_DETAILS_MISMATCH`, `OTHER`, `UNAUTHORIZED`, `TOKEN_EXPIRED`, `CONFLICT`
{.table-cell}
||
||

_reason_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Xatolik sababining tavsifi.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `fail`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.