AI resources
Capture order fully

This endpoint captures a previously authorized Wallet Connect order, where only total capture is supported. It only applies to orders created with capture_mode=manual and that are in status=action_required and status_detail=waiting_capture. After capture, the order will move to status=processed and status_detail=accredited. In case of success, the request will return a response with status 200.

POST

https://api.mercadopago.com/v1/orders/{order_id}/capture
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
X-Idempotency-Key
string

REQUIRED

Unique key per request to safely retry without duplicating actions. Use a UUID V4 or random string. Accepts values between 1 and 64 characters.
Path
order_id
string

REQUIRED

ID of the order to capture, returned in the response from the endpoint POST /v1/orders.
Response parameters
id
string
Identifier of the captured order.
status
string
Current status of the order after the capture.
processed: The order was successfully captured and processed.
status_detail
string
Details about the status of the order after the capture.
accredited: Payment accredited.
transactions
object
Contains information about the captured payment.
Errors

400Request error.

empty_required_header

The X-Idempotency-Key header is required and was not sent. Make the request again including it.

invalid_idempotency_key_length

The X-Idempotency-Key must be between 1 and 64 characters.

invalid_path_param

The order_id provided in the path is not valid. Please confirm it and provide a valid order_id to try again.

401Error. Access Token not authorized.

unauthorized

The value sent as Access Token is incorrect. Please check and try again with the correct value.

invalid_credentials

There is no support for test credentials. Use test users with production credentials for the sandbox environment and your production credentials for the production environment.

404Resource not found.

order_not_found

Order not found. Please check if you provided the correct order_id.

payment_not_found

Payment not found. Please check if you provided the correct payment_id.

409Some specific system rule does not allow the action to be performed due to defined restrictions.

idempotency_key_already_used

The value sent as the idempotency header (X-Idempotency-Key) has already been used. Please try the request again sending a new value.

cannot_capture_order

The order cannot be captured because it is not in a status that allows capture. Only orders in action_required status with capture_mode=manual can be captured.

operation_not_supported

The operation is not supported for this order. Please check the order status and status_detail and try again.

500Generic error.

idempotency_validation_failed

Idempotency validation failed. Please try submitting the request again.

internal_error

Generic error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/orders/{order_id}/capture'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-5*********956537-12*********ff1a3d36d*********47e7b9985*********770' \
       -H 'X-Idempotency-Key: fc207472-6dc9-48bf-b655-50c191cb990b' \
    
Response
{
  "id": "ORDBTA01KHY4WFPYXJ9Z7S5CGED7WCTP",
  "status": "processed",
  "status_detail": "accredited",
  "transactions": {
    "payments": [
      {
        "id": "PAY01KSND6GMT3KAG0Z2TB9M8B0WW",
        "amount": "50.50",
        "paid_amount": "50.50",
        "status": "processed",
        "status_detail": "accredited",
        "reference_id": "ref-capture"
      }
    ]
  }
}