GET:: Buscar dados de uma cobrança imediata

Essa API retorna as informações de uma cobrança imediata a partir do transactionid.

Endpoint de request

https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/immediate/{transactionId}

Exemplo com as principais linguagem

Retorno em JSON com os dados do cadastro.

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/immediate/{transactionId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "accept: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Modelo de retorno 200 OK

{
  "transactionId": 9189382,
  "status": "ACTIVE",
  "lastUpdate": "2022-03-21T14:27:58.2106288+00:00",
  "payerQuestion": null,
  "additionalInformation": null,
  "debtor": {
    "name": "Fulano de Tal",
    "cpf": null,
    "cnpj": "61360961000100",
    "city": "Barueri",
    "publicArea": "Avenida Brasil",
    "state": "SP",
    "postalCode": "01202003",
    "email": "contato@agilspotpay.com.br"
  },
  "amount": {
    "original": 15.63,
    "discount": {
      "discountDateFixed": [
        {
          "date": "2022-03-21T00:00:00",
          "amountPerc": "1.00"
        }
      ],
      "modality": "FIXED_VALUE_UNTIL_THE_DATES_INFORMED"
    },
    "abatement": null,
    "fine": null,
    "interest": null
  },
  "key": "testepix@agilspotpay.com.br",
  "receiver": {
    "name": "João da Silva",
    "cpf": null,
    "cnpj": "60904237000129",
    "postalCode": "01202003",
    "city": "Barueri",
    "publicArea": "Avenida Brasil",
    "state": "SP",
    "fantasyName": "Nome de Comercial"
  },
  "calendar": {
    "expirationAfterPayment": "10",
    "createdAt": "0001-01-01T00:00:00",
    "dueDate": "2022-03-22T00:00:00"
  },
  "createAt": "2022-03-21T14:27:58.2106288+00:00",
  "clientRequestId": "9b26edb7cf254db09f5449c94bf13abc",
  "transactionIdentification": "kk6g232xel65a0daee4dd13kk9189382",
  "transactionIdPayment": 0
}

Modelo de retorno 400 Error

400 - Não Foi Possível Localizar A Cobrança
{
  "message": "Não foi possível localizar a cobrança associada ao parâmetro informado.",
  "errorCode": "VL002"
}

Last updated