/v1/orders/{order_id}/cancel
To‘lovni bekor qilish so‘rovi.
Faqat AUTHORIZED holatidagi to‘lovlar uchun mavjud.
Muvaffaqiyatli bajarilganda to‘lov holati VOIDEDga o‘zgaradi.
Request
POST
https://pay.yandex.uz/api/merchant/v1/orders/{order_id}/cancel
Production
POST
https://sandbox.pay.yandex.uz/api/merchant/v1/orders/{order_id}/cancel
Sandbox
Path parameters
|
Name |
Description |
|
order_id |
Type: string Buyurtma yaratilganda Max length: Example: `` |
Body
application/json
{
"externalOperationId": "example",
"reason": "example"
}
|
Name |
Description |
|
reason |
Type: string Bekor qilish sababi Max length: Example: |
|
externalOperationId |
Type: string Operatsiya identifikatori Max length: 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: |
|
data |
Type: OperationResponseData Example
|
|
status |
Type: string Default: Const: |
Operation
|
Name |
Description |
|
amount |
Type: string<double> Operatsiya summasi fiat valyutada Example: |
|
operationId |
Type: string<uuid> Max length: Example: |
|
operationType |
Type: string Enum: |
|
orderId |
Type: string Max length: Example: |
|
created |
Type: string<date-time> Operatsiya yaratilgan sana va vaqt (ISO 8601) Example: |
|
externalOperationId |
Type: string Sotuvchi tomonidagi tranzaksiya identifikatori Max length: Example: |
|
params |
Type: object Example
|
|
pointsAmount |
Type: string<double> O‘zbekistonda mavjud emas. Example: |
|
reason |
Type: string Xatolik sababi Max length: Example: |
|
status |
Type: string Default: Enum: |
|
updated |
Type: string<date-time> Operatsiya yangilangan sana va vaqt (ISO 8601) Example: |
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
|
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"
}
}