Skip to content
Proud to collaborate with Microsoft for Startups

mercadopago.preferences.create-preference ​

Creates a Checkout Pro preference. The response contains init_point (production) and Webhook events triggered: payment, merchant_order

Create a preference

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
itemslistYes—List of products/services being purchased
payerjsonNo——
payment_methodsjsonNo——
shipmentsjsonNo——
back_urlsjsonNo—Redirect URLs after checkout completion. Configure auto_return to control when automatic redirects happen.
notification_urlstringNo—URL for IPN notifications. DEPRECATED — use Webhooks instead.
statement_descriptorstringNo—Text on the payer's card statement. Max 22 chars.
additional_infostringNo—Free-text additional info (returned in webhook notifications)
auto_returnstringNo—approved — auto-redirect to success URL on approved payments; all — auto-redirect for any final status.
external_referencestringNo—Your internal order reference. Returned in webhook payloads.
expiresbooleanNo—Whether this preference has an expiry window
expiration_date_fromstringNo—Preference activation start time (ISO 8601)
expiration_date_tostringNo—Preference expiration time (ISO 8601)
marketplacestringNo—Marketplace identifier
marketplace_feefloatNo—Marketplace fee charged to the seller
differential_pricingjsonNo——
binary_modebooleanNo——

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
itemslistYes—List of products/services being purchased
payerjsonNo——
payment_methodsjsonNo——
shipmentsjsonNo——
back_urlsjsonNo—Redirect URLs after checkout completion. Configure auto_return to control when automatic redirects happen.
notification_urlstringNo—URL for IPN notifications. DEPRECATED — use Webhooks instead.
statement_descriptorstringNo—Text on the payer's card statement. Max 22 chars.
additional_infostringNo—Free-text additional info (returned in webhook notifications)
auto_returnstringNo—approved — auto-redirect to success URL on approved payments; all — auto-redirect for any final status.
external_referencestringNo—Your internal order reference. Returned in webhook payloads.
expiresbooleanNo—Whether this preference has an expiry window
expiration_date_fromstringNo—Preference activation start time (ISO 8601)
expiration_date_tostringNo—Preference expiration time (ISO 8601)
marketplacestringNo—Marketplace identifier
marketplace_feefloatNo—Marketplace fee charged to the seller
differential_pricingjsonNo——
binary_modebooleanNo——
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 /checkout/preferences
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform POST /checkout/preferences
* (any state)failfailedRecord the failure reason

API Usage ​

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

{
  "workflow_type": "mercadopago.preferences.create-preference",
  "initial_data": {
    "base_url": "value",
    "items": "value"
  }
}