{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/en-US/guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-group"]},"type":"markdown"},"seo":{"title":"Quick Start","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":"quick-start","__idx":0},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-is-the-dinie-api","__idx":1},"children":["What is the Dinie API?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Dinie API allows partners to integrate credit products directly into their platforms. Through a single REST API, you can register customers, present credit offers, originate loans, and track payments -- all without needing to build credit infrastructure from scratch."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API follows a resource-oriented design with predictable URLs, JSON request and response bodies, and standard HTTP methods and status codes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before making your first API call, you need:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sandbox credentials"]}," -- a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]}," pair provided by your Dinie account manager"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An HTTP client (cURL, Postman, or any programming language with HTTP support)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optionally, one of Dinie's official SDKs (Node.js, Python, or Ruby)"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Info:"]}," Contact your Dinie account manager to request sandbox credentials. Sandbox and production credentials are separate and not interchangeable."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"base-urls","__idx":3},"children":["Base URLs"]},{"$$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":"Environment"},"children":["Environment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Base URL"},"children":["Base URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.dinie.com.br/v3"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sandbox"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://sandbox.api.dinie.com.br/v3"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All examples in this guide use the sandbox URL. Replace it with the production URL when you are ready to go live."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"your-first-api-call","__idx":4},"children":["Your First API Call"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The example below initializes the client with your credentials and registers a business -- the most common operation to start an integration. The SDKs exchange the credentials for an access token automatically."]},{"$$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":"import Dinie from \"dinie\";\n\nconst dinie = new Dinie({\n  clientId: process.env.DINIE_CLIENT_ID,\n  clientSecret: process.env.DINIE_CLIENT_SECRET,\n  environment: \"sandbox\",\n});\n\nconst customer = await dinie.customers.create({\n  external_id: \"user-42\",\n  cpf: \"123.456.789-00\",\n  email: \"joao@example.com\",\n  phone: \"+5511999999999\",\n  cnpj: \"12.345.678/0001-90\",\n});\n\nconsole.log(customer.id);     // \"cust_550e8400...\"\nconsole.log(customer.status); // \"creating\"\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","data-title":"Ruby","header":{"title":"Ruby","controls":{"copy":{}}},"source":"require \"dinie\"\n\ndinie = Dinie::Client.new(\n  client_id: ENV[\"DINIE_CLIENT_ID\"],\n  client_secret: ENV[\"DINIE_CLIENT_SECRET\"],\n  environment: \"sandbox\"\n)\n\ncustomer = dinie.customers.create(\n  external_id: \"user-42\",\n  cpf: \"123.456.789-00\",\n  email: \"joao@example.com\",\n  phone: \"+5511999999999\",\n  cnpj: \"12.345.678/0001-90\"\n)\n\nputs customer.id      # \"cust_550e8400...\"\nputs customer.status  # \"creating\"\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"import os\nfrom dinie import Dinie\n\ndinie = Dinie(\n    client_id=os.environ[\"DINIE_CLIENT_ID\"],\n    client_secret=os.environ[\"DINIE_CLIENT_SECRET\"],\n    environment=\"sandbox\",\n)\n\ncustomer = dinie.customers.create(\n    external_id=\"user-42\",\n    cpf=\"123.456.789-00\",\n    email=\"joao@example.com\",\n    phone=\"+5511999999999\",\n    cnpj=\"12.345.678/0001-90\",\n)\n\nprint(customer.id)      # \"cust_550e8400...\"\nprint(customer.status)  # \"creating\"\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"# 1. Get an access token\ncurl -X POST https://sandbox.api.dinie.com.br/v3/auth/token \\\n  -u \"$DINIE_CLIENT_ID:$DINIE_CLIENT_SECRET\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=client_credentials\"\n\n# 2. Register a business with the token\ncurl -X POST https://sandbox.api.dinie.com.br/v3/customers \\\n  -H \"Authorization: Bearer dinie_at_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"external_id\": \"user-42\",\n    \"cpf\": \"123.456.789-00\",\n    \"email\": \"joao@example.com\",\n    \"phone\": \"+5511999999999\",\n    \"cnpj\": \"12.345.678/0001-90\"\n  }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer is created with status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["creating"]},". When co-owner enrichment completes, the status changes to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending_kyc"]}," (via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.created"]}," webhook) and the list of required documents becomes available in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer.kyc"]},". The next step is to complete the registration and wait for credit offers."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":5},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that you have made your first API call, follow the integration guides:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en-us/guides/customer-registration"},"children":["Registration and Offers"]}]}," -- register customers, complete KYC, and receive credit offers"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en-us/guides/credit-workflow"},"children":["Simulation and Loan Origination"]}]}," -- simulate installments, formalize loans, and track through disbursement"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en-us/apis/concepts/webhooks"},"children":["Webhooks"]}]}," -- set up endpoints to receive real-time notifications"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/en-us/guides/going-to-production"},"children":["Going to Production"]}]}," -- checklist to launch your integration"]}]}]},"headings":[{"value":"Quick Start","id":"quick-start","depth":1},{"value":"What is the Dinie API?","id":"what-is-the-dinie-api","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Base URLs","id":"base-urls","depth":2},{"value":"Your First API Call","id":"your-first-api-call","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Quick Start"}},"lastModified":"2026-03-19T21:33:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en-us/guides/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}