Obter uma preferência - Preferências - Mercado Pago Developers
Developers
Referência API
Suporte
Entrar

    Introdução

    LISTA DE API

    Preferências

    Criar uma preferência

    POST

    Pesquisar preferências

    GET

    Obter uma preferência

    GET

    Atualizar uma preferência

    PUT

    Tipos de documento

    Obter tipos de documentos

    GET

    Meios de pagamento

    Obter meios de pagamento

    GET

    Pagamentos

    Criar um pagamento

    POST

    Pesquisar pagamentos

    GET

    Obter um pagamento

    GET

    Atualizar um pagamento

    PUT

    Estornos

    Obter um estorno

    GET

    Clientes

    Criar um cliente

    POST

    Pesquisar clientes

    GET

    Obter um cliente

    GET

    Atualizar um cliente

    PUT

    Cartões

    Salvar um cartão

    POST

    Obter cartões de um cliente

    GET

    Obter um cartão

    GET

    Atualizar um cartão

    PUT

    Excluir um cartão

    DELETE

    Lojas

    Obter uma Loja

    GET

    Criar uma Loja

    POST

    Pesquisar lojas

    GET

    Atualizar uma Loja

    PUT

    Excluir uma Loja

    DELETE

    Caixa

    Criar um Caixa

    POST

    Pesquisar caixas

    GET

    Obter um Caixa

    GET

    Atualizar um Caixa

    PUT

    Excluir um Caixa

    DELETE

    Ordens presenciais

    Criar uma ordem

    POST

    Excluir uma ordem

    DELETE

    Ordens presenciais v2

    Criar uma ordem

    PUT

    Obter uma ordem

    GET

    Excluir uma ordem

    DELETE

    Ordens

    Criar uma ordem

    POST

    Pesquisar ordens

    GET

    Obter uma ordem

    GET

    Atualizar uma ordem

    PUT

    Preferência de assinatura

    Criar uma assinatura

    POST

Obter uma preferência

GET

/checkout/preferences/{id}
Veja todas as informações de pagamento de um produto ou serviço com a identificação da preferência desejada.
Produtos relacionados:
Checkout Pro
Marketplace
Mobile Checkout
Parâmetros de requisição
id

OBRIGATÓRIO

string
Localização: pathThe preference's ID
Parâmetros de resposta
additional_info
string
Localização: bodyadditional_info
auto_return
String
Localização: bodyNo caso de estar especificado o comprador será redirecionado para o seu site imediatamente após a compra
approved: The redirection takes place only for approved payments.
all: The redirection takes place only for approved payments, forward compatibility only if we change the default behavior
back_urls
object
Localização: bodyback_urls
client_id
string
Localização: bodyclient_id
Solicitação
curl
curl -X GET \
    'https://api.mercadopago.com/checkout/preferences/{id}' \
    -H 'Authorization: Bearer ACCESS_TOKEN_ENV' 
Resposta
json
{
  "back_urls": {},
  "client_id": 6295877106812064,
  "collector_id": 202809963,
  "date_created": "2018-02-02T19:18:51.150Z",
  "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": "http://placehold.it/350x150",
      "description": "This is my description",
      "quantity": 2,
      "unit_price": 14.5
    }
  ],
  "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": {}
  }
}
Erros
400bad_request
invalid_collector_idcollector_id invalid.
invalid_sponsor_idsponsor_id is not an active user.
invalid_collector_emailcollector is not collector_email owner.
invalid_operation_typeoperation_type invalid.
invalid_expiration_date_toexpiration_date_to invalid.
invalid_expiration_date_fromexpiration_date_from invalid.
invalid_itemsunit_price invalid.
invalid_payerpayer email invalid. Max length 150.
invalid_back_urlsback_urls invalid. Wrong format.
invalid_payment_methodsinstallments invalid. Should be a number between 1 and 36.
invalid_marketplace_feemarketplace_fee must not be greater than total amount.
invalid_idpreference_id not found.
invalid_access_tokenaccess denied.
invalid_shipmentsInvalid total amount, with me2 it cannot be lesser than <limit>.
Essas informações foram úteis?

Copyright © 1999-2021 MercadoLibre Perú S.R.L.

Termos e condiçõesComo cuidamos da sua privacidade
Partners Mercado Pago

Al navegar en este sitio aceptas las cookies que utilizamos para mejorar tu experiencia. Más información.