# Tax

## Check tax

> Check a tax 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_tax_request_params":{"description":"Check tax request params","properties":{"code":{"description":"Tax barcode or digitable_line","type":"string"}},"required":["code"],"title":"Check_tax_request_params","type":"object"},"Create_Check_Tax_Response":{"description":"Response schema for a single tax 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_Tax_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/tax/check":{"post":{"callbacks":{},"description":"Check a tax barcode or line code","operationId":"TrioFoundationWeb.Banking.Cashout.Tax.TaxController.check","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check_tax_request_params"}}},"description":"Check tax payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create_Check_Tax_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 tax","tags":["tax"]}}}}
```

## Pay tax

> Generate a pay tax

```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_Tax_V1":{"description":"Body params to generate a tax V1 payment","properties":{"amount":{"description":"Amount of the tax in cents","type":"integer"},"check_id":{"$ref":"#/components/schemas/UUID"},"description":{"description":"Description for the tax","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_Tax_V1","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Generate_V1_Tax_Response":{"description":"Response schema for a single tax V1 generation","properties":{"data":{"properties":{"payment_document_id":{"$ref":"#/components/schemas/UUID"}},"type":"object"}},"title":"Generate_V1_Tax_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/tax/pay":{"post":{"callbacks":{},"description":"Generate a pay tax","operationId":"TrioFoundationWeb.Banking.Cashout.Tax.TaxController.generate_v1","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_Tax_V1"}}},"description":"Tax payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V1_Tax_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 tax","tags":["tax"]}}}}
```

## Pay tax v2

> Generate a pay tax 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_Tax_create_params":{"description":"Body params to generate a tax V2","properties":{"amount":{"description":"Amount of the tax in cents","type":"integer"},"code":{"description":"Barcode or digitable_line of the tax","type":"string"},"description":{"description":"Description of the tax","type":"string"},"external_id":{"description":"External ID of the tax for reference","type":"string"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"}},"required":["amount","virtual_account_id","code"],"title":"Generate_V2_Tax_create_params","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Generate_V2_Tax_Response":{"description":"Response schema for a single tax V2 generation","properties":{"data":{"properties":{"payment_document_id":{"$ref":"#/components/schemas/UUID"}},"type":"object"}},"title":"Generate_V2_Tax_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/tax/pay/v2":{"post":{"callbacks":{},"description":"Generate a pay tax v2","operationId":"TrioFoundationWeb.Banking.Cashout.Tax.TaxController.generate_v2","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Tax_create_params"}}},"description":"Tax V2 payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Tax_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 tax v2","tags":["tax"]}}}}
```


---

# 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/tax.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.
