# POST /capture

## POST /orders/{orderReference}/capture

> Capture an order ---- \[auth scope:  api-user]

```json
{"openapi":"3.0.0","info":{"title":"Merchant API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CaptureOrderDto":{"type":"object","properties":{"captureReference":{"type":"string","description":"A unique reference identifier for this capture request. This must be unique per merchant and transaction."},"description":{"type":"string","description":"An optional description or note for this capture. This can be used to record the reason for capture, shipping details, or other relevant information."},"amount":{"type":"number","description":"The amount to capture from the authorized order. Must be a non-negative number with up to 2 decimal places. For full capture, this should equal the order amount plus surcharge. For partial capture (if the APM supports them), this can be any amount up to the remaining authorized amount. The sum of all captures (including this one) cannot exceed the total order amount plus surcharge.","minimum":0},"shippingInfo":{"description":"Optional shipping information for the captured items. Include this when capturing an order for physical goods that have been shipped. This information may be required by some payment providers for fulfillment verification.","allOf":[{"$ref":"#/components/schemas/ShippingInfo"}]}},"required":["captureReference","amount"]},"ShippingInfo":{"type":"object","properties":{"shippingCompany":{"type":"string","description":"The name of the shipping company or carrier handling the shipment (e.g., FedEx, UPS, DHL, Australia Post). This information may be required by some payment providers for fulfillment verification."},"shippingMethod":{"type":"string","description":"The shipping method or service level used for delivery (e.g., \"Standard Delivery\", \"Express\", \"Overnight\", \"Ground Shipping\"). This helps identify the delivery speed and service type."},"trackingNumber":{"type":"string","description":"The tracking number provided by the shipping carrier for this shipment. This allows customers and merchants to track the package. Some payment providers may require this for fulfillment verification."}},"required":["shippingCompany","shippingMethod","trackingNumber"]},"CaptureOrderResponse":{"type":"object","properties":{"captureReference":{"type":"string","description":"captureReference"},"captureId":{"type":"string","description":"captureId"},"capturedAmount":{"type":"number","description":"Amount to capture"}},"required":["captureReference","captureId","capturedAmount"]},"BadRequestResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]},"UnauthorizedResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]},"NotFoundResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]}}},"paths":{"/orders/{orderReference}/capture":{"post":{"operationId":"OrdersController_captureOrder","summary":"Capture an order ---- [auth scope:  api-user]","deprecated":false,"parameters":[{"name":"orderReference","required":true,"in":"path","description":"The order reference to capture","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureOrderDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureOrderResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}},"tags":["orders"]}}}}
```

## Sample Request/Response

{% tabs %}
{% tab title="Request" %}

```json
{
    "captureReference": "LatEHAuPtpN2HSrTMK-1",
    "description": "Please capture this order",
    "amount": 100
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response" %}

```json
{
    "captureReference": "LatEHAuPtpN2HSrTMK-1",
    "capturedAmount": 100,
    "captureId": "LatEHAuPtpN2HSrTMK-1"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optty.com/direct-api-orders/order-flow/post-capture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
