POST:: Retornar informações do DICT utilizando uma chave cadastrada no Pix

Essa API possibilita a realização da busca de uma chave Pix, para obter suas informações bancárias e estatísticas antifraude.

Poderão ser consultadas chaves dos tipos:

  • CPF;

  • CPNJ;

  • Telefone Celular. Caso a chave seja um telefone, utilize o código de país (+55).

  • E-mail; e

  • EVP (chave aleatória).

Endpoint de request

https://sandbox.agilspotpay.financehub.com.br/pix/v1/dict/v2/key

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/dict/v2/key",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"key\":\"testepix@agilspotpay.com.br\"}",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "content-type: 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

{
  "key": "testepix@agilspotpay.com.br",
  "keyType": "EMAIL",
  "account": {
    "openingDate": "2020-08-13T13:49:03Z",
    "participant": "30306294",
    "branch": 20,
    "accountNumber": "42161",
    "accountType": "CACC"
  },
  "owner": {
    "taxIdNumber": "33188542046",
    "type": "NATURAL_PERSON",
    "name": "Teste Celcoin",
    "tradeName": ""
  },
  "endtoendid": "E1393589320220720205100627741380",
  "creationDate": "2021-02-24T20:58:27.376Z",
  "keyOwnershipDate": "2021-02-24T20:58:27.375Z",
  "responseTime": "2022-07-20T20:51:59.427Z",
  "openClaimCreationDate": null,
  "statistics": {
    "lastUpdated": "2022-07-20T09:01:10.426Z",
    "counters": [
      {
        "type": "SETTLEMENTS",
        "by": "KEY",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "SETTLEMENTS",
        "by": "OWNER",
        "d3": "0",
        "d30": "2",
        "m6": "78"
      },
      {
        "type": "SETTLEMENTS",
        "by": "ACCOUNT",
        "d3": "0",
        "d30": "2",
        "m6": "78"
      },
      {
        "type": "REPORTED_FRAUDS",
        "by": "KEY",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "REPORTED_FRAUDS",
        "by": "OWNER",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "REPORTED_FRAUDS",
        "by": "ACCOUNT",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "CONFIRMED_FRAUDS",
        "by": "KEY",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "CONFIRMED_FRAUDS",
        "by": "OWNER",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "CONFIRMED_FRAUDS",
        "by": "ACCOUNT",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "REJECTED",
        "by": "KEY",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "REJECTED",
        "by": "OWNER",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      },
      {
        "type": "REJECTED",
        "by": "ACCOUNT",
        "d3": "0",
        "d30": "0",
        "m6": "0"
      }
    ]
  }
}

Modelo de retorno 400 Error

400 - Não Foram Encontrados Dados Para A Chave Informada
{
  "code": "909",
  "description": "Não foram encontrados dados para a chave informada"
}
400 - Ocorreu Um Problema Ao Tentar Comunicar O Parceiro.
{
  "code": "513",
  "description": "Ocorreu um problema ao tentar comunicar o parceiro."
}

Last updated