Skip to content

Dinie API (2026-03-01)

Embedded credit API for Dinie partners. Enables customer registration, credit offer management, loan origination, and event delivery via webhooks.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://dinie.nexaedge.dev/_mock/apis/openapi
Production
https://api.dinie.com.br/v3
Sandbox
https://sandbox.api.dinie.com.br/v3

Authentication

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.

Operations

Customers

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
Operations
Webhooks

Credit Offers

The CreditOffer resource (co_) represents a pre-approved credit offer for a customer. Offers are automatically generated by Dinie when a Customer reaches the active status. You are notified via the credit_offer.available webhook.

Operations
Webhooks

Flow: Offer → Simulation → Loan

CreditOffer (available) → Simulation → Loan
  1. Check the offers available for a customer
  2. Simulate different scenarios of amount and term
  3. Create the loan from the simulation chosen by the customer

Example: Simulate a Loan

# 1. List available offers
offers = client.customers.list_credit_offers("cust_abc123",
  status: "available"
)
offer = offers.data.first
# offer.id => "co_550e8400..."
# offer.approved_amount => "50000.00"
# offer.min_amount => "5000.00"
# offer.interest_rate => 2.5 (% per month)
# offer.valid_until => "2026-04-01T00:00:00Z"

# 2. Simulate with different amounts
sim_25k = client.credit_offers.simulate(offer.id,
  requested_amount: "25000.00",
  installment_count: 6
)

sim_40k = client.credit_offers.simulate(offer.id,
  requested_amount: "40000.00",
  installment_count: 12
)

# 3. Present options to the customer
puts sim_25k.installments_value  # "4550.00" per installment
puts sim_25k.cet_percentage      # 35.2% per year
puts sim_40k.installments_value  # "3800.00" per installment
puts sim_40k.cet_percentage      # 32.8% per year

Understanding the Simulation (sim_)

The simulation calculates all loan costs before contracting:

FieldDescription
requested_amountAmount requested by the customer
amountNet amount the customer receives
interest_amountTotal interest
fees_amountTotal fees
iof_amountCalculated IOF
total_loan_amountTotal amount (principal + interest + fees + IOF)
installments_valueFixed amount of each installment
cet_percentageAnnualized Total Effective Cost
first_due_dateDue date of the first installment

Webhooks

EventWhen it fires
credit_offer.availableNew offer generated for the customer
credit_offer.expiredOffer expired (valid_until exceeded)

List credit offers for a customer

Request

Lists the available credit offers for a specific customer. Filterable by status (available, accepted, expired). Use this endpoint after receiving the customer.active webhook to check for pre-approved offers. Pagination uses cursor with starting_after + limit.

Security
bearerAuth
Path
customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
Example: cust_550e8400e29b41d4a716446655440000
Query
statusstring
Enum"available""accepted""expired"
starting_afterstring

Prefixed ID of the last item from the previous page.

limitinteger[ 1 .. 100 ]

Number of items to return. Min: 1, Max: 100.

Default 25
curl "https://api.dinie.com.br/v3/customers/cust_550e8400e29b41d4a716446655440000/credit-offers?status=available" \
  -H "Authorization: Bearer $DINIE_API_TOKEN"

Responses

List of credit offers

Bodyapplication/json
dataArray of objects(CreditOffer)required
data[].​idstring(CreditOfferId)^co_[0-9a-f]{32}$required
data[].​customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
data[].​statusstringrequired
Enum ValueDescription
available

Offer is active and can be accepted by the customer

accepted

Customer accepted the offer and a loan was created

expired

Offer passed the valid_until date without being accepted

data[].​approved_amountstring(Money)^\d+\.\d{2}$required

Decimal encoded as a string with exactly 2 decimal places (BRL).

data[].​min_amountstring^\d+\.\d{2}$required

Minimum withdrawal amount

Example: "1000.00"
data[].​interest_ratenumberrequired

