> For the complete documentation index, see [llms.txt](https://docs.bullcredtech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullcredtech.com/sdks/sdks-en/sdks.md).

# SDKs

## <mark style="color:$primary;">**What is the Bull SDK?**</mark>

The Bull SDK is a Flutter library that delivers the full flow for contracting payroll loans in native screens, without you having to implement business rules, manage authentication, or build the UI from scratch.

You provide the user data, the access token, and the bank details. The SDK takes over from there until contract confirmation and returns control to your app via callbacks.

### <mark style="color:$primary;">Benefits of using the SDK</mark>

* **Integration in days, not weeks** — complete contracting flow ready, from calculation to signed contract
* **Ready-made UI that matches your brand** — Flutter screens with Material 3 configurable via `IColorPalette` or `ThemeData`
* **Zero business rules to implement** — all the credit logic is already built into the SDK
* **Authentication via `accessToken`** — you provide an access token at initialization and the SDK uses it throughout the flow
* **Full control over errors** — callbacks `onExit` and `onError` for all exit cases

### <mark style="color:$primary;">When to use</mark>

| Use the SDK when you want to:                                   | Use the REST API directly when you need to:                    |
| --------------------------------------------------------------- | -------------------------------------------------------------- |
| Embed the full contracting flow in your app with minimal effort | Integration with a non-Flutter app (React Native, native, web) |
| Keep your brand identity without building screens from scratch  | Custom flow that does not follow the SDK's standard sequence   |

### <mark style="color:$primary;">What the SDK delivers</mark>

* **Credit simulation** with real-time adjustable amounts and installments
* **Offer selection** with or without insurance, according to customer eligibility
* **Complete financial summary:** rates, CET, IOF, and all installments
* **Digital signature** via secure deep link, with automatic return to your app
* **Theming with Material 3** via `IColorPalette` or `ThemeData` (keeps your brand identity)
* **Authentication via `accessToken`:** you provide the access token at initialization and the SDK uses it in all requests
* **Error handling** via callbacks `onExit` and `onError` for all exit cases

### <mark style="color:$primary;">Specifications</mark>

| Item:           | Description:                   |
| --------------- | ------------------------------ |
| Platform        | Flutter (iOS + Android)        |
| Current version | `cliente_autoservico-v0.2.0`   |
| Minimum Flutter | `3.24.0`                       |
| Minimum iOS     | `13.0`                         |
| Minimum Android | `API 21`                       |
| Distribution    | Git dependency (GitHub)        |
| Authentication  | `accessToken` provided by Bull |

### <mark style="color:$primary;">Where to start</mark>

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-flag">:flag:</i></h4></td><td><strong>Quickstart</strong></td><td>installation, accessToken, and first flow</td><td><a href="/pages/817b002d9ba4152a74fd8e2920b528d7b681db5a">/pages/817b002d9ba4152a74fd8e2920b528d7b681db5a</a></td></tr><tr><td><h4><i class="fa-square-n">:square-n:</i></h4></td><td><strong>Native configuration</strong></td><td>deep link on iOS and Android</td><td><a href="/pages/6f6d928d61ae94c2d21aadd589b6689456c136f4">/pages/6f6d928d61ae94c2d21aadd589b6689456c136f4</a></td></tr><tr><td><h4><i class="fa-palette">:palette:</i></h4></td><td><strong>Customize</strong></td><td>your brand identity</td><td><a href="/pages/db65a86e832a2faceee0375b2315871fe0301afa">/pages/db65a86e832a2faceee0375b2315871fe0301afa</a></td></tr><tr><td><h4><i class="fa-rectangle-api">:rectangle-api:</i></h4></td><td><strong>API reference</strong></td><td>parameters, types, and enums</td><td><a href="/pages/9b6edfca5516f88593c17233e5a20fc5fc1dd828">/pages/9b6edfca5516f88593c17233e5a20fc5fc1dd828</a></td></tr><tr><td><h4><i class="fa-bug">:bug:</i></h4></td><td><strong>Troubleshooting</strong></td><td>common errors and fixes</td><td><a href="/pages/2677738ec88316621f22d2e3b876f38a281df835">/pages/2677738ec88316621f22d2e3b876f38a281df835</a></td></tr></tbody></table>

### <mark style="color:$primary;">How it works</mark>

The SDK is presented as a modal screen inside your app. You provide the user data, the access token, and the bank details. The SDK takes over from there until contract confirmation.

{% code expandable="true" %}

```
Your app → ClienteAutoservicoApp(IntegrationArguments)
           ↓
       [ Welcome → Analysis → Simulation → Offer →
         Summary → Signature → Success ]
           ↓
     onExit / onError → Your app regains control
```

{% endcode %}

{% hint style="warning" %}
**Test environment:** during development, always use `ModuleFlavor.staging` with the `accessToken` and the test CPFs provided by Bull. Only switch to `production` before publishing the app to the stores.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bullcredtech.com/sdks/sdks-en/sdks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
