# Darf

## Check DARF

> Check a DARF

```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_darf_request_params":{"description":"Check DARF request params","properties":{"accumulated_revenue_amount":{"description":"Accumulated revenue amount","type":"integer"},"amount":{"description":"Amount","type":"integer"},"assessment_date":{"description":"Assessment date","type":"string"},"authentication_date":{"description":"Authentication date","type":"string"},"due_date":{"description":"Due date","type":"string"},"federal_revenue_id":{"description":"Federal revenue ID","type":"string"},"fine_amount":{"description":"Fine amount","type":"integer"},"interest_amount":{"description":"Interest amount","type":"integer"},"name":{"description":"Name","type":"string"},"percentage":{"description":"Percentage","type":"integer"},"phone":{"description":"Phone number","type":"string"},"reference_number":{"description":"Reference number","nullable":true,"type":"integer"},"tax_number":{"description":"Tax number","type":"string"}},"required":["tax_number","name","federal_revenue_id","amount","fine_amount","interest_amount","percentage","assessment_date","due_date","authentication_date","phone","accumulated_revenue_amount"],"title":"Check_darf_request_params","type":"object"},"Create_Check_Darf_Response":{"description":"Response schema for a single DARF generation","properties":{"data":{"properties":{"accumulated_revenue_amount":{"description":"Accumulated revenue amount","type":"integer"},"amount":{"properties":{"amount":{"description":"Amount in the specified currency in cents","type":"number"},"currency":{"description":"Currency code","type":"string"}},"type":"object"},"assessment_date":{"description":"Assessment date","type":"string"},"authentication_date":{"description":"Authentication date","type":"string"},"company_id":{"$ref":"#/components/schemas/UUID"},"due_date":{"description":"Due date","type":"string"},"federal_revenue_id":{"description":"Federal revenue ID","type":"string"},"fine_amount":{"description":"Fine amount","type":"integer"},"id":{"$ref":"#/components/schemas/UUID"},"inserted_at":{"description":"Inserted at","type":"string"},"interest_amount":{"description":"Interest amount","type":"integer"},"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"},"payment_end_to_end_id":{"description":"Payment end to end ID","type":"string"},"percentage":{"description":"Percentage","type":"integer"},"phone":{"description":"Phone number","type":"string"},"reference_number":{"description":"Reference number","type":"integer"},"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_Darf_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/darf/check":{"post":{"callbacks":{},"description":"Check a DARF","operationId":"TrioFoundationWeb.Banking.Cashout.TaxManual.TaxManualController.check","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check_darf_request_params"}}},"description":"Check DARF payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create_Check_Darf_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 DARF","tags":["darf"]}}}}
```

## Pay DARF

> Generate a pay DARF

```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_Darf_V1":{"description":"Body params to generate a DARF V1 payment","properties":{"amount":{"description":"Amount in cents","type":"integer"},"check_id":{"$ref":"#/components/schemas/UUID"},"description":{"description":"Description for the utility","type":"string"},"external_id":{"description":"External ID for reference","type":"string"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"}},"required":["check_id","virtual_account_id"],"title":"Generate_Darf_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/darf/pay":{"post":{"callbacks":{},"description":"Generate a pay DARF","operationId":"TrioFoundationWeb.Banking.Cashout.TaxManual.TaxManualController.generate_v1","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_Darf_V1"}}},"description":"DARF 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 DARF","tags":["darf"]}}}}
```

## Pay DARF v2

> Generate a pay DARF 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_Darf_create_params":{"description":"Body params to generate a DARF V2","properties":{"accumulated_revenue_amount":{"description":"Accumulated revenue amount","type":"integer"},"amount":{"description":"Amount","type":"integer"},"assessment_date":{"description":"Assessment date","type":"string"},"authentication_date":{"description":"Authentication date","type":"string"},"description":{"description":"Description of the DARF","nullable":true,"type":"string"},"due_date":{"description":"Due date","type":"string"},"external_id":{"description":"External ID of the DARF for reference","nullable":true,"type":"string"},"federal_revenue_id":{"description":"Federal revenue ID","type":"string"},"fine_amount":{"description":"Fine amount","type":"integer"},"interest_amount":{"description":"Interest amount","type":"integer"},"name":{"description":"Name","type":"string"},"percentage":{"description":"Percentage","type":"integer"},"phone":{"description":"Phone number","type":"string"},"reference_number":{"description":"Reference number","nullable":true,"type":"integer"},"tax_number":{"description":"Tax number","type":"string"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"}},"required":["virtual_account_id","tax_number","name","federal_revenue_id","amount","fine_amount","interest_amount","percentage","assessment_date","due_date","authentication_date","phone","accumulated_revenue_amount"],"title":"Generate_V2_Darf_create_params","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Generate_V2_Darf_Response":{"description":"Response schema for a single DARF V2 generation","properties":{"data":{"properties":{"payment_document_id":{"$ref":"#/components/schemas/UUID"}},"type":"object"}},"title":"Generate_V2_Darf_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/darf/pay/v2":{"post":{"callbacks":{},"description":"Generate a pay DARF v2","operationId":"TrioFoundationWeb.Banking.Cashout.TaxManual.TaxManualController.generate_v2","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Darf_create_params"}}},"description":"DARF V2 payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generate_V2_Darf_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 DARF v2","tags":["darf"]}}}}
```
