Obter pagamento - Pagamentos - Mercado Pago Developers
Obter pagamento

GET

/v1/payments/{id}
Consulte todas as informações de um pagamento através do ID de pagamento.
Parâmetros de requisição
id

OBRIGATÓRIO

string
Localização: pathIdentificador único de pagamento, gerado automaticamente pelo Mercado Pago
Parâmetros de resposta
id
string
Localização: bodyIdentificador único de pagamento, gerado automaticamente pelo Mercado Pago
date_created
string
Localização: bodyData de criação do pagamento.
date_approved
string
Localização: bodyData de aprovação do pagamento. Um pagamento pode ser gerado em um estado intermediário e depois aprovado, portanto, a data de criação nem sempre coincidirá com a Data de Aprovação.
date_last_updated
string
Localização: bodyData em que o último evento de pagamento foi registrado.
Solicitação
curl
curl -X GET \
    'https://api.mercadopago.com/v1/payments/{id}' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' 
Resposta
json
{
  "id": 1,
  "date_created": "2017-08-31T11:26:38.000Z",
  "date_approved": "2017-08-31T11:26:38.000Z",
  "date_last_updated": "2017-08-31T11:26:38.000Z",
  "money_release_date": "2017-09-14T11:26:38.000Z",
  "payment_method_id": "account_money",
  "payment_type_id": "credit_card",
  "status": "approved",
  "status_detail": "accredited",
  "currency_id": "BRL",
  "description": "Pago Pizza",
  "collector_id": 2,
  "payer": {
    "id": 123,
    "email": "afriend@gmail.com",
    "identification": {
      "type": "DNI",
      "number": 12345678
    },
    "type": "customer"
  },
  "metadata": {},
  "additional_info": {},
  "transaction_amount": 250,
  "transaction_amount_refunded": 0,
  "coupon_amount": 0,
  "transaction_details": {
    "net_received_amount": 250,
    "total_paid_amount": 250,
    "overpaid_amount": 0,
    "installment_amount": 250
  },
  "installments": 1,
  "card": {}
}
Erros
400bad_request
11--Params Error.
33--Token must be for test.
55--Must provide your access_token to proceed.
10001000--Number of rows exceeded the limits.
10011001--Date format must be yyyy-MM-dd'T'HH:mm:ss.SSSZ.
20012001--Already posted the same request in the last minute.
20022002--Customer not found.
20042004--POST to Gateway Transactions API fail.
20062006--Card Token not found.
20072007--Connection to Card Token API fail.
20092009--Card token issuer can't be null.
30003000--You must provide your cardholder_name with your card data.
30013001--You must provide your cardissuer_id with your card data.
30033003--Invalid card_token_id.
30043004--Invalid parameter site_id.
30053005--Not valid action, the resource is in a state that does not allow this operation. For more information see the state that has the resource.
30063006--Invalid parameter cardtoken_id.
30073007--The parameter client_id can not be null or empty.
30083008--Not found Cardtoken.
30093009--unauthorized client_id.
30103010--Not found card on whitelist.
30113011--Not found payment_method.
30123012--Invalid parameter security_code_length.
30133013--The parameter security_code is a required field can not be null or empty.
30143014--Invalid parameter payment_method.
30153015--Invalid parameter card_number_length.
30163016--Invalid parameter card_number.
30173017--The parameter card_number_id can not be null or empty.
30183018--The parameter expiration_month can not be null or empty.
30193019--The parameter expiration_year can not be null or empty.
30203020--The parameter cardholder.name can not be null or empty.
30213021--The parameter cardholder.document.number can not be null or empty.
30223022--The parameter cardholder.document.type can not be null or empty.
30233023--The parameter cardholder.document.subtype can not be null or empty.
30243024--Not valid action - partial refund unsupported for this transaction.
30253025--Invalid Auth Code.
30263026--Invalid card_id for this payment_method_id.
30273027--Invalid payment_type_id.
30283028--Invalid payment_method_id.
30293029--Invalid card expiration month.
30303030--Invalid card expiration year.
403bad_request
44--The caller is not authorized to access this resource.
30023002--The caller is not authorized to perform this action.
404bad_request
20002000--Payment not found.