Monthly interest rate percentage

Example: 3.5
data[].​installmentsintegerrequired

Number of installments. When the product supports a range, this field is replaced by min_installments/max_installments

Example: 12
data[].​due_date_rulestring or null

Due date rule for installments. Pending Core implementation.

data[].​valid_untilstring(date-time)required
Example: "2026-04-01T23:59:59Z"
data[].​created_atstring(date-time)required
data[].​updated_atstring(date-time)required
has_morebooleanrequired
Response
application/json
{ "data": [ { "id": "co_550e8400e29b41d4a716446655440000", "customer_id": "cust_550e8400e29b41d4a716446655440000", "status": "available", "approved_amount": "50000.00", "min_amount": "1000.00", "interest_rate": 3.5, "installments": 12, "due_date_rule": null, "valid_until": "2026-04-01T23:59:59Z", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" } ], "has_more": false }

List credit offers

Request

Lists credit offers for all customers of the authenticated partner. Supports filters by customer_id and status to locate specific offers. Useful for dashboards and reports that need a consolidated view. For offers of a specific customer, prefer GET /customers/{customer_id}/credit-offers.

Security
bearerAuth
Query
customer_idstring(CustomerId)^cust_[0-9a-f]{32}$

Filter by customer

Example: customer_id=cust_550e8400e29b41d4a716446655440000
statusstring
Enum"available""accepted""expired"
starting_afterstring

Prefixed ID of the last item from the previous page.

limitinteger[ 1 .. 100 ]

Number of items to return. Min: 1, Max: 100.

Default 25
# List all available credit offers
curl "https://api.dinie.com.br/v3/credit-offers?status=available&limit=10" \
  -H "Authorization: Bearer $DINIE_API_TOKEN"

Responses

List of credit offers

Bodyapplication/json
dataArray of objects(CreditOffer)required
data[].​idstring(CreditOfferId)^co_[0-9a-f]{32}$required
data[].​customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
data[].​statusstringrequired
Enum ValueDescription
available

Offer is active and can be accepted by the customer

accepted

Customer accepted the offer and a loan was created

expired

Offer passed the valid_until date without being accepted

data[].​approved_amountstring(Money)^\d+\.\d{2}$required

Decimal encoded as a string with exactly 2 decimal places (BRL).

data[].​min_amountstring^\d+\.\d{2}$required

Minimum withdrawal amount

Example: "1000.00"
data[].​interest_ratenumberrequired

Monthly interest rate percentage

Example: 3.5
data[].​installmentsintegerrequired

Number of installments. When the product supports a range, this field is replaced by min_installments/max_installments

Example: 12
data[].​due_date_rulestring or null

Due date rule for installments. Pending Core implementation.

data[].​valid_untilstring(date-time)required
Example: "2026-04-01T23:59:59Z"
data[].​created_atstring(date-time)required
data[].​updated_atstring(date-time)required
has_morebooleanrequired
Response
application/json
{ "data": [ { "id": "co_550e8400e29b41d4a716446655440000", "customer_id": "cust_550e8400e29b41d4a716446655440000", "status": "available", "approved_amount": "50000.00", "min_amount": "1000.00", "interest_rate": 3.5, "installments": 12, "due_date_rule": null, "valid_until": "2026-04-01T23:59:59Z", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" } ], "has_more": false }

Retrieve a credit offer

Request

Returns the complete credit offer object, including approved amount (approved_amount), minimum amount, interest rate (interest_rate), maximum number of installments, and expiration date (valid_until). Query the offer before creating a simulation to present the limits to the customer.

Security
bearerAuth
Path
credit_offer_idstring(CreditOfferId)^co_[0-9a-f]{32}$required
Example: co_550e8400e29b41d4a716446655440000
curl https://api.dinie.com.br/v3/credit-offers/co_550e8400e29b41d4a716446655440000 \
  -H "Authorization: Bearer $DINIE_API_TOKEN"

Responses

Credit offer details

Bodyapplication/json
idstring(CreditOfferId)^co_[0-9a-f]{32}$required
customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
statusstringrequired
Enum ValueDescription
available

Offer is active and can be accepted by the customer

accepted

Customer accepted the offer and a loan was created

expired

Offer passed the valid_until date without being accepted

approved_amountstring(Money)^\d+\.\d{2}$required

Decimal encoded as a string with exactly 2 decimal places (BRL).

min_amountstring^\d+\.\d{2}$required

Minimum withdrawal amount

Example: "1000.00"
interest_ratenumberrequired

Monthly interest rate percentage

Example: 3.5
installmentsintegerrequired

Number of installments. When the product supports a range, this field is replaced by min_installments/max_installments

Example: 12
due_date_rulestring or null

Due date rule for installments. Pending Core implementation.

valid_untilstring(date-time)required
Example: "2026-04-01T23:59:59Z"
created_atstring(date-time)required
updated_atstring(date-time)required
Response
application/json
{ "id": "co_550e8400e29b41d4a716446655440000", "customer_id": "cust_550e8400e29b41d4a716446655440000", "status": "available", "approved_amount": "50000.00", "min_amount": "1000.00", "interest_rate": 3.5, "installments": 12, "due_date_rule": null, "valid_until": "2026-04-01T23:59:59Z", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" }

Credit offer availableWebhook

Request

Fires when Dinie generates a new pre-approved credit offer for the customer. Includes approved amount, interest rate, installments, and offer expiration date. Use it to notify the customer about credit availability and start the simulation flow via POST /credit-offers/{id}/simulations.

Security
bearerAuth
Bodyapplication/jsonrequired
typestringrequired

Event type identifier

Enum"credit_offer.available""credit_offer.expired"
timestampstring(date-time)required

When the event occurred

dataobjectrequired
data.​idstring(CreditOfferId)^co_[0-9a-f]{32}$required
data.​customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
data.​statusstringrequired
Enum"available""expired"
data.​approved_amountstring(Money)^\d+\.\d{2}$required

Decimal encoded as a string with exactly 2 decimal places (BRL).

data.​min_amountstring^\d+\.\d{2}$required

Minimum withdrawal amount

data.​interest_ratenumberrequired

Monthly interest rate percentage

data.​installmentsintegerrequired

Number of installments

data.​due_date_rulestring or null

Due date rule for installments. Pending Core implementation.

data.​valid_untilstring(date-time)required

Responses

Event received

Credit offer expiredWebhook

Request

Fires when a credit offer expires after exceeding its expiration date (valid_until). Includes the full offer data with expired status. Use it to remove the offer from the customer interface. New offers may be generated in the future via credit_offer.available.

Security
bearerAuth
Bodyapplication/jsonrequired
typestringrequired

Event type identifier

Enum"credit_offer.available""credit_offer.expired"
timestampstring(date-time)required

When the event occurred

dataobjectrequired
data.​idstring(CreditOfferId)^co_[0-9a-f]{32}$required
data.​customer_idstring(CustomerId)^cust_[0-9a-f]{32}$required
data.​statusstringrequired
Enum"available""expired"
data.​approved_amountstring(Money)^\d+\.\d{2}$required

Decimal encoded as a string with exactly 2 decimal places (BRL).

data.​min_amountstring^\d+\.\d{2}$required

Minimum withdrawal amount

data.​interest_ratenumberrequired

Monthly interest rate percentage

data.​installmentsintegerrequired

Number of installments

data.​due_date_rulestring or null

Due date rule for installments. Pending Core implementation.

data.​valid_untilstring(date-time)required

Responses

Event received

Loans

The Loan resource (ln_) represents a loan originated from a CreditOffer and its Simulation. After creation, the loan goes through several automated steps until disbursement.

Operations
Webhooks

Webhooks

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.

Operations