Pagamento

A consulta de transações pode ser realizada por meio dos parâmetros PaymentId ou MerchantOrderId. O recurso permite recuperar os detalhes e o status da transação, incluindo situações em que não foi possível determinar seu estado final, como ocorrências de timeout. Essa consulta auxilia na mitigação de envios desnecessários de operações de desfazimento e na prevenção de transações duplicadas.

📘

Consultas realizadas com PaymentId ou MerchantOrderId estão disponíveis apenas para transações efetuadas nos últimos 180 dias.

Requisição

PaymentId

AmbienteMétodoEndpoint
SandboxGEThttps://apiquerysandbox.cieloecommerce.cielo.com.br/1/physicalSales/{PaymentId}
HomologaçãoGEThttps://apiquerysandbox.cieloecommerce.cielo.com.br/1/physicalSales/{PaymentId}
ProduçãoGEThttps://apiquery.cieloecommerce.cielo.com.br/1/physicalSales/{PaymentId}

MerchantOrderId

AmbienteMétodoEndpoint
SandboxGEThttps://apiquerysandbox.cieloecommerce.cielo.com.br/1/physicalSales/MerchantOrderId/{MerchantOrderId}
HomologaçãoGEThttps://apiquerysandbox.cieloecommerce.cielo.com.br/1/physicalSales/MerchantOrderId/{MerchantOrderId}
ProduçãoGEThttps://apiquery.cieloecommerce.cielo.com.br/1/physicalSales/MerchantOrderId/{MerchantOrderId}

Path Parameters

PropriedadeTipoTamanhoObrigatórioDescrição
PaymentIdStringuuidSimCódigo do pagamento
MerchantOrderIdString15SimCaso a data não seja informada via parâmetro (opcional), o sistema considerará automaticamente a data atual. Para consultar transações de dias anteriores, é necessário informar a data desejada como parâmetro. Cada requisição permite a consulta de apenas um dia, não sendo possível pesquisar períodos maiores (semanas ou meses). Utilize o parâmetro no formato ?transactionDate=YYYY/MM/DD (ex: transactionDate=2025/01/23).

Resposta

