Kobana

Native Brazilian fiscal compliance — not a foreign adaptation.

NFS-e via NFe.io or own provider. 4 tax regimes covered. 8 tax types. RBT12 + Fator R for Simples Nacional. Automatic withholdings. Monthly calculation.

Feature
NFe list with status, number, amount and issuance date
4
tax regimes
8
tax types
city halls (via NFe.io)
RBT12
automatically calculated

Regimes supported in TaxationRegime

Simples Nacional
For companies up to R$ 4.8M/year. RBT12 calculated monthly (Rbt12Record). Fator R for services (Annex III or V).
  • Annexes III, IV, V
  • factorR = payroll / revenue
  • Estimated DAS per invoice
  • Monthly simples-rbt12 worker
Lucro Presumido
For companies up to R$ 78M/year. Presumed base on revenue (default 32%).
  • Configurable presumptionRate (default 32%)
  • Cumulative PIS + COFINS
  • Quarterly IRPJ + CSLL
Lucro Real
For companies above R$ 78M/year. Based on actual accounting profit. Non-cumulative PIS + COFINS.
  • Actual accounting profit
  • Non-cumulative PIS + COFINS
  • Full support
MEI
Individual micro-entrepreneur up to R$ 81K/year. Fixed monthly amount. Exempt from NFe between companies.
  • Fixed monthly amount
  • Exempt from NFe between companies
  • Full support

What the tax engine does

Automatic NFS-e
Post-payment issuance via NfeService. NFe.io or own Kobana provider. nfe-retry worker (30min) reprocesses failures.
  • nfeIssuancePolicy: disabled, on_finalization, on_full_payment, per_installment
  • NfeRequestTry tracks each attempt
  • PDF + XML available for download
Tax Engine (TaxRule)
Rules with scope (organization, company, service), priority and validity period. TaxRuleItem details each applied tax.
  • 8 types: ISS, PIS, COFINS, CSLL, IRPJ, IRRF, CSRF, INSS
  • isWithheld determines source withholding
  • isExempt + exemptionReason for exemptions
  • BaseType: service_value | service_value_minus_iss | presumed_base
Source Withholdings
Withholding recorded per invoice/NFe. WithholdingStatus: retained | compensated | partially_compensated. Monthly calculation for compensation.
  • IRRF (1.5% – 15%)
  • CSRF: PIS + COFINS + CSLL = 4.65%
  • INSS (11% on labor outsourcing)
  • ISS withheld (2% – 5% per municipality)
Simples Nacional (RBT12 + Fator R)
Rbt12Record accumulates gross revenue of the last 12 months. Fator R = payroll / revenue determines migration Annex V → III.
  • Automatic monthly update
  • Effective rate: (RBT12 × rate − deduction) / RBT12
  • Estimated DAS per invoice
  • Support for Annexes III, IV, V
Period Calculation (TaxPeriod)
Monthly or quarterly TaxPeriod per Company. Consolidates gross revenue, taxable, withholdings and tax due.
  • Worker tax-period (monthly, day 5) creates period
  • TaxComputation details per tax
  • Reports ready for accounting
ServiceItem (Tax Codes)
Each service with LC 116/2003 code, municipal code, NBS, CNAE. Automatically determines ISS rate.
  • DataLc116 (complete table)
  • DataNbs (Brazilian Service Nomenclature)
  • DataCst (Tax Situation Code)
  • SimplesAnnex per item
Digital A1 Certificate
Certificate model stores A1 certificate (PFX/PEM) encrypted. Validity tracked, expiration alert.
  • AES-256-GCM at rest
  • Password encrypted separately
  • Notification 30 days before expiry
NFS-e Providers
NFe.io (national coverage) or own Kobana provider for specific municipalities. NfseAdn + NfseBarueri natively implemented.
  • NfeProviderType: mock | nfe_io
  • Per-organization configuration (NfeConfig)
  • Isolated sandbox for testing

Configure fiscal profile per company via API

bash
curl -X POST https://api.billing.kobana.com.br/v1/companies/co_123/fiscal-profile \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "taxation_regime": "simple_national",
    "simples_annex": "annex_iii",
    "iss_municipality": "3550308",
    "iss_rate": 2.5,
    "factor_r": 0.32,
    "cpp_inside_das": true
  }'
response
{
  "id": "fp_xyz",
  "taxation_regime": "simple_national",
  "simples_annex": "annex_iii",
  "current_rbt12_cents": 48000000,
  "effective_rate": 6.0,
  "das_estimate_cents": 14400
}

Perguntas frequentes

Brazilian fiscal compliance without expensive adaptations