/v1/orders/{order_id}/capture
Request to debit funds for the order.
Debiting of locked funds. Available only for payments in 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 that case, you need to pass the final cart of the provided products and services. The final cart is created from the current cart by excluding some items that were refunded.
Request
POST
https://pay.yandex.ru/api/merchant/v1/orders/{order_id}/capture
Production
POST
https://sandbox.pay.yandex.ru/api/merchant/v1/orders/{order_id}/capture
Sandbox
Path parameters
|
Name |
Description |
|
order_id |
Type: string Order ID on the merchant's side that was passed in response to /order/create. Max length: 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",
"measurements": null,
"productId": "example",
"quantity": null,
"receipt": null,
"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",
"label": "example"
}
},
"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
|
Coupon
|
Name |
Description |
|
value |
Type: string Coupon code Max length: Example: |
|
description |
Type: string Description For example, "3% discount" Max length: Example: |
|
status |
Type: string Enum: Example: |
Example
{
"description": "example",
"status": "VALID",
"value": "example"
}
Discount
|
Name |
Description |
|
amount |
Type: string<double> Discount amount Example: |
|
description |
Type: string Text description Max length: Example: |
|
discountId |
Type: string Discount ID in the merchant system Max length: Example: |
Example
{
"amount": "123.45",
"description": "example",
"discountId": "example"
}
Measurements
|
Name |
Description |
|
height |
Type: number Height, in meters |
|
length |
Type: number Length, in meters |
|
weight |
Type: number Weight, in kilograms |
|
width |
Type: number Width, in meters |
Example
{
"height": 0.5,
"length": 0.5,
"weight": 0.5,
"width": 0.5
}
ItemQuantity
|
Name |
Description |
|
count |
Type: string<double> Product quantity in the order Example: |
|
available |
Type: string<double> Maximum available product quantity Example: |
|
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: Example: |
Example
{
"available": "123.45",
"count": "123.45",
"label": "example"
}
PaymentsOperator
|
Name |
Description |
|
phones |
Type: string[] Example
|
Example
{
"phones": [
"example"
]
}
TransferOperator
|
Name |
Description |
|
address |
Type: string Max length: Example: |
|
inn |
Type: string Max length: Example: |
|
name |
Type: string Max length: Example: |
|
phones |
Type: string[] Example
|
Example
{
"address": "example",
"inn": "example",
"name": "example",
"phones": [
"example"
]
}
Agent
|
Name |
Description |
|
agentType |
Type: integer Agent type by taxable object. See values Enum: |
|
operation |
Type: string Max length: Example: |
|
paymentsOperator |
Type: PaymentsOperator Example
|
|
phones |
Type: string[] Example
|
|
transferOperator |
Type: TransferOperator 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: Example: |
|
name |
Type: string Max length: Example: |
|
phones |
Type: string[] Example
|
Example
{
"inn": "example",
"name": "example",
"phones": [
"example"
]
}
ItemReceipt
|
Name |
Description |
|
tax |
Type: integer Value description: Link Enum: |
|
agent |
Type: Agent Example
|
|
excise |
Type: string<double> It shouldn't include more than two decimal digits. For example: 1.12, 5.1, 10, 11.00 . Example: |
|
markQuantity |
Type: MarkQuantity Example
|
|
measure |
Type: integer Value description: Link Enum: |
|
paymentMethodType |
Type: integer Value description: Link Enum: |
|
paymentSubjectType |
Type: integer Value description: Link Enum: |
|
productCode |
Type: string<base64> Product code (a base64-encoded array of 1 to 32 bytes) Example: |
|
supplier |
Type: Supplier Example
|
|
title |
Type: string Max length: 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 Product ID in the merchant system Make sure that each Max length: Example: |
|
quantity |
All of 1 type
Product quantity in the order Example
|
|
description |
Type: string Product description Max length: Example: |
|
discountedUnitPrice |
Type: string<double> Price per product unit with discount per item Example: |
|
measurements |
All of 1 type
Product dimensions and weight. Required for the Example
|
|
receipt |
All of 1 type
Data for receipt generation Example
|
|
subtotal |
Type: string<double> Total price per item without discount Example: |
|
title |
Type: string Product name Max length: Example: |
|
total |
Type: string<double> Total price per item with item discount Example: |
|
type |
Type: string Product type. Important for integrating with delivery services Default: Enum: |
|
unitPrice |
Type: string<double> Total price per product unit without discount Example: |
Example
{
"description": "example",
"discountedUnitPrice": "123.45",
"measurements": {
"height": 0.5,
"length": 0.5,
"weight": 0.5,
"width": 0.5
},
"productId": "example",
"quantity": {
"available": "123.45",
"count": "123.45",
"label": "example"
},
"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"
},
"subtotal": "123.45",
"title": "example",
"total": "123.45",
"type": "UNSPECIFIED",
"unitPrice": "123.45"
}
CartTotal
|
Name |
Description |
|
amount |
Type: string<double> Cart cost with all discounts Example: |
|
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: Example: |
Example
{
"amount": "123.45",
"label": "example"
}
CartWithRequiredTotalWithoutFinalPrice
|
Name |
Description |
|
items |
Type: CartItemWithoutFinalPriceCamelCase[] Example
|
|
total |
Type: CartTotal Example
|
|
cartId |
Type: string The internal ID of the Yandex Pay cart. The store's backend must use this parameter as the ID of the customer cart and the idempotency key for the Max length: Example: |
|
coupons |
Type: Coupon[] Coupons applied to the cart Example
|
|
discounts |
Type: Discount[] Discounts applied to the cart Example
|
|
externalId |
Type: string Cart ID passed by the merchant Max length: Example: |
|
measurements |
Type: Measurements Example
|
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",
"measurements": {
"height": 0.5,
"length": 0.5,
"weight": 0.5,
"width": 0.5
},
"productId": "example",
"quantity": {
"available": "123.45",
"count": "123.45",
"label": "example"
},
"receipt": {
"agent": {},
"excise": "123.45",
"markQuantity": {},
"measure": 0,
"paymentMethodType": 1,
"paymentSubjectType": 1,
"productCode": "example",
"supplier": {},
"tax": 1,
"title": "example"
},
"subtotal": "123.45",
"title": "example",
"total": "123.45",
"type": "UNSPECIFIED",
"unitPrice": "123.45"
}
],
"measurements": null,
"total": {
"amount": "123.45",
"label": "example"
}
}
ShippingPrice
|
Name |
Description |
|
amount |
Type: string<double> It shouldn't include more than two decimal digits. For example: 1.12, 5.1, 10, 11.00 . Example: |
|
methodType |
Type: string Enum: |
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: |
|
data |
Type: OperationResponseData Example
|
|
status |
Type: string Default: Const: |
CartItemWithoutFinalPriceCamelCase
|
Name |
Description |
|
productId |
Type: string Product ID in the merchant system Make sure that each Max length: Example: |
|
quantity |
All of 1 type
Product quantity in the order Example
|
|
description |
Type: string Product description Max length: Example: |
|
discountedUnitPrice |
Type: string<double> Price per product unit with discount per item Example: |
|
measurements |
All of 1 type
Product dimensions and weight. Required for the Example
|
|
pointsAmount |
Type: string<double> Number of Plus points Read-only field. Input values will be ignored. Example: |
|
receipt |
All of 1 type
Data for receipt generation Example
|
|
subtotal |
Type: string<double> Total price per item without discount Example: |
|
title |
Type: string Product name Max length: Example: |
|
total |
Type: string<double> Total price per item with item discount Example: |
|
type |
Type: string Product type. Important for integrating with delivery services Default: Enum: |
|
unitPrice |
Type: string<double> Total price per product unit without discount Example: |
Example
{
"description": "example",
"discountedUnitPrice": "123.45",
"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",
"label": "example"
},
"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"
},
"subtotal": "123.45",
"title": "example",
"total": "123.45",
"type": "UNSPECIFIED",
"unitPrice": "123.45"
}
CartTotal
|
Name |
Description |
|
amount |
Type: string<double> Cart cost with all discounts Example: |
|
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: Example: |
|
pointsAmount |
Type: string<double> Number of Plus points Read-only field. Input values will be ignored. Example: |
Example
{
"amount": "123.45",
"label": "example",
"pointsAmount": "123.45"
}
CartWithRequiredTotalWithoutFinalPrice
|
Name |
Description |
|
items |
Type: CartItemWithoutFinalPriceCamelCase[] Example
|
|
total |
Type: CartTotal Example
|
|
cartId |
Type: string The internal ID of the Yandex Pay cart. The store's backend must use this parameter as the ID of the customer cart and the idempotency key for the Max length: Example: |
|
coupons |
Type: Coupon[] Coupons applied to the cart Example
|
|
discounts |
Type: Discount[] Discounts applied to the cart Example
|
|
externalId |
Type: string Cart ID passed by the merchant Max length: Example: |
|
measurements |
Type: Measurements Example
|
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",
"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",
"label": "example"
},
"receipt": {
"agent": {},
"excise": "123.45",
"markQuantity": {},
"measure": 0,
"paymentMethodType": 1,
"paymentSubjectType": 1,
"productCode": "example",
"supplier": {},
"tax": 1,
"title": "example"
},
"subtotal": "123.45",
"title": "example",
"total": "123.45",
"type": "UNSPECIFIED",
"unitPrice": "123.45"
}
],
"measurements": null,
"total": {
"amount": "123.45",
"label": "example",
"pointsAmount": "123.45"
}
}
Operation
|
Name |
Description |
|
amount |
Type: string<double> Transaction amount in a fiat currency Example: |
|
operationId |
Type: string<uuid> Max length: Example: |
|
operationType |
Type: string Enum: |
|
orderId |
Type: string Max length: Example: |
|
created |
Type: string<date-time> Date and time when the operation was created (ISO 8601) Example: |
|
externalOperationId |
Type: string Operation ID on the merchant side Max length: Example: |
|
params |
Type: object Example
|
|
pointsAmount |
Type: string<double> Transaction amount in Plus points Example: |
|
reason |
Type: string Error cause Max length: Example: |
|
status |
Type: string Default: Enum: |
|
updated |
Type: string<date-time> Date and time when the operation was updated (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"
}
}