{
  "MerchantOrderId": "20180204",
  "Customer": {
    "Name": "[Guest]"
  },
  "Payment": {
    "Installments": 1,
    "Interest": "ByMerchant",
    "CreditCard": {
      "ExpirationDate": "12/2020",
      "BrandId": 1,
      "IssuerId": 2,
      "TruncateCardNumberWhenPrinting": true,
      "InputMode": "Emv",
      "AuthenticationMethod": "OnlineAuthentication",
      "EmvData": "112233445566778899011AABBC012D3456789E0123FF45678AB901234C5D112233445566778800",
      "PinBlock": {
        "EncryptedPinBlock": "2280F6BDFD0C038D",
        "EncryptionType": "Dukpt3Des",
        "KsnIdentification": "1231vg31fv231313123"
      }
    },
    "PaymentDateTime": "2019-04-15T12:00:00Z",
    "ServiceTaxAmount": 0,
    "SoftDescriptor": "Description",
    "ProductId": 1,
    "PinPadInformation": {
      "TerminalId": "10000001",
      "SerialNumber": "ABC123",
      "PhysicalCharacteristics": "PinPadWithChipReaderWithSamModule",
      "ReturnDataInfo": "00"
    },
    "Amount": 15798,
    "ReceivedDate": "2019-04-15T12:00:00Z",
    "CapturedAmount": 15798,
    "Provider": "Cielo",
    "ConfirmationStatus": 0,
    "InitializationVersion": 1558708320029,
    "EmvResponseData": "123456789ABCD1345DEA",
    "Status": 2,
    "IsSplitted": false,
    "ReturnCode": 0,
    "ReturnMessage": "Successful",
    "PaymentId": "f15889ea-5719-4e1a-a2da-f4e50d5bd702",
    "Type": "PhysicalDebitCard",
    "Currency": "BRL",
    "Country": "BRA",
    "Links": [
      {
        "Method": "GET",
        "Rel": "self",
        "Href": "https://api.cieloecommerce.cielo.com.br/1/physicalSales/f15889ea-5719-4e1a-a2da-f4e50d5bd702"
      },
      {
        "Method": "DELETE",
        "Rel": "self",
        "Href": "https://api.cieloecommerce.cielo.com.br/1/physicalSales/f15889ea-5719-4e1a-a2da-f4e50d5bd702"
      },
      {
        "Method": "PUT",
        "Rel": "self",
        "Href": "https://api.cieloecommerce.cielo.com.br/1/physicalSales/f15889ea-5719-4e1a-a2da-f4e50d5bd702/confirmation"
      }
    ],
    "PrintMessage": [
      {
        "Position": "Top",
        "Message": "Transação autorizada"
      },
      {
        "Position": "Bottom",
        "Message": "Obrigado e volte sempre!"
      }
    ],
    "ReceiptInformation": [
      {
        "Field": "MERCHANT_NAME",
        "Label": "NOME DO ESTABELECIMENTO",
        "Content": "Estabelecimento"
      },
      {
        "Field": "MERCHANT_ADDRESS",
        "Label": "ENDEREÇO DO ESTABELECIMENTO",
        "Content": "Rua Sem Saida, 0"
      },
      {
        "Field": "MERCHANT_CITY",
        "Label": "CIDADE DO ESTABELECIMENTO",
        "Content": "Cidade"
      },
      {
        "Field": "MERCHANT_STATE",
        "Label": "ESTADO DO ESTABELECIMENTO",
        "Content": "WA"
      },
      {
        "Field": "MERCHANT_CODE",
        "Label": "COD.ESTAB.",
        "Content": 1234567890123456
      },
      {
        "Field": "TERMINAL",
        "Label": "POS",
        "Content": 12345678
      },
      {
        "Field": "NSU",
        "Label": "DOC",
        "Content": 123456
      },
      {
        "Field": "DATE",
        "Label": "DATA",
        "Content": "01/01/20"
      },
      {
        "Field": "HOUR",
        "Label": "HORA",
        "Content": "01:01"
      },
      {
        "Field": "ISSUER_NAME",
        "Label": "EMISSOR",
        "Content": "NOME DO EMISSOR"
      },
      {
        "Field": "CARD_NUMBER",
        "Label": "CARTÃO",
        "Content": 5432123454321234
      },
      {
        "Field": "TRANSACTION_TYPE",
        "Label": "TIPO DE TRANSAÇÃO",
        "Content": "VENDA A CREDITO"
      },
      {
        "Field": "AUTHORIZATION_CODE",
        "Label": "AUTORIZAÇÃO",
        "Content": 123456
      },
      {
        "Field": "TRANSACTION_MODE",
        "Label": "MODO DA TRANSAÇÃO",
        "Content": "ONL"
      },
      {
        "Field": "INPUT_METHOD",
        "Label": "MODO DE ENTRADA",
        "Content": "X"
      },
      {
        "Field": "VALUE",
        "Label": "VALOR",
        "Content": "1,23"
      },
      {
        "Field": "SOFT_DESCRIPTOR",
        "Label": "SOFT DESCRIPTOR",
        "Content": "Simulado"
      }
    ],
    "Receipt": {
      "MerchantName": "Estabelecimento",
      "MerchantAddress": "Rua Sem Saida, 0",
      "MerchantCity": "Cidade",
      "MerchantState": "WA",
      "MerchantCode": 1234567890123456,
      "Terminal": 12345678,
      "Nsu": 123456,
      "Date": "01/01/20",
      "Hour": "01:01",
      "IssuerName": "NOME DO EMISSOR",
      "CardNumber": 5432123454321234,
      "TransactionType": "VENDA A CREDITO",
      "AuthorizationCode": 123456,
      "TransactionMode": "ONL",
      "InputMethod": "X",
      "Value": "1,23",
      "SoftDescriptor": "Simulado"
    }
  }
}