> For the complete documentation index, see [llms.txt](https://help.starkbank.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.starkbank.com/integracao-e-apis/webhooks-de-bloqueio-judicial-no-investimento-via-api.md).

# Webhooks de Bloqueio Judicial no Investimento via API

Entenda como funcionam os Webhooks relacionados ao bloqueio judicial no Investimento

O bloqueio judicial ocorre sempre que uma ordem judicial é expedida ao Stark Bank em relação a uma conta de cliente. Para identificar o bloqueio judicial no Investimento via API, você pode ativar a subscription `credit-block`. O retorno do webhook ocorrerá da seguinte forma:

### Webhook de Bloqueio no Investimento

O type será retornado como "created":

```
{
  "event": {
    "created": "2025-09-29T20:40:01.573927+00:00",
    "id": "5789476116758528",
    "log": {
      "block": {
        "amount": 130000,
        "created": "2025-09-29T20:26:45.534041+00:00",
        "id": "",
        "senderId": "organization-asset-block/billing/6235148253134848/2025-04-30",
        "source": "organization-asset-block/billing/6235148253134848/2025-04-30",
        "status": "active",
        "tags": [],
        "transactionId": null,
        "type": "contractual",
        "workspaceId": "organization-asset-block/billing/6235148253134848/2025-04-30"
      },
      "created": "2025-09-29T20:26:45.566164+00:00",
      "errors": [],
      "id": "5114942998970368",
      "type": "created"
    },
    "subscription": "credit-block",
    "workspaceId": "6235148253134848"
  }
}
```

### Webhook de Desbloqueio no Investimento

O type será retornado como "canceled":

```
{
  "event": {
    "created": "2025-09-29T20:42:07.147453+00:00",
    "id": "5647453963419648",
    "log": {
      "block": {
        "amount": 130000,
        "created": "2025-09-29T20:26:45.534041+00:00",
        "id": "",
        "senderId": "organization-asset-block/billing/6035148200134848/2025-04-30",
        "source": "organization-asset-block/billing/6035148200134848/2025-04-30",
        "status": "canceled",
        "tags": [],
        "transactionId": null,
        "type": "contractual",
        "workspaceId": "organization-asset-block/billing/6035148200134848/2025-04-30"
      },
      "created": "2025-09-29T20:42:06.244622+00:00",
      "errors": [],
      "id": "5768407001049728",
      "type": "canceled"
    },
    "subscription": "credit-block",
    "workspaceId": "6035148200134848"
  }
}
```

{% hint style="warning" %}
Sem a criação de uma subscription via API, não é possível receber esses eventos. Saiba como criar uma subscription: <https://starkbank.com/docs/api#webhook>
{% endhint %}

#### Nota Importante sobre o type do Bloqueio:

Embora o título do evento se refira a um "Bloqueio Judicial", o payload do webhook retornado pela API identificará este evento com o campo `"type": "contractual"`. Este é o valor esperado e correto. A subscrição `credit-block` é usada exclusivamente para eventos de bloqueio judicial, portanto, qualquer evento recebido nela com o tipo "contractual" deve ser tratado como uma ordem de bloqueio judicial.


---

# 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://help.starkbank.com/integracao-e-apis/webhooks-de-bloqueio-judicial-no-investimento-via-api.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.
