{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-group"]},"type":"markdown"},"seo":{"title":"Fluxo de Biometria","description":"Documentação oficial da API da plataforma de crédito embarcado Dinie. Integre produtos de crédito diretamente na sua aplicação.","siteUrl":"https://docs.dinie.com","lang":"pt-BR","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"fluxo-de-biometria","__idx":0},"children":["Fluxo de Biometria"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Guie o cliente pela verificação de identidade, acompanhe o progresso e saiba como reagir a cada resultado."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"visão-geral","__idx":1},"children":["Visão Geral"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Após ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/customer-registration"},"children":["cadastrar o cliente"]},", dois processos acontecem em paralelo:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Análise de crédito"]}," — a Dinie começa automaticamente a avaliar o perfil de crédito da empresa."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verificação KYC"]}," — o cliente precisa enviar documentos e completar a biometria no seu próprio ritmo."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Você não precisa esperar a análise de crédito terminar para iniciar a verificação. Assim que o cliente atingir o status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending_kyc"]},", apresente a opção de iniciar a biometria."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-apresentar-a-verificação-ao-cliente","__idx":2},"children":["1. Apresentar a Verificação ao Cliente"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Quando o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.created"]}," chegar (ou quando o status mudar para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending_kyc"]},"), apresente ao cliente a opção de iniciar a verificação. Você pode mostrar um botão explícito ou iniciar automaticamente."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-start-verification.93dfa08d0b6edfe2a811752438ba1f4a979bb096586f099406a0fc32e0c6ee76.53e9d79f.svg","alt":"Fluxo de cadastro até a sessão de biometria"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["O importante é comunicar ao cliente que ele precisa completar a verificação de identidade para receber ofertas de crédito."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-criar-a-sessão-de-biometria","__idx":3},"children":["2. Criar a Sessão de Biometria"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Quando o cliente confirmar que quer iniciar, crie uma sessão de biometria:"]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"const session = await client.customers.createBiometricsSession(customer.id);\n\n// Abra esta URL em um webview ou redirecione o cliente\nconsole.log(session.session_url);\nconsole.log(session.expires_at); // Expira em 30 minutos\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"session = client.customers.create_biometrics_session(customer.id)\n\n# Abra esta URL em um webview ou redirecione o cliente\nputs session.session_url\nputs session.expires_at # Expira em 30 minutos\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"session = client.customers.create_biometrics_session(customer.id)\n\n# Abra esta URL em um webview ou redirecione o cliente\nprint(session.session_url)\nprint(session.expires_at)  # Expira em 30 minutos\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST \"https://sandbox.api.dinie.com.br/v3/customers/${CUSTOMER_ID}/biometrics\" \\\n  -H \"Authorization: Bearer dinie_at_...\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Abra a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_url"]}," em um ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["webview"]}," (mobile) ou ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["redirecione"]}," o navegador (web). A sessão expira em 30 minutos — se expirar, gere uma nova."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tip:"]}," Se o parceiro já possui documentos do cliente, pode enviá-los via API antes de gerar a sessão. Documentos enviados antecipadamente já aparecerão como completos na sessão, acelerando o processo para o cliente. Veja ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/kyc-requirements#envio-antecipado-via-api"},"children":["Envio Antecipado via API"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-o-que-o-cliente-verá","__idx":4},"children":["3. O que o Cliente Verá"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Na sessão de biometria, o cliente verá a lista de documentos necessários. Documentos já enviados via API aparecem como completos. O cliente precisa completar os itens pendentes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-biometrics-session.cd7f9cfac3175708f025b890fc2bcf288b5666847cdde7ce2efcdfa99bb4cfd7.53e9d79f.svg","alt":"Sessão de biometria: documentos, selfie e revisão"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["O fluxo na sessão inclui:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Envio de documentos"]}," — fotos de identidade (CNH ou RG), comprovante de endereço, documentos da empresa"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Selfie"]}," — captura pelo próprio cliente via câmera do dispositivo"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Revisão"]}," — visualizar tudo que foi enviado antes de confirmar"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ao final, o cliente terá duas opções:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Salvar para depois"]}," — o progresso é mantido, mas a análise não é disparada"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enviar para análise"]}," — dispara a verificação de todos os documentos"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-salvar-para-depois","__idx":5},"children":["4. Salvar para Depois"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se o cliente escolher \"Salvar para depois\", ele retornará ao seu ambiente. Nenhuma análise é disparada nesse momento — o cliente pode voltar a qualquer momento para continuar."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Você pode acompanhar o progresso de duas formas:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Via webhook:"]}," receba o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.kyc_updated"]}," sempre que um documento for enviado. O payload inclui o array ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kyc"]}," atualizado."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Via API:"]}," consulte o cliente e verifique o campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kyc"]},":"]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"const customer = await client.customers.get(customerId);\n\nfor (const req of customer.kyc) {\n  const status = req.submitted ? \"Enviado\" : \"Pendente\";\n  console.log(`${req.label}: ${status}`);\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"customer = client.customers.get(customer_id)\n\ncustomer.kyc.each do |req|\n  status = req[\"submitted\"] ? \"Enviado\" : \"Pendente\"\n  puts \"#{req[\"label\"]}: #{status}\"\nend\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"customer = client.customers.get(customer_id)\n\nfor req in customer.kyc:\n    status = \"Enviado\" if req[\"submitted\"] else \"Pendente\"\n    print(f\"{req['label']}: {status}\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl \"https://sandbox.api.dinie.com.br/v3/customers/${CUSTOMER_ID}\" \\\n  -H \"Authorization: Bearer dinie_at_...\"\n\n# Verifique customer.kyc[].submitted para cada requisito\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mostre ao cliente o progresso da verificação — quais documentos já foram enviados e quais ainda faltam. Para retomar, basta gerar uma nova sessão de biometria. O progresso anterior é preservado."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-save-resume.c73f4727390691c7993309c7d57f43b851ceb09e8449e2fa60680e5377a4143c.53e9d79f.svg","alt":"Fluxo de salvar, acompanhar e retomar"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-enviar-para-análise","__idx":6},"children":["5. Enviar para Análise"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Quando o cliente clicar \"Enviar para análise\" na sessão de biometria, a Dinie inicia a verificação de todos os documentos. Você receberá o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.under_review"]},", e o status do cliente mudará para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["under_review"]},"."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"app.post(\"/webhooks/dinie\", express.raw({ type: \"application/json\" }), (req, res) => {\n  const event = client.webhooks.unwrap(req.body.toString(), req.headers);\n\n  if (event.type === \"customer.under_review\") {\n    updateCustomerScreen(event.data.external_id, \"Em análise\");\n  }\n\n  res.sendStatus(200);\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"post \"/webhooks/dinie\" do\n  event = client.webhooks.unwrap(request.body.read, request.env)\n\n  if event[\"type\"] == \"customer.under_review\"\n    update_customer_screen(event.dig(\"data\", \"external_id\"), \"Em análise\")\n  end\n\n  status 200\nend\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"@app.post(\"/webhooks/dinie\")\nasync def handle_webhook(request: Request):\n    event = client.webhooks.unwrap(await request.body(), request.headers)\n\n    if event[\"type\"] == \"customer.under_review\":\n        update_customer_screen(event[\"data\"][\"external_id\"], \"Em análise\")\n\n    return Response(status_code=200)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"# Webhook recebido no seu endpoint:\n# {\n#   \"type\": \"customer.under_review\",\n#   \"data\": {\n#     \"id\": \"cust_550e8400...\",\n#     \"external_id\": \"partner-ref-123\",\n#     \"status\": \"under_review\"\n#   }\n# }\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A partir daqui, a Dinie pode aprovar, negar ou solicitar correções em documentos específicos."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"6-resultado-aprovado","__idx":7},"children":["6. Resultado: Aprovado"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se todos os documentos forem aprovados, o cliente recebe o status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active"]}," e você recebe o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.active"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Isso ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["não significa"]}," que já existem ofertas de crédito. A análise de crédito acontece em paralelo e pode levar mais tempo. A partir do momento que o cliente é ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active"]},", a Dinie continua processando a análise de crédito."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Quando uma oferta estiver disponível, você receberá o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit_offer.available"]},":"]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"app.post(\"/webhooks/dinie\", express.raw({ type: \"application/json\" }), (req, res) => {\n  const event = client.webhooks.unwrap(req.body.toString(), req.headers);\n\n  if (event.type === \"customer.active\") {\n    updateCustomerScreen(event.data.external_id, \"Verificado\");\n  }\n\n  if (event.type === \"credit_offer.available\") {\n    const offers = await client.creditOffers.list(event.data.customer_id);\n    notifyCustomer(event.data.external_id, offers);\n  }\n\n  res.sendStatus(200);\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"post \"/webhooks/dinie\" do\n  event = client.webhooks.unwrap(request.body.read, request.env)\n\n  case event[\"type\"]\n  when \"customer.active\"\n    update_customer_screen(event.dig(\"data\", \"external_id\"), \"Verificado\")\n  when \"credit_offer.available\"\n    offers = client.credit_offers.list(event.dig(\"data\", \"customer_id\"))\n    notify_customer(event.dig(\"data\", \"external_id\"), offers)\n  end\n\n  status 200\nend\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"@app.post(\"/webhooks/dinie\")\nasync def handle_webhook(request: Request):\n    event = client.webhooks.unwrap(await request.body(), request.headers)\n\n    if event[\"type\"] == \"customer.active\":\n        update_customer_screen(event[\"data\"][\"external_id\"], \"Verificado\")\n\n    if event[\"type\"] == \"credit_offer.available\":\n        offers = client.credit_offers.list(event[\"data\"][\"customer_id\"])\n        notify_customer(event[\"data\"][\"external_id\"], offers)\n\n    return Response(status_code=200)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"# Webhook customer.active:\n# { \"type\": \"customer.active\", \"data\": { \"status\": \"active\", ... } }\n\n# Webhook credit_offer.available:\n# { \"type\": \"credit_offer.available\", \"data\": { \"approved_amount\": 50000.00, ... } }\n\n# Listar ofertas:\ncurl \"https://sandbox.api.dinie.com.br/v3/customers/${CUSTOMER_ID}/credit-offers\" \\\n  -H \"Authorization: Bearer dinie_at_...\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-approved-offers.9fd27113db4f3474b82c79b298486fe36c7f3dc7c6eace4b9e03e2407894a4db.53e9d79f.svg","alt":"Aguardando ofertas e oferta disponível"},"children":[]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Info:"]}," Entre o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.active"]}," e o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit_offer.available"]},", mostre ao cliente uma mensagem como \"Verificação concluída, estamos buscando as melhores ofertas para você\". Isso transmite que o processo está avançando."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"7-resultado-documentos-pendentes","__idx":8},"children":["7. Resultado: Documentos Pendentes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se a Dinie identificar problemas em algum documento, você receberá o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.kyc_updated"]}," com os detalhes. Consulte o campo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kyc"]}," para verificar quais documentos foram rejeitados:"]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"const customer = await client.customers.get(customerId);\n\nfor (const req of customer.kyc) {\n  if (req.submitted?.review_status === \"rejected\") {\n    console.log(`${req.label}: Rejeitado — ${req.submitted.review_reason}`);\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"customer = client.customers.get(customer_id)\n\ncustomer.kyc.each do |req|\n  submitted = req[\"submitted\"]\n  if submitted && submitted[\"review_status\"] == \"rejected\"\n    puts \"#{req[\"label\"]}: Rejeitado — #{submitted[\"review_reason\"]}\"\n  end\nend\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"customer = client.customers.get(customer_id)\n\nfor req in customer.kyc:\n    submitted = req.get(\"submitted\")\n    if submitted and submitted.get(\"review_status\") == \"rejected\":\n        print(f\"{req['label']}: Rejeitado — {submitted['review_reason']}\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl \"https://sandbox.api.dinie.com.br/v3/customers/${CUSTOMER_ID}\" \\\n  -H \"Authorization: Bearer dinie_at_...\"\n\n# Verifique customer.kyc[].submitted.review_status e review_reason\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mostre ao cliente quais documentos precisam de correção e o motivo da rejeição. Você não precisa fazer nada diretamente na API — apenas apresente um botão para o cliente abrir a sessão de biometria novamente:"]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"Node.js","header":{"title":"Node.js","controls":{"copy":{}}},"source":"// Gere uma nova sessão para o cliente corrigir os documentos\nconst session = await client.customers.createBiometricsSession(customer.id);\nredirectCustomer(session.session_url);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"# Gere uma nova sessão para o cliente corrigir os documentos\nsession = client.customers.create_biometrics_session(customer.id)\nredirect_customer(session.session_url)\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"# Gere uma nova sessão para o cliente corrigir os documentos\nsession = client.customers.create_biometrics_session(customer.id)\nredirect_customer(session.session_url)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"# Gere uma nova sessão\ncurl -X POST \"https://sandbox.api.dinie.com.br/v3/customers/${CUSTOMER_ID}/biometrics\" \\\n  -H \"Authorization: Bearer dinie_at_...\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Na sessão, os documentos rejeitados aparecerão destacados com o motivo da rejeição. O cliente corrige, reenvia, e o ciclo se repete até que todos sejam aprovados."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-documents-pending.4b5ca813494ad2787378318755dc7ea2480f228b1b4823246f4b15ace1167ca3.53e9d79f.svg","alt":"Fluxo de correção de documentos"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"8-resultado-negado","__idx":9},"children":["8. Resultado: Negado"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se o cliente for negado permanentemente, você receberá o webhook ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.denied"]},". Isso indica que a Dinie não conseguiu aprovar o cliente na análise de KYC (por exemplo, fraude detectada ou empresa encerrada)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Neste caso, informe ao cliente que ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["não é possível oferecer crédito neste momento"]},". Diferente do cenário de aprovação sem ofertas (onde o cliente pode receber ofertas no futuro), o status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["denied"]}," é definitivo."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/flow-denied.556e249c1276b85997fb898bb42584f0246b1b1027270bdd28395c32fd42f1be.53e9d79f.svg","alt":"Avaliação e resultado negado"},"children":[]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Warning:"]}," Não comunique ao cliente o motivo específico da negação. Informe apenas que não foi possível prosseguir com a análise neste momento."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resumo-do-fluxo","__idx":10},"children":["Resumo do Fluxo"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Etapa"},"children":["Etapa"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Ação do parceiro"},"children":["Ação do parceiro"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API / Webhook"},"children":["API / Webhook"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cliente cadastrado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Apresentar botão de verificação"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.created"]}," webhook"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cliente inicia"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Criar sessão de biometria"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST biometrics"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cliente na sessão"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aguardar"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salvar para depois"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mostrar progresso"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.kyc_updated"]}," webhook ou ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET customer"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enviar para análise"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mostrar \"em análise\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.under_review"]}," webhook"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aprovado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aguardar ofertas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.active"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit_offer.available"]}," webhooks"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Documento rejeitado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mostrar motivo + botão para corrigir"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.kyc_updated"]}," webhook"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Negado"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Informar cliente"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.denied"]}," webhook"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"guias-relacionados","__idx":11},"children":["Guias Relacionados"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/customer-registration"},"children":["Cadastro e Ofertas"]}," para o fluxo completo de criação do cliente"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/kyc-requirements"},"children":["Requisitos de KYC"]}," para detalhes sobre tipos de documentos"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/credit-workflow"},"children":["Simulação e Contratação"]}," para o passo seguinte após receber ofertas"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/concepts/webhooks"},"children":["Webhooks"]}," para configurar os endpoints de notificação"]}]}]},"headings":[{"value":"Fluxo de Biometria","id":"fluxo-de-biometria","depth":1},{"value":"Visão Geral","id":"visão-geral","depth":2},{"value":"1. Apresentar a Verificação ao Cliente","id":"1-apresentar-a-verificação-ao-cliente","depth":2},{"value":"2. Criar a Sessão de Biometria","id":"2-criar-a-sessão-de-biometria","depth":2},{"value":"3. O que o Cliente Verá","id":"3-o-que-o-cliente-verá","depth":2},{"value":"4. Salvar para Depois","id":"4-salvar-para-depois","depth":2},{"value":"5. Enviar para Análise","id":"5-enviar-para-análise","depth":2},{"value":"6. Resultado: Aprovado","id":"6-resultado-aprovado","depth":2},{"value":"7. Resultado: Documentos Pendentes","id":"7-resultado-documentos-pendentes","depth":2},{"value":"8. Resultado: Negado","id":"8-resultado-negado","depth":2},{"value":"Resumo do Fluxo","id":"resumo-do-fluxo","depth":2},{"value":"Guias Relacionados","id":"guias-relacionados","depth":2}],"frontmatter":{"seo":{"title":"Fluxo de Biometria"}},"lastModified":"2026-03-13T19:30:00.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/biometrics-flow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}