Embedded credit API for Dinie partners. Enables customer registration, credit offer management, loan origination, and event delivery via webhooks.
Dinie API (2026-03-01)
OAuth2 Client Credentials authentication and API key management.
Each client_id / client_secret pair represents an access credential. Exchange the credentials for a JWT token via POST /auth/token and send the token as Bearer in all requests. The token expires in 1 hour.
You can create multiple credentials for different environments and revoke them individually.
The Customer resource (cust_) represents a credit borrower on the platform. The lifecycle follows: registration → KYC document submission → review → activation.
Two processes happen in parallel:
- Credit analysis — starts automatically upon registration
- KYC verification — the customer completes at their own pace
processing → contract_generated → awaiting_signatures → signed → disbursing → active → finished
↘ cancelled
↘ error| Status | Description | Required Action |
|---|---|---|
processing | Loan created, processing | Wait |
contract_generated | CCB generated | Wait |
awaiting_signatures | Contract ready for signing | Redirect customer to signing_url |
signed | Contract signed | Wait for disbursement |
disbursing | Disbursement in progress | Wait |
active | Disbursement completed, installments generated | Track payments |
finished | All installments paid | — |
cancelled | Cancelled before disbursement | — |
error | Processing error | Contact support |
# 1. Create the loan from the simulation
loan = client.loans.create(
credit_offer_id: "co_550e8400...",
simulation_id: "sim_550e8400...",
installments: 6,
installments_value: "4550.00",
first_due_date: "2026-04-15"
)
# loan.id => "ln_550e8400..."
# loan.status => "processing"
# 2. After loan.awaiting_signatures webhook
loan = client.loans.retrieve(loan.id)
# loan.signing_url => ClickSign URL for signing
# Redirect the customer to this URL
# 3. After loan.active webhook — check installments
transactions = client.loans.list_transactions(loan.id)
transactions.data.each do |tx|
puts "#{tx.due_date}: R$ #{tx.amount_due} (#{tx.status})"
end
# 2026-04-15: R$ 4550.00 (pending)
# 2026-05-15: R$ 4550.00 (pending)
# ...Each active loan has transactions of type installment — one per installment. Track payments via queries or webhooks.
| Status | Description |
|---|---|
pending | Installment not yet due |
paid | Installment fully paid |
partially_paid | Partial payment received |
overdue | Installment overdue (days_overdue > 0) |
| Event | When it fires |
|---|---|
loan.created | Loan created, processing started |
loan.contract_generated | CCB generated, ccb_number available |
loan.awaiting_signatures | signing_url available for the customer |
loan.signed | Contract signed by all parties |
loan.disbursing | Disbursement via Pix started |
loan.active | Disbursement completed, installments created |
loan.payment_received | Installment payment detected |
loan.finished | All installments paid |
loan.cancelled | Loan cancelled |
loan.error | Processing error |
Request
Simulates a loan scenario for a specific credit offer. The customer can simulate multiple times with different amounts and terms before committing. The simulation is synchronous and returns installment amounts, fees, and total cost. The result is persisted and can be referenced when creating the loan via simulation_id. Only the latest simulation is valid for contracting (Last Write Record).
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/credit-offers/{credit_offer_id}/simulations
- Productionhttps://api.dinie.com.br/v3/credit-offers/{credit_offer_id}/simulations
- Sandboxhttps://sandbox.api.dinie.com.br/v3/credit-offers/{credit_offer_id}/simulations
- curl
- Python
- Node.js
- Ruby
curl -X POST https://api.dinie.com.br/v3/credit-offers/co_550e8400e29b41d4a716446655440000/simulations \
-H "Authorization: Bearer $DINIE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"requested_amount": "25000.00",
"installment_count": 12
}'{ "id": "sim_550e8400e29b41d4a716446655440001", "credit_offer_id": "co_550e8400e29b41d4a716446655440000", "requested_amount": "25000.00", "amount": "24250.00", "interest_amount": "2750.00", "fees_amount": "300.00", "iof_amount": "450.00", "total_loan_amount": "27500.00", "interest_percentage": 3.5, "cet_percentage": 4.12, "number_of_installments": 12, "installments_value": "2291.67", "first_due_date": "2026-04-03", "created_at": "2026-03-04T10:30:00Z" }
Request
Creates a loan from a credit offer and a simulation accepted by the customer. The partner must include the simulation_id to link the agreed terms. The loan starts with status processing and automatically progresses through the cycle: contract_generated → awaiting_signatures → signed → disbursing → active. The signing_url for signing the CCB contract will be made available via webhook loan.contract_generated. Track the lifecycle via loan.* webhooks.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loans
- Productionhttps://api.dinie.com.br/v3/loans
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loans
- curl
- Python
- Node.js
- Ruby
curl -X POST https://api.dinie.com.br/v3/loans \
-H "Authorization: Bearer $DINIE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
-d '{
"credit_offer_id": "co_550e8400e29b41d4a716446655440000",
"simulation_id": "sim_550e8400e29b41d4a716446655440001",
"installments": 12,
"installments_value": "2291.67",
"first_due_date": "2026-04-03"
}'Loan created
| Enum Value | Description |
|---|---|
| processing | Loan request received, credit analysis in progress |
| contract_generated | CCB contract generated, ready for signatures |
| awaiting_signatures | Contract sent to customer for electronic signature |
| signed | Customer signed the contract, awaiting disbursement |
| disbursing | Funds are being transferred to the customer |
| active | Loan disbursed, installments are being collected |
| finished | All installments paid, loan completed |
| cancelled | Loan cancelled before disbursement |
| error | An error occurred during processing |
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
ClickSign widget URL. Present only during contract_generated and awaiting_signatures.
{ "id": "ln_550e8400e29b41d4a716446655440001", "credit_offer_id": "co_550e8400e29b41d4a716446655440000", "simulation_id": "sim_550e8400e29b41d4a716446655440001", "customer_id": "cust_550e8400e29b41d4a716446655440000", "status": "processing", "requested_amount": "25000.00", "net_amount": null, "iof": null, "service_fee": null, "interest_rate": 3.5, "cet": 4.25, "total_amount": "30000.00", "installments_value": "2291.67", "first_due_date": "2026-04-03", "number_of_installments": 12, "ccb_number": null, "disbursement_method": null, "signing_url": null, "created_at": "2026-03-04T11:00:00Z", "updated_at": "2026-03-04T11:00:00Z" }
Request
Returns the complete loan object with all lifecycle details. Important fields vary by status: signing_url is populated when awaiting_signatures, ccb_number when contract_generated, and net_amount after disbursement. Use together with loan.* webhooks to keep your system synchronized.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loans/{loan_id}
- Productionhttps://api.dinie.com.br/v3/loans/{loan_id}
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loans/{loan_id}
- curl
- Python
- Node.js
- Ruby
curl https://api.dinie.com.br/v3/loans/ln_550e8400e29b41d4a716446655440001 \
-H "Authorization: Bearer $DINIE_API_TOKEN"Loan details
| Enum Value | Description |
|---|---|
| processing | Loan request received, credit analysis in progress |
| contract_generated | CCB contract generated, ready for signatures |
| awaiting_signatures | Contract sent to customer for electronic signature |
| signed | Customer signed the contract, awaiting disbursement |
| disbursing | Funds are being transferred to the customer |
| active | Loan disbursed, installments are being collected |
| finished | All installments paid, loan completed |
| cancelled | Loan cancelled before disbursement |
| error | An error occurred during processing |
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
ClickSign widget URL. Present only during contract_generated and awaiting_signatures.
{ "id": "ln_550e8400e29b41d4a716446655440001", "credit_offer_id": "co_550e8400e29b41d4a716446655440000", "simulation_id": "sim_550e8400e29b41d4a716446655440001", "customer_id": "cust_550e8400e29b41d4a716446655440000", "status": "active", "requested_amount": "25000.00", "net_amount": "24250.00", "iof": "450.00", "service_fee": "300.00", "interest_rate": 3.5, "cet": 4.25, "total_amount": "30000.00", "installments_value": "2291.67", "first_due_date": "2026-04-03", "number_of_installments": 12, "ccb_number": "CCB-2026-001234", "disbursement_method": "pix", "signing_url": null, "created_at": "2026-03-04T11:00:00Z", "updated_at": "2026-03-05T14:00:00Z" }
Request
Lists the transactions (installments) of a loan. Each transaction represents an installment with due date (due_date), original amount, paid amount, and payment status (pending, paid, overdue). This is a read-only endpoint — payments are processed outside the API. Track payments in real time via webhook loan.payment_received.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loans/{loan_id}/transactions
- Productionhttps://api.dinie.com.br/v3/loans/{loan_id}/transactions
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loans/{loan_id}/transactions
- curl
- Python
- Node.js
- Ruby
curl "https://api.dinie.com.br/v3/loans/ln_550e8400e29b41d4a716446655440001/transactions?limit=25" \
-H "Authorization: Bearer $DINIE_API_TOKEN"List of transactions
| Enum Value | Description |
|---|---|
| pending | Payment not yet due or awaiting payment |
| paid | Full payment received |
| overdue | Payment overdue without full settlement |
| partially_paid | Partial payment received |
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
Decimal encoded as a string with exactly 2 decimal places (BRL).
{ "data": [ { "id": "tx_550e8400e29b41d4a716446655440000", "loan_id": "ln_550e8400e29b41d4a716446655440001", "type": "installment", "due_date": "2026-04-03", "status": "paid", "amount_due": "2500.00", "amount_paid": "2500.00", "amount_remaining": "0.00", "principal": "2083.33", "interest": "375.00", "fees": "41.67", "days_overdue": 0, "paid_at": "2026-04-03T10:00:00Z", "created_at": "2026-03-04T11:00:00Z", "updated_at": "2026-04-03T10:00:00Z" }, { "id": "tx_660e8400e29b41d4a716446655440001", "loan_id": "ln_550e8400e29b41d4a716446655440001", "type": "installment", "due_date": "2026-05-03", "status": "pending", "amount_due": "2500.00", "amount_paid": "0.00", "amount_remaining": "2500.00", "principal": "2083.33", "interest": "375.00", "fees": "41.67", "days_overdue": 0, "paid_at": null, "created_at": "2026-03-04T11:00:00Z", "updated_at": "2026-03-04T11:00:00Z" } ], "has_more": true }
Request
Fires when the loan is created via POST /loans from an accepted offer. Includes the loan, offer, and customer IDs, as well as the requested amount and number of installments. The loan starts with processing status. Use it to register the loan in your system.
Decimal encoded as a string with exactly 2 decimal places (BRL).
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.created
- Productionhttps://api.dinie.com.br/v3/loan.created
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.created
Request
Fires when the CCB (Cedula de Credito Bancario) contract is generated by Dinie. Includes the ClickSign signing_url for digital contract signing. Use it to present the signing link to the customer in your flow.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.contract_generated
- Productionhttps://api.dinie.com.br/v3/loan.contract_generated
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.contract_generated
Request
Fires when the CCB contract is sent to ClickSign and awaits the customer's signature. Includes the updated signing_url. Use it to resend the signing link to the customer or display a reminder if the signature has not yet been completed.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.awaiting_signatures
- Productionhttps://api.dinie.com.br/v3/loan.awaiting_signatures
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.awaiting_signatures
Request
Fires when the CCB contract is fully signed by all signatories on ClickSign. Includes the registered contract ccb_number. The next step is automatic disbursement. Use it to confirm to the customer that the contract has been successfully signed.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.signed
- Productionhttps://api.dinie.com.br/v3/loan.signed
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.signed
Request
Fires when Dinie initiates the fund transfer to the customer's account. Includes the disbursement method used (e.g., pix). The transfer may take a few minutes. Use it to inform the customer that the amount is being transferred.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.disbursing
- Productionhttps://api.dinie.com.br/v3/loan.disbursing
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.disbursing
Request
Fires when the disbursement is confirmed and the loan enters the repayment phase. Includes the requested amount (requested_amount) and the net amount received (net_amount). Use it to confirm to the customer that the funds have been credited and present the installment schedule.
Decimal encoded as a string with exactly 2 decimal places (BRL).
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.active
- Productionhttps://api.dinie.com.br/v3/loan.active
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.active
Request
Fires when an installment payment is recorded for the loan. Includes the amount paid, payment date, and corresponding installment number. Use it to update the outstanding balance in your system and notify the customer about the payment confirmation.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.payment_received
- Productionhttps://api.dinie.com.br/v3/loan.payment_received
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.payment_received
Request
Fires when all loan installments are paid off and the contract is closed. Includes the loan ID and finished status. Use it to mark the loan as completed in your system and check if new credit offers are available.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.finished
- Productionhttps://api.dinie.com.br/v3/loan.finished
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.finished
Request
Fires when the loan is cancelled before disbursement is completed. Includes the loan ID and cancelled status. Use it to update the status in your system and inform the customer. The original credit offer may still be available for a new request.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.cancelled
- Productionhttps://api.dinie.com.br/v3/loan.cancelled
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.cancelled
Request
Fires when an unrecoverable error occurs in the loan, such as a disbursement failure or contract generation error. Includes the error code and message in the error field. Use it to alert your team, log the issue, and inform the customer about the situation.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/loan.error
- Productionhttps://api.dinie.com.br/v3/loan.error
- Sandboxhttps://sandbox.api.dinie.com.br/v3/loan.error
Manage the endpoints that receive event notifications (we_). Dinie follows the Standard Webhooks specification.
Events for each resource are documented in the Customers, Credit Offers, and Loans sections. This section covers only endpoint management.