# Capture payment This endpoint allows to perform one two actions: capture or cancel a payment. To confirm you must send the wallet payment data and field capture in true. To cancel you send wallet payment data and field status "canceled". **PUT** `/v1/advanced_payments/{advanced_payment_id}` ## Request parameters ### Path - `advanced_payment_id` (number, required) The payment identifier. - `capture` (boolean, optional) This node only needs to be sent when you need to confirm a payment. It is a boolean field found in two-step payments (like debit card). In this type of payment, which is carried out asynchronously, the purchase value is first reserved (capture = false). This amount is captured and not debited from the account instantly. When the money is actually transferred to the collector (who receives the payment) the amount is captured (capture = true). - `wallet_payment` (object, optional) It indicates is a payment from a seller with a previous Wallet Connect vinculation. - `wallet_payment.transaction_amount` (number, optional) Payment amount. - `wallet_payment.description` (string, optional) A brief description of the payment. - `wallet_payment.external_reference` (string, optional) An string to allow identification of payment in case of an issue. - `status` (string, optional) This node only needs to be sent when you need to cancel a payment. The value to be entered is 'canceled'. ## Response parameters - `id` (number, optional) Unique ID that identifies the payment. - `payments` (array, optional) List of payments. - `payments[].id` (number, optional) Unique payment ID. - `payments[].status` (string, optional) The status of a payment made by 'internal-api.mercadopago.com'. Possible enum values: - `approved` approved - `in_process` in process - `payments[].status_detail` (string, optional) Status description. - `payments[].payment_type_id` (string, optional) O tipo de pagamento preferencial do pagador. Possible enum values: - `credit_card` Credit card - `debit_card` Debit card - `account_money` Account money - `payments[].payment_method_id` (string, optional) Method used in payment type. - `payments[].transaction_amount` (number, optional) The payment amount. - `payments[].installments` (number, optional) Total installment for the payment. - `payments[].description` (string, optional) Purchased product’s description, the reason for payment. - `payments[].capture` (boolean, optional) It is a boolean field found in two-step payments (like debit card). In this type of payment, which is carried out asynchronously, the purchase value is first reserved (capture = false). This amount is captured and not debited from the account instantly. When the money is actually transferred to the collector (who receives the payment) the amount is captured (capture = true). - `payments[].external_reference` (string, optional) This is a custom seller identifier, used in case to match a request between seller and Mercado Pago. - `wallet_payment` (object, optional) It indicates is an advanced payements from a seller with a previous Wallet Connect vinculation. - `wallet_payment.transaction_amount` (number, optional) Payment amount. - `wallet_payment.description` (string, optional) A brief description of the payment. - `wallet_payment.external_reference` (string, optional) An string to allow identification of payment in case of an issue. - `disbursements` (array, optional) - `disbursements[].collector_id` (string, optional) Merchant Mercado Pago account ID. - `payer` (object, optional) - `payer.id` (number, optional) The payment identifier. - `site_id` (string, optional) Country of origin of the Mercado Pago account. - `binary_mode` (boolean, optional) When the payment is activated, it can only be approved or rejected. Otherwise, the payment may be pending. - `date_created` (string, optional) Payment creation date. - `date_last_updated` (string, optional) Payment last update date. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad-Request | | 500 | 500 | Error | ## Request example ### cURL ```bash curl -X PUT \ 'https://api.mercadopago.com/v1/advanced_payments/{advanced_payment_id}' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "capture": true, "wallet_payment": { "transaction_amount": "24.50", "description": "Payment for the purchase of furniture", "external_reference": "Payment_seller_123" }, "status": "canceled" }' ``` ## Response example ```json { "id": 10234567, "payments": [ { "id": 3870106238, "status": "approved", "status_detail": "approved_id", "payment_type_id": "credit_card", "payment_method_id": "credit_card", "transaction_amount": "24.50", "installments": 1, "description": "Payment for the purchase of furniture", "capture": true, "external_reference": "payment_123" } ], "wallet_payment": { "transaction_amount": "24.50", "description": "Payment for the purchase of furniture", "external_reference": "Payment_seller_123" }, "disbursements": [ { "collector_id": "collectorId" } ], "payer": { "id": 8879 }, "site_id": "MLM", "binary_mode": true, "date_created": "2018-10-20T09:34:20.518-04:00", "date_last_updated": "2018-10-20T09:34:20.518-04:00" } ```