/v1/orders/{order_id}/capture
Request to debit funds for the order.
Debiting of locked funds. Only available for payments in the AUTHORIZED status.
If the request result is successful, the payment status changes to CAPTURED.
If the authorized amount is smaller than the original amount, the remaining part of the payment will be refunded. In this case, pass the final cart of products and services provided. The final cart must be based on the current cart, excluding refunded items.
Request
POST
https://pay.yandex.uz/api/merchant/v1/orders/{order_id}/capture
Production
POST
https://sandbox.pay.yandex.uz/api/merchant/v1/orders/{order_id}/capture
Sandbox
Path parameters
|
Name |
Description |
|
order_id |
Type: string The merchant-side order ID returned in response to /orders. Max length: Example: `` |
Body
application/json
{
"cart": {
"cartId": "example",
"coupons": [
{
"description": "Скидка 3%",
"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,
"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"
}
},
"externalOperationId": "example",
"orderAmount": "123.45",
"shipping": {
"amount": "123.45",
"methodType": "DIRECT"
}
}
|
Name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cart |
All of 1 type
Final cart Example
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
externalOperationId |
Type: string Operation ID Max length: Example: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
orderAmount |
Type: string<double> Amount to be debited. If not specified, the total amount of the passed cart items will be debited Example: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
shipping |
All of 1 type
Final delivery method. 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: |