v1

latestOpenAPI 3.1.02026-07-24750514.9 KB

Consultar pagamento

get/payments/{payment_id}

Path parameters

payment_idstring required

Identificador único do pagamento que deseja consultar. Formato PAYM_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Headers

Authorizationstring required

Token de autenticação. Deve ser enviado no formato Bearer <token>.

Response

200

idstring
created_atstring
updated_atstring
statusstring

Example response

{
  "id": "PAYM_6D96F997-EDCE-4D14-8AC0-A11CE7CA539A",
  "invoice": {
    "id": "INVO_F933C729-F68A-44E3-82ED-9CE380D3C4ED",
    "amount": {
      "value": 1000,
      "currency": "BRL"
    }
  },
  "created_at": "2022-06-09T10:28:20.525781-03:00",
  "updated_at": "2022-06-09T10:28:20.525789-03:00",
  "customer": {
    "id": "CUST_2E9290E4-8149-4AEE-8A6B-F04055EFCEA1",
    "name": "Novo Nome do seu cliente",
    "email": "novo.email.do.cliente@empresa.com.br"
  },
  "payment_method": {
    "type": "CREDIT_CARD",
    "card": {
      "token": "TOKE_BEF65005-C30B-4527-B2B0-43C4A9419F41",
      "brand": "visa",
      "first_digits": "412536",
      "last_digits": "3452",
      "exp_month": "12",
      "exp_year": "2043",
      "holder": {
        "name": "Novo cartão gerando"
      }
    }
  },
  "status": "DENIED",
  "provider": {
    "name": "PAGSEGURO",
    "transaction_id": "CHARGE_SANDBOX_ID",
    "code": "A01",
    "message": "Não autorizado pelo emissor"
  },
  "links": [
    {
      "rel": "SELF",
      "href": "http://sandbox.api.assinaturas.pagseguro.com/payments/PAYM_6D96F997-EDCE-4D14-8AC0-A11CE7CA539A",
      "media": "application/json",
      "type": "GET"
    }
  ]
}