/v1/orders/{order_id}/cancel
Request to cancel an order.
Only available for payments in the AUTHORIZED status.
If successful, the payment status changes to VOIDED.
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 Order ID on the merchant's side that was passed in the Max length: Example: `` |
Body
application/json
{
"externalOperationId": "example",
"reason": "example"
}
|
Name |
Description |
|
reason |
Type: string Cancellation reason Max length: Example: |
|
externalOperationId |
Type: string Operation ID 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: object
Example
|
||||||||||||||||||||||||
|
status |
Type: string Default: Const: |