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
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.
endpoint = client.webhooks.create_endpoint(
url: "https://partner.example.com/webhooks/dinie",
events: ["customer.active", "credit_offer.available", "loan.*"],
description: "Production webhook"
)
# endpoint.secret => "whsec_xxxx..."
# ⚠️ Store the secret — shown only at creation!Use * for all events, or resource.* for all events of a resource.
| Pattern | Included Events |
|---|---|
customer.* | created, under_review, kyc_updated, active |
credit_offer.* | available, expired |
loan.* | created, contract_generated, awaiting_signatures, signed, disbursing, active, payment_received, finished, cancelled, error |
* | All events |
Rotate the secret periodically. The previous secret remains valid for the specified time, allowing a seamless transition.
result = client.webhooks.rotate_secret("we_abc123",
expire_current_in: 3600 # previous valid for 1 more hour
)
# result.secret => "whsec_yyyy..." (new secret)Request
Creates a new webhook endpoint to receive Dinie events. The HMAC signing secret (secret) is returned only in this response — store it securely to validate the signatures of received events. Use event patterns like loan.*, customer.*, or * to subscribe to entire categories. Each endpoint can subscribe to multiple event patterns.
HTTPS URL to receive webhook deliveries
Event types to subscribe to. Supports wildcards * (e.g., loan.*). Empty or omitted = all events.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints
- curl
- Python
- Node.js
- Ruby
curl -X POST https://api.dinie.com.br/v3/webhooks/endpoints \
-H "Authorization: Bearer $DINIE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://parceiro.example.com/webhooks/dinie",
"events": ["customer.active", "credit_offer.available", "loan.*"],
"description": "Webhook de produção"
}'{ "id": "we_550e8400e29b41d4a716446655440000", "url": "https://parceiro.example.com/webhooks/dinie", "events": [ "customer.active", "credit_offer.available", "loan.*" ], "description": "Webhook de produção", "status": "active", "secret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" }
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints
- curl
- Python
- Node.js
- Ruby
curl https://api.dinie.com.br/v3/webhooks/endpoints \
-H "Authorization: Bearer $DINIE_API_TOKEN"{ "data": [ { "id": "we_550e8400e29b41d4a716446655440000", "url": "https://parceiro.example.com/webhooks/dinie", "events": [ … ], "description": "Webhook de produção", "status": "active", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" } ], "has_more": false }
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints/{webhook_endpoint_id}
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- curl
- Python
- Node.js
- Ruby
curl https://api.dinie.com.br/v3/webhooks/endpoints/we_550e8400e29b41d4a716446655440000 \
-H "Authorization: Bearer $DINIE_API_TOKEN"{ "id": "we_550e8400e29b41d4a716446655440000", "url": "https://parceiro.example.com/webhooks/dinie", "events": [ "customer.active", "credit_offer.available", "loan.*" ], "description": "Webhook de produção", "status": "active", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-04T10:00:00Z" }
Request
Updates the configuration of a webhook endpoint. Allows changing the destination URL, the list of subscribed events, the description, and the status (active/disabled). Use disabled to temporarily pause deliveries without deleting the endpoint. Only the submitted fields are updated.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints/{webhook_endpoint_id}
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- curl
- Python
- Node.js
- Ruby
curl -X PATCH https://api.dinie.com.br/v3/webhooks/endpoints/we_550e8400e29b41d4a716446655440000 \
-H "Authorization: Bearer $DINIE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"events": ["customer.*", "loan.*"],
"status": "active"
}'{ "id": "we_550e8400e29b41d4a716446655440000", "url": "https://parceiro.example.com/webhooks/dinie", "events": [ "customer.*", "loan.*" ], "description": "Webhook de produção", "status": "active", "created_at": "2026-03-04T10:00:00Z", "updated_at": "2026-03-05T09:00:00Z" }
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints/{webhook_endpoint_id}
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}
- curl
- Python
- Node.js
- Ruby
curl -X DELETE https://api.dinie.com.br/v3/webhooks/endpoints/we_550e8400e29b41d4a716446655440000 \
-H "Authorization: Bearer $DINIE_API_TOKEN"Request
Rotates the HMAC signing secret of the endpoint. A new secret is generated and returned in the response. The previous secret remains valid during the grace period defined by expire_current_in (default: 3600 seconds). During this period, deliveries include signatures with both secrets, allowing a gradual migration in your system without losing events.
- Mock serverhttps://dinie.nexaedge.dev/_mock/apis/openapi/webhooks/endpoints/{webhook_endpoint_id}/secret/rotate
- Productionhttps://api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}/secret/rotate
- Sandboxhttps://sandbox.api.dinie.com.br/v3/webhooks/endpoints/{webhook_endpoint_id}/secret/rotate
- curl
- Python
- Node.js
- Ruby
curl -X POST https://api.dinie.com.br/v3/webhooks/endpoints/we_550e8400e29b41d4a716446655440000/secret/rotate \
-H "Authorization: Bearer $DINIE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expire_current_in": 3600}'{ "id": "we_550e8400e29b41d4a716446655440000", "secret": "whsec_novo1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8", "previous_secret_expires_at": "2026-03-04T11:00:00Z" }