Skip to content
Proud to collaborate with Microsoft for Startups

mercadopago.payments.create-payment ​

Creates a payment. For card payments, generate a card token client-side via MercadoPago.js before calling this endpoint. For cash/offline methods (Boleto, OXXO, Pix), the response includes a payment URL in transaction_details.external_resource_url. Idempotency: Include X-Idempotency-Key to safely retry on network errors without risk of double charges. Recommendation: For new integrations, prefer the Orders API (POST /v1/orders). Idempotent: Supports X-Idempotency-Key header to safely retry without duplicate charges. Webhook events triggered: payment, merchant_order

Create 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
x_idempotency_keystringNo—Unique key per payment attempt. If you retry with the same key and the original payment was processed, MP returns the original result without creating a duplicate.
transaction_amountfloatYes—Payment amount as a decimal number. MercadoPago does NOT use integer cents — send 100.50 for R$100,50 (not 10050). CLP uses 0 decimal places.
tokenstringNo—Card token created client-side via MercadoPago.js / MP Secure Fields. Required for credit/debit card payments. Single-use; expires in 7 days.
descriptionstringNo—Description of the purchased product or service
installmentsintegerNo—Number of installments (1 = no installments)
payment_method_idstringNo—Payment method identifier. Examples: visa, master, bolbradesco (Boleto), pix, oxxo, rapipago, pse. Use GET /v1/payment_methods to list available methods for a given site_id.
issuer_idstringNo—Card issuer ID (required for some credit cards)
payerjsonYes——
capturebooleanNo—Two-step payment flow: set false to only authorize (reserve funds), then PUT /v1/payments/{id} with capture=true to capture. Debit cards do not support two-step capture.
binary_modebooleanNo—When true, payments can only be in_process → approved or rejected — no pending state. Useful for in-store flows.
external_referencestringNo—Your internal order or reference ID. Max 256 chars.
notification_urlstringNo—URL to receive IPN notifications when payment status changes. DEPRECATED — use Webhooks instead.
statement_descriptorstringNo—Text that appears on the payer's card statement. Max 22 chars.
callback_urlstringNo—Redirect URL after bank transfer (redirect-based methods only)
date_of_expirationstringNo—Expiration date for cash/offline payment methods (boleto, OXXO, etc.). ISO 8601 format. Default varies by method.
metadatajsonNo—Free key-value object for your own internal data (not used by MP)
additional_infojsonNo—Additional context for fraud scoring and installment calculation
application_feefloatNo—Marketplace fee charged to the seller (marketplace integrations only)
coupon_codestringNo—Discount coupon code
coupon_amountfloatNo—Coupon discount value

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
x_idempotency_keystringNo—Unique key per payment attempt. If you retry with the same key and the original payment was processed, MP returns the original result without creating a duplicate.
transaction_amountfloatYes—Payment amount as a decimal number. MercadoPago does NOT use integer cents — send 100.50 for R$100,50 (not 10050). CLP uses 0 decimal places.
tokenstringNo—Card token created client-side via MercadoPago.js / MP Secure Fields. Required for credit/debit card payments. Single-use; expires in 7 days.
descriptionstringNo—Description of the purchased product or service
installmentsintegerNo—Number of installments (1 = no installments)
payment_method_idstringNo—Payment method identifier. Examples: visa, master, bolbradesco (Boleto), pix, oxxo, rapipago, pse. Use GET /v1/payment_methods to list available methods for a given site_id.
issuer_idstringNo—Card issuer ID (required for some credit cards)
payerjsonYes——
capturebooleanNo—Two-step payment flow: set false to only authorize (reserve funds), then PUT /v1/payments/{id} with capture=true to capture. Debit cards do not support two-step capture.
binary_modebooleanNo—When true, payments can only be in_process → approved or rejected — no pending state. Useful for in-store flows.
external_referencestringNo—Your internal order or reference ID. Max 256 chars.
notification_urlstringNo—URL to receive IPN notifications when payment status changes. DEPRECATED — use Webhooks instead.
statement_descriptorstringNo—Text that appears on the payer's card statement. Max 22 chars.
callback_urlstringNo—Redirect URL after bank transfer (redirect-based methods only)
date_of_expirationstringNo—Expiration date for cash/offline payment methods (boleto, OXXO, etc.). ISO 8601 format. Default varies by method.
metadatajsonNo—Free key-value object for your own internal data (not used by MP)
additional_infojsonNo—Additional context for fraud scoring and installment calculation
application_feefloatNo—Marketplace fee charged to the seller (marketplace integrations only)
coupon_codestringNo—Discount coupon code
coupon_amountfloatNo—Coupon discount value
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 POST /v1/payments
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

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

API Usage ​

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

{
  "workflow_type": "mercadopago.payments.create-payment",
  "initial_data": {
    "base_url": "value",
    "transaction_amount": "value",
    "payer": "value"
  }
}