How this documentation is organized
This guide is structured into 15 parts:
- Fundamentals — what the API is and how to get started in 15 minutes.
- Domain concepts — what an electronic tax document (comprobante electrónico) is and how Hacienda CR (Costa Rica’s tax authority) works.
- Authentication and security — API keys, scopes, rotation.
- General conventions — URLs, headers, dates, pagination.
- Endpoint reference — every endpoint with full detail.
- Data model — every DTO, field by field.
- Business rules — VAT calculations, discounts, tax exemptions.
- Reliability — idempotency, rate limiting, retries.
- Webhooks — receiving status updates from Hacienda.
- Errors — complete error reference.
- Hacienda catalogs — all official codes.
- Cookbook — recipes for common cases.
- Complete examples by language — Node, Python, C#, PHP, Go, Ruby.
- Operations — testing, observability, migration.
- Appendices — glossary, FAQ, changelog, support.
How to read it:
- First read: read Part I and continue with the Quickstart; afterward, review the webhooks section.
- Ongoing integration: use the table of contents to find the specific endpoint or concept.
- Debugging: go directly to the error reference and Troubleshooting.