Guide
The Hacienda key
Nine screens in TRIBU-CR. It’s the one part of e-invoicing nobody can do for you — not us, not your accountant. About twenty minutes, and you do it once — until the key expires or you replace it.
Keys generated since that date need a PIN of 14 characters, not 4. If a guide says four digits, it was written before the change. Write the PIN down somewhere you will still have it in three years — it cannot be recovered, only replaced.
The nine screens
- 01
Sign in to OVi
Go to ovitribucr.hacienda.go.cr — the Oficina Virtual Tributaria. Sign in with your identification number and password — the same ones you use for your tax returns.
- 02
Choose the taxpayer profile
If you act for a company, choose the company, not yourself. The key belongs to whoever issues the invoices.
- 03
Open the Tico Factura block
It sits on the front page of OVi. Everything about electronic invoicing lives inside it.
- 04
Create a user
Choose “No, voy a utilizar otro programa.” That is the answer that gives you API credentials instead of Hacienda’s own form. Staywarden is the other program.
- 05
Keep the username and password
They appear once on screen and are also emailed to you. These are what Staywarden signs in with — not your OVi password.
- 06
Comprobantes electrónicos
Back in Tico Factura, open this section.
- 07
Llave criptográfica de producción
Production, not test — unless you deliberately want the sandbox first.
- 08
Generar llave criptográfica
It asks for a PIN. Fourteen characters, per the July 2026 rule. Confirm it and press Generar.
- 09
Download the .p12 file
That file plus the PIN is the signature. Anyone holding both can issue tax documents in your name — treat it like your bank password, not like a download.
What Staywarden needs from you afterward
- The .p12 file
- Uploaded once. The signing key inside it is sealed on arrival; the .p12 file itself and its PIN are not kept.
- The PIN
- Fourteen characters, from step eight.
- Username and password
- From step five — the API credentials, not your OVi login.
- Your CABYS code for lodging
- It comes prefilled with the usual lodging code (6311100000000). Ask your accountant to confirm it is yours: it depends on how your activity is registered.
- The number of the last document you issued
- If you are coming from another system, your numbering has already started, and we cannot see it. Nothing is issued until you answer — and “none” is a valid answer.
And then
Staywarden works out which documents are owed from the stays you already have, and files them one at a time. Nothing is sent automatically — you press the button, per document or per month. Hacienda answers 202 first and decides later; Staywarden fetches the verdict separately.
See the invoicing screen