check_ritenuta_acconto
Calculate ritenuta d'acconto withholding tax for professional invoices. Specify taxable base, tax type code (RT01-RT06), and income category for valid results.
Instructions
Compute ritenuta d'acconto (withholding tax) for professional invoices.
Use this when issuing professional service invoices (TD01 or TD06) that are subject to withholding tax — typically for self-employed professionals, agents, or freelancers. Also mark the relevant line items with ritenuta='SI' in add_linea_dettaglio(), and pass the returned 'DatiRitenuta' dict to generate_fattura_xml() as dati_ritenuta.
tipo_ritenuta determines the rate: RT01/RT02 = 20% (natural person, professional/occasional), RT03/RT04 = 23.20% (agent commissions), RT05 = 4% (condominium), RT06 = 30% (employment). causale_pagamento: income category code for Mod. 770 (e.g. 'A' professional fees, 'O' occasional).
Validates: tipo_ritenuta must be in RT01–RT06. imponibile is typically the net invoice total.
On success returns {'DatiRitenuta': {...}, 'importo_ritenuta': str, 'aliquota_applicata': str, 'imponibile_ritenuta': str, 'description': str, 'legal_ref': str}. On failure returns {'error': ''}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imponibile | Yes | Taxable base amount subject to withholding tax (imponibile della ritenuta). Usually equals the net invoice total for professional services. | |
| tipo_ritenuta | Yes | Withholding tax type code: RT01 (natural person, occasional work, 20%), RT02 (natural person, professional, 20%), RT03 (legal entity, agent commissions, 23.20%), RT04 (natural person, agent commissions, 23.20%), RT05 (condominium, 4%), RT06 (employment income, 30%). | |
| causale_pagamento | Yes | Income category code for withholding tax (CausalePagamento). Common values: A (professional fees), B (agent commissions), L (employment), O (occasional work), Q (commissions). See Agenzia delle Entrate Mod. 770 for the complete list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||