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

# SDK para trabalhar com a API

**O SDK** é um conjunto de funções prontas para chamar a API Trybit: trata da criação dos pedidos, da passagem da chave de autorização e da análise das respostas. A utilização do SDK é opcional — pode integrar diretamente através da API usando os exemplos de código na secção Referência da API V2.

### Onde descarregar o SDK

O arquivo do SDK foi criado para a API V2.

{% file src="/files/0274ec2b2ad42d8aa68243df4569ebd3f8804718" %}

### Como conectar o SDK

1. **Descarregue** o arquivo SDK.zip nesta página.
2. **Adicione** os ficheiros do SDK ao seu projeto e inclua-os no seu código.
3. **Especifique** a API KEY, o SHOP ID e a SECRET KEY — de preferência através de variáveis de ambiente. → [Obter chaves da API](/pt/start/get-api-keys.md)
4. **Verifique se funciona:** crie uma fatura de teste e processe o POSTBACK. → [Testando a Integração](/pt/start/test-integration.md)

### Como integrar sem o SDK

Todos os métodos da API V2 são descritos com exemplos de pedidos em cURL, Python, JavaScript e PHP. Comece por estas páginas:

* [Autorização do pedido](/pt/referencia-da-api-v2/authorization.md) — o formato do cabeçalho Authorization.
* [Criar fatura](/pt/referencia-da-api-v2/create-invoice.md) — parâmetros do pedido e da resposta.
* [POSTBACK automático](/pt/referencia-da-api-v2/postback.md) — parâmetros de notificação e exemplos de tratamento.

### Onde reportar um erro do SDK

Se o SDK não funcionar corretamente ou se precisar de um SDK para outra linguagem, contacte o nosso chat de suporte no site e no painel, ou fale connosco no Telegram. Os contactos de suporte estão listados no nosso [site](https://trybit.com/support).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trybit.com/pt/start/sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
