Use the Order management API to partially capture an order.
When you partially fulfill the order (for example, you have sent some of the products to the customer but not all of them), you need to capture the amount for the sent items through this API call.
You can use the same endpoint for making full and partial captures. For a full capture, you send the total order amount. For a partial capture, you only send the order amount corresponding to the items you sent.
To capture a part of the order amount, send a POST request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/captures endpoint.
Include the following in your request:
Header
Body
{
"captured_amount": 6000,
"reference": "2027d87e-c394-4b22-9cfd-f51f79482793",
"description": "Shipped the full order",
"order_lines": [
{
"type": "physical",
"reference": "123050",
"name": "Tomatoes",
"quantity": 10,
Sample of a request to partially capture an order.
If the request is successful, you'll receive a 201 Created
response including capture_id
and location
as HTTP response headers.
If your request contains errors, you'll receive an error response. Make sure the order_id
is correct.
You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal logs section.
{
"correlation_id": "66782175-ae05-44fc-9eb3-eeceadbad271",
"error_code": "NO_SUCH_ORDER",
"error_messages": [
"string"
]
}
Sample of an error response to partially capture an order.
Ready to send this request? See the API reference of this call.