# Boleto

## Check boleto

> Check a boleto barcode or line code

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"Check_boleto_request_params":{"description":"Check boleto request params","properties":{"code":{"description":"Boleto barcode or digitable_line","type":"string"}},"required":["code"],"title":"Check_boleto_request_params","type":"object"},"Create_Check_Boleto_Response":{"description":"Response schema for a single boleto generation","properties":{"data":{"properties":{"amount":{"properties":{"amount":{"description":"Amount in the specified currency in cents","type":"number"},"currency":{"description":"Currency code","type":"string"}},"type":"object"},"barcode":{"description":"Boleto barcode","type":"string"},"company_id":{"$ref":"#/components/schemas/UUID"},"digitable_line":{"description":"Boleto digitable line","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"inserted_at":{"description":"Inserted at","type":"string"},"name":{"description":"Name of the boleto beneficiary","type":"string"},"org_id":{"$ref":"#/components/schemas/UUID"},"payer_name":{"description":"Payer name","type":"string"},"payer_tax_number":{"description":"Payer tax number","type":"string"},"tax_number":{"description":"Tax number of the boleto beneficiary","type":"string"},"timestamp":{"description":"Timestamp of the check","type":"string"},"type":{"description":"Boleto type","type":"string"},"updated_at":{"description":"Updated at","type":"string"}},"type":"object"}},"title":"Create_Check_Boleto_Response","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"}}},"paths":{"/banking/cashout/boleto/check":{"post":{"callbacks":{},"description":"Check a boleto barcode or line code","operationId":"TrioFoundationWeb.Banking.Cashout.Boleto.BoletoController.check","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check_boleto_request_params"}}},"description":"Check boleto payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create_Check_Boleto_Response"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Check boleto","tags":["boleto"]}}}}
```

## Pay boleto

> Generate a pay boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"Generate_Boleto_V1":{"description":"Body params to generate a boleto V1 payment","properties":{"amount":{"description":"Amount of the boleto in cents","type":"integer"},"check_id":{"$ref":"#/components/schemas/UUID"},"description":{"description":"Description for the boleto","type":"string"},"external_id":{"description":"External ID for reference","type":"string"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"}},"required":["amount","check_id","virtual_account_id"],"title":"Generate_Boleto_V1","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Generate_V1_Boleto_Response":{"description":"Response schema for a single boleto V1 generation","properties":{"data":{"properties":{"payment_document_id":{"$ref":"#/components/schemas/UUID"}},"type":"object"}},"title":"Generate_V1_Boleto_Response","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"}}},"paths":{"/banking/cashout/boleto/pay":{"post":{"callbacks":{},"description":"Generate a pay boleto","operationId":"TrioFoundationWeb.Banking.Cashout.Boleto.BoletoController.generate_v1","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_Boleto_V1"}}},"description":"Boleto V1 payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V1_Boleto_Response"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Pay boleto","tags":["boleto"]}}}}
```

## Pay boleto v2

> Generate a pay boleto v2

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"Generate_V2_Boleto_create_params":{"description":"Body params to generate a boleto V2","properties":{"amount":{"description":"Amount of the boleto in cents","type":"integer"},"code":{"description":"Barcode or digitable_line of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto for reference","type":"string"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"}},"required":["amount","virtual_account_id","code"],"title":"Generate_V2_Boleto_create_params","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Generate_V2_Boleto_Response":{"description":"Response schema for a single boleto V2 generation","properties":{"data":{"properties":{"payment_document_id":{"$ref":"#/components/schemas/UUID"}},"type":"object"}},"title":"Generate_V2_Boleto_Response","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"}}},"paths":{"/banking/cashout/boleto/pay/v2":{"post":{"callbacks":{},"description":"Generate a pay boleto v2","operationId":"TrioFoundationWeb.Banking.Cashout.Boleto.BoletoController.generate_v2","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Boleto_create_params"}}},"description":"Boleto V2 payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Boleto_Response"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Pay boleto v2","tags":["boleto"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.trio.com.br/api_reference/banking-api/payment/boleto.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
