Home
Documentation
Resources
Certifications
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Community

Get the latest news, ask others for help and share your knowledge.

Get preference - Preferences - Mercado Pago Developers

Intelligent search powered by OpenAI 

Get preference

GET

https://api.mercadopago.com/checkout/preferences/{id}
Check all the payment information for a product or service with the ID of the preference of your choice..
Request's parameters
PATH
id
string

REQUIRED

Preference ID.
Response parameters
additional_info
string
Additional information.
auto_return
String
If specified, the buyer will be automatically redirected to the seller's site after the purchase is approved with a credit card.
approved: The redirection takes place only for approved payments with a credit card.
all: The redirection takes place only for approved payments with a credit card, forward compatibility only if we change the default behavior.
back_urls
object
Return URLs to the seller's site, either automatically ("auto_return") or through the 'Return to site' button, depending on the payment status.
client_id
string
Unique ID used to identify the client. It is obtained from the credentials used to create the preference. It´s the application ID.
Errors

400Error

invalid_collector_id

collector_id invalid.

invalid_sponsor_id

sponsor_id is not an active user.

invalid_collector_email

collector is not collector_email owner.

invalid_operation_type

operation_type invalid.

invalid_expiration_date_to

expiration_date_to invalid.

invalid_expiration_date_from

expiration_date_from invalid.

invalid_items

unit_price invalid.

invalid_payer

payer email invalid. Max length 150.

invalid_back_urls

back_urls invalid. Wrong format.

invalid_payment_methods

installments invalid. Should be a number between 1 and 36.

invalid_marketplace_fee

marketplace_fee must not be greater than total amount.

invalid_id

preference_id not found.

invalid_access_token

access denied.

invalid_shipments

Invalid total amount, with me2 it cannot be lesser than <limit>.

Request
curl -X GET \
    'https://api.mercadopago.com/checkout/preferences/{id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer TEST-5599*********291-02171*********139a4791e*********f7f5835-1*********' \
    
Sample answer
{
  "auto_return": "approved",
  "back_urls": {},
  "client_id": 6295877106812064,
  "collector_id": 202809963,
  "date_created": "2022-11-17T09:37:52.000-04:00",
  "expiration_date_from": "2022-11-17T09:37:52.000-04:00",
  "expiration_date_to": "2022-11-17T10:37:52.000-05:00",
  "id": "202809963-a2201f8d-11cb-443f-adf6-de5a42eed67d",
  "init_point": "https://www.mercadopago.com/mla/checkout/start?pref_id=202809963-a2201f8d-11cb-443f-adf6-de5a42eed67d",
  "items": [
    {
      "id": "item-ID-1234",
      "currency_id": "$",
      "title": "Practical Granite Shirt",
      "picture_url": "https://placehold.it/350x150",
      "description": "This is my description",
      "quantity": 2,
      "unit_price": 14
    }
  ],
  "marketplace": "MP-MKT-6295877106812064",
  "marketplace_fee": 0,
  "statement_descriptor": "MERCADOPAGO",
  "payer": {
    "phone": {
      "number": "631.586.0213"
    },
    "address": {
      "zip_code": 76336,
      "street_name": "Marjory Stream",
      "street_number": 941
    },
    "identification": {
      "number": 12345678,
      "type": "DNI"
    }
  },
  "payment_methods": {
    "excluded_payment_methods": [
      {}
    ],
    "excluded_payment_types": [
      {}
    ]
  },
  "sandbox_init_point": "https://sandbox.mercadopago.com/mla/checkout/pay?pref_id=202809963-a2201f8d-11cb-443f-adf6-de5a42eed67d",
  "shipments": {
    "receiver_address": {}
  }
}