Skip to content
Proud to collaborate with Microsoft for Startups

mercadopago.payments.update-payment ​

Update payment fields or capture an authorized payment. To capture an authorized two-step payment: send {"capture": true}. To cancel an authorized payment: send {"status": "cancelled"}.

Update or capture a payment

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-mercadopago
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Mercadopago API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
idintegerYes——
capturebooleanNo—Set true to capture an authorized payment.
statusstringNo—Set to cancelled to cancel an authorized payment.
transaction_amountfloatNo—Partial capture amount (must be ≤ original authorized amount).
date_of_expirationstringNo—New expiration date for cash payment methods.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Mercadopago API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
idintegerYes——
capturebooleanNo—Set true to capture an authorized payment.
statusstringNo—Set to cancelled to cancel an authorized payment.
transaction_amountfloatNo—Partial capture amount (must be ≤ original authorized amount).
date_of_expirationstringNo—New expiration date for cash payment methods.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call PUT /v1/payments/
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform PUT /v1/payments/
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "mercadopago.payments.update-payment",
  "initial_data": {
    "base_url": "value",
    "id": 123
  }
}