Purchase Electronic Invoice (FEC)

A Purchase Electronic Invoice (FEC, code 08) is issued by the buyer to support certain purchases from suppliers who do not issue Costa Rican electronic documents. It does not replace a sales invoice or automatically make an expense deductible. First identify the transaction, supplier and supporting documents already available.

Availability

The FEC is on the Contabilidad / ERP plans (ERP Pyme, ERP Pro and ERP Plus). To issue one your organization needs electronic invoicing set up: the issuer's ID and economic activity, e-mail, digital certificate and Hacienda credentials. If anything is missing, the send window lists it and takes you to fix it.

What is a FEC and when is it used?

A FEC documents a real purchase in the cases prescribed by Hacienda. Your company generates and signs it as buyer; the FEC XML identifies the supplier as issuer and your company as receiver. Check both parties and keep the original document.

SituationWhat to review
Services or intangible goods from a non-domiciled supplier, used in Costa Rica.Original invoice, supplier identity, place of use and VAT treatment. Reference 16 identifies the non-domiciled supplier document.
Local supplier not required to issue electronic documents, special agricultural regime or unregistered individual.Confirm actual supplier status and purchase evidence. Do not use FEC just because the supplier forgot to send a FE.
Simplified-regime supplier.If the supplier voluntarily issues FE as a non-confirming electronic issuer-receiver, do not duplicate with FEC. Otherwise review the supplier document and FEC requirement. These purchases do not create VAT credit based on that regime.
Imported physical merchandise.Review the commercial invoice and customs evidence. Do not treat parts or merchandise as digital services or create FEC merely because an address is abroad.
Supplier already issued Costa Rican FE, public transport or payment to a state entity for its usual activity.Do not automatically replace the existing evidence with FEC. Check exclusions and keep the applicable document.

“Needs FEC” is a review prompt, not a tax conclusion

Astra uses supplier identification and available information to suggest reviewing purchase evidence. Open Fiscal evidence: choose Issue FEC when applicable or No FEC required when another valid document supports the purchase. An overseas address alone does not determine document type. See Purchase invoices.

Local suppliers without VAT

Astra proposes 0 % lines without credit for local conditions it recognizes as without VAT. Verify the regime and transaction; do not add 13 % to create credit for tax the supplier did not charge. A system default does not replace tax review.

Do not confuse FEC, export and document reception

What happensCorrect route
Your business buys from a supplier without FE and the case requires FEC.Expenses → Purchase invoices → Issue FEC.
Your business sells goods or services abroad.Review whether FEE applies in Income → Invoices. Customer nationality or address does not itself establish an export.
A foreign customer buys locally in Costa Rica.Review FE or TE according to the transaction and receiver details; being foreign does not make it FEC.
You receive supplier FE.Use Document reception, the linked purchase and payment. Do not issue another FEC for the same transaction.

See the FEE guide for export sales and their requirements.

When the contact has an overseas address

On a sale, submission review reminds you to distinguish a local sale from an export and offers Review contact. On a purchase, local identification without a Costa Rican address but with an overseas address requires reviewing supplier details. Astra does not automatically change the contact or convert sales into purchases.

Before you start: who collected the VAT?

For services or intangible assets acquired abroad and used in Costa Rica, review the applicable VAT treatment and who collected or must declare the tax. Check the supplier invoice and card statement. Do not assume every foreign purchase has a 13 % rate or creates VAT credit.

What you see Choose What happens
The bank charged a VAT line (or "digital services tax") next to the supplier's charge. The card collected it Record the tax actually collected and retain the statement. Any VAT credit depends on eligibility, use and restrictions; do not charge the supplier that tax again.
Nobody charged you VAT: you paid by transfer, or the supplier isn't on Hacienda's list. Nobody: I self-assess it Review whether self-assessment applies and the correct rate. Tax payable and any eligible input credit must be assessed separately; the supplier balance excludes tax not charged by the supplier.
The service carries no VAT (exempt or not subject). No VAT The FEC goes out with exempt lines.

Astra asks the first time you make a FEC for that supplier — in the line window, before the first line, and in the Foreign VAT box of the purchase invoice — and remembers it for the next ones. If you change the answer, the lines change rate while the FEC hasn't gone out; once sent, you can only switch between "card" and "self-assessed", which don't touch the document.

Foreign VAT box in the sidebar of a purchase invoice, with the question and the three options: the card collected it, nobody: I self-assess it, no VAT
The Foreign VAT box, in the purchase invoice sidebar, while nobody has decided. Once you choose, it explains what it means below: if you self-assess, how much you owe the supplier without the VAT.
What if the supplier issued you a Costa Rican electronic invoice?

Then no FEC applies: the expense is already formalized with their invoice, which reaches you through Document Reception.

Step 1 — Create the foreign supplier

This is where most people get stuck, and it has to be done right before you touch the invoice. Go to Contacts → New contact and create the supplier like any other, with two specifics.

Use the supplier’s actual identification

Copy the identification from the supplier document and verify the correct type. Do not invent numbers, pad with zeros or remove letters to force “Foreign”. Length does not establish tax domicile. If the editor suggests an incorrect type, review the contact with support before issuing.

Record the foreign address

Once the contact is typed as Extranjero, the contact editor's Address tab changes: instead of province, canton and district it shows Foreign Address. That's where the supplier's address goes. Hacienda accepts the FEC without it, so a missing one does not block sending, but recording it is recommended: the send window reminds you with a warning.

  1. Look up the company's real address online (usually on their website footer or on the invoice itself).
  2. Write it in full: street, city, state/province, country. For example: 1601 Willow Road, Menlo Park, CA 94025, United States.
  3. It must be between 5 and 300 characters.

Don't fill in Costa Rican province, canton or district — those fields are for domestic suppliers and don't apply here.

If you already created the contact without an address

You don't have to leave the FEC screen. The missing-foreign-address warning carries an Add address button to type it in place; it is saved on the contact.

Step 2 — Create the purchase invoice

With the supplier ready, the invoice is built exactly like any other purchase invoice. Go to Expenses → Purchase Invoices → New purchase invoice.

  1. Select the foreign supplier you just created.
  2. Enter the supplier's invoice number exactly as it appears on their document. Astra reuses it later as the reference number — see The reference.
  3. Set the issue date from the supplier's document.
  4. Pick the currency. If the invoice is in dollars, select USD and Astra records that day's exchange rate. Currency and rate are locked once the FEC is submitted.
  5. Add the line items with description, quantity, unit price and CABYS code.
  6. Check that the total matches the original document.
  7. Save.

VAT on the line items

For the standard taxable service, Astra proposes the rate that matches who collected the VAT: 13 % (general rate, code 08) if the card collected it or you self-assess it, exempt (code 10) if the service carries no VAT. If you haven't decided yet, the line window asks before you add the first one.

Only change a line's rate by hand if your accountant tells you to for a specific case.

Every line needs a CABYS code

Each line must carry a 13-digit CABYS code. It's Hacienda's classification of the good or service, and without it the document is rejected. If you're not sure which to use, the CABYS picker lets you filter by description — for software subscriptions and digital advertising you'll be looking in the services families.

Step 3 — Submit to Hacienda

Open the purchase invoice you saved. The FEC button is in the top bar, on the right. Pressing it opens the submission window, which shows the assembled document and everything still missing.

The window runs down in blocks; review them in order:

Invoice details

Issue date and due date. The issue date is the date of the supplier's invoice, and it is the date the FEC carries. Correcting it here corrects the purchase; if that month is closed in your books, Astra won't let you move it.

Commercial Data

  • Sale condition — Cash if you already paid (the norm for subscriptions and advertising). If you pick Credit, you must enter the term in days; Astra proposes 30.
  • Payment method — for foreign suppliers Astra proposes Digital Platform, which is what applies when you paid by card on the supplier's site. Change it if you paid by transfer.
  • Situation — review whether a genuine contingency occurred. An earlier purchase alone does not justify choosing it. See Dates and contingency.

Branch & Terminal

Where the consecutive number comes from. Astra proposes your default branch; change it only if you issue from another point.

Activity Codes

Your company's economic activity: the one Hacienda requires on an FEC. If the supplier is foreign, the window shows "Foreign supplier detected" and asks nothing more. If the supplier is Costa Rican and has registered activities, you can pick their economic activity; if they have none (a non-taxpayer, or a sale of used goods, for instance), the FEC is sent anyway.

Reference Document

Mandatory on every FEC. Covered in the next section.

Once everything is green, press Submit FEC to Hacienda.

The window tells you exactly what's missing

If anything is incomplete the submit button stays disabled and the list of blockers appears above it. The lines are checked the same way as on a sales invoice, and most messages carry a button that fixes the data without leaving the window:

  • CAByS — a line with no code, a code of the wrong length, or a code of the other kind than its unit (goods with a service unit, or the reverse). The chosen code stays on the line and the unit moves to one of the same kind.
  • Unit — a unit Hacienda doesn't accept, or one of the other kind than the CABYS.
  • Charge 13 % — a line with less IVA than its CABYS carries, when the supplier does charge IVA. You can also change the CABYS.
  • Classify IVA — a line without a rate code, or an exempt CABYS with a code other than 10.
  • ID — a Costa Rican supplier with no identification: type it and Astra looks it up in Hacienda's registry. A foreign supplier's is fixed on the contact.
  • Address — a Costa Rican supplier with no address or an incomplete one: opens the contact on its Address tab. Back in the window, it checks again when any field changes.

These fixes need permission to edit purchase invoices, and can't be made once the FEC is sent.

Validation errors list in the FEC window, with a fix button beside each missing item: supplier ID, address, CAByS and VAT classification
Each missing item has its own button: the supplier's ID and address, and the line's CAByS and VAT classification. Fix it right there and the window checks again.

Old purchases, emission and contingency have different dates

The supplier’s original document date and payment date are not the emission date of a newly generated FEC. Keep those dates on the purchase, payment and reference; do not change them to match.

An old purchase alone is not contingency. Contingency replaces a provisional document issued during a genuine inability to use the system. “No internet” describes an electronic document generated without a connection, not one generated today for an earlier purchase.

Review Situation before sending

Do not treat an automatic selection as tax confirmation. Without a genuine contingency, review Normal, which emits with the current date while preserving the purchase date. For an actual contingency, retain the provisional document, its date and evidence of the disruption, and review submission and timing with your accountant.

If the purchase or payment belongs to another period, your accountant must review recognition, VAT credit and whether a return needs amendment. Hacienda acceptance does not remove requirements or guarantee the absence of penalties.

The reference: the field that trips people up

FEC window of a foreign supplier with the wrong reference type: the error asking for reference 16 at the top, the address warning with its Add address button, and the Reference Document block below
If another reference type is selected for a non-domiciled foreign supplier, Astra blocks submission and asks for reference 16 at the top. The missing address is only a warning: it does not block sending. Retain the original supplier document number and date.

Every FEC must point at a backing document. The Reference Document block asks for five values, and the type decides what's accepted as the number.

Field What to enter
Reference document type For a foreign supplier: 16 — Proveedor No Domiciliado (non-domiciled supplier). Astra selects it for you. For a simplified-regime supplier: 14, see below.
Reference code How the FEC relates to that document. Astra leaves it on Reference to another document, which is what applies here. If you pick Other (99), Astra asks for the Description of the «Other» code, which Hacienda requires.
Document number The supplier's invoice number. Astra pulls it from the purchase invoice's Supplier Invoice Number field.
Document date The date on the supplier's invoice.
Reference reason Free text describing the purchase. Astra proposes "Compra de servicio digital a proveedor extranjero".
The reference type governs the number

With type 16 (Proveedor No Domiciliado) the number is free text: you can enter the supplier's invoice number as-is, letters and dashes included.

But if you switch the type to a Costa Rican electronic document — 01 invoice, 02 debit note, 03 credit note, 04 ticket — the number then requires a 50-character clave numérica, and anything else is rejected. If you see "the reference number must be a valid 50-digit clave numérica", the cause is almost always a wrongly selected type, not a wrong number.

If the supplier gave you no invoice number at all, you can compose one that identifies the purchase (e.g. META-2026-08). Always prefer the real number where one exists — it's what lets you reconcile later against the bank statement or the card charge.

Simplified-regime supplier with a paper receipt

When a local simplified-regime supplier hands you a paper receipt, the FEC references that receipt:

  • Reference document type: 14 — Comprobante aportado por contribuyente de Régimen Especial (document provided by a special-regime taxpayer). If the supplier is recorded in Astra as simplified regime, Astra selects it for you.
  • Reference code: Referencia a otro documento (reference to another document).
  • Document number: the receipt number exactly as printed; with type 14 it is free text. Astra brings it from the Supplier Invoice Number field.
  • Document date: the receipt's date.
  • Reference reason: Astra proposes "Purchase from a simplified-regime supplier".

If the type is left at 01 — Electronic invoice, Astra asks for a 50-digit key: change the type to 14. The lines go at 0 % without right to credit (code 11), because these purchases generate no IVA credit. Keep the paper receipt as support.

After submitting

The FEC button in the top bar changes colour and name with the status. Hover it to read it:

Status Meaning
Sending…It left Astra; no answer yet.
ProcessingHacienda has it and is validating. Usually resolves in seconds.
AcceptedDone. The expense is formalized.
RejectedHacienda found a problem. A red banner on the invoice carries the reason, and you can resubmit from the same window.
FE ErrorFailed before reaching Hacienda (invalid data or a connection problem). Amber banner, retry from the window.

From the moment you submit, whatever happens next:

  • The invoice is locked — line items, currency and exchange rate stop being editable. You don't have to wait for acceptance: the lock kicks in at Sending….
  • Inside the FEC window an Electronic Document block opens with the status, the consecutive number, the numeric key and the Hacienda response. That's where you read the exact reason for a rejection.
  • If the submission never reaches Hacienda because some data is missing or wrong, the window says so at the top ("The FEC was not sent"), the consecutive is not used, and the window stays open to correct and send again.
  • Acceptance records the fiscal document; it does not prove deductibility or VAT-credit eligibility. Correct an accepted FEC with a credit or debit note.
  • In companies with automatic purchases, the purchase's VAT moves to tax credit in its entry as soon as the FEC goes out, and back to cost if Hacienda rejects it. If that month is closed, the purchase shows among the unposted documents on the Accounting Dashboard and its entry updates by itself when you reopen the month.

Correcting or voiding a FEC

What to do depends on whether you've already submitted it. Answer that first:

Not yet submitted to Hacienda

There's nothing to correct with Hacienda: the document never existed for them. Edit the purchase invoice directly, or use Void Purchase Invoice in the detail view's sidebar. No credit note is issued, and the invoice stops counting in expenses, reports and accounts payable.

Hacienda rejected it

A rejected FEC doesn't count with Hacienda. Open the FEC window again: read the reason in the Electronic Document block, correct it right there (the lines, the supplier, the reference) and press Submit FEC to Hacienda. It goes out with a new consecutive.

Already submitted and accepted

Now there is a formal document to correct, and it's done with a credit note (to reduce or cancel the amount) or a debit note (to increase it). The buttons appear in the invoice's top bar, next to the FEC button, and only once the FEC is accepted.

  1. Open the accepted FEC.
  2. Press the credit note button (minus circle) or debit note button (plus circle).
  3. Tick the lines to credit or debit and adjust the quantities. Tick them all in full and the note covers the whole amount; otherwise it goes out as partial. A credit note can't exceed what is left to credit on the FEC: its total less the credit notes Hacienda already accepted.
  4. Pick the reference code (the reason as Hacienda classifies it) and write the reason for the correction.
  5. Astra creates the note as a new document and takes you to it, with the submission window already open and the reference to the original FEC filled in with its numeric key. The reference type is fixed at 17 (credit note) or 18 (debit note), as Hacienda requires for a note against an FEC. You press submit there.

A credit note for the full amount takes the purchase to zero for both VAT and income tax purposes. It also lowers what you owe the supplier on the original FEC, in the accounting and in Accounts Payable; the note itself isn't paid and never shows as a debt. If the note is for goods you sent back to the supplier, tick Return to supplier on its lines and the units leave stock once Hacienda accepts the note (see Return to supplier). A debit note, on the other hand, is an extra amount you owe and gets paid like any purchase invoice. See also Credit Notes and Debit Notes.

If the FEC was already paid when you issue the credit note, the supplier owes you what the note credits: it becomes a credit balance. In the note's sidebar, the Credit note card shows how much is left; Refund records the money the supplier returns into a bank account. If you don't, Astra applies it to that supplier's next purchase in the same currency.

The short rule

Haven't sent it to Hacienda? Void it and you're done. Already sent? Credit note.

When you buy from a supplier abroad and pay as you order, the FEC goes on the payment date even if the parts arrive weeks later. From the confirmed purchase order use Convert to Invoice, issue the FEC and record the payment. When the parts arrive, receive them on the order as usual.

If something on the order never arrives, close the order with Close Order: Astra opens this FEC's credit note with those lines and quantities. Since the FEC was already paid, what it credits becomes a credit balance, for the supplier's refund or your next purchase.

The FEC button isn't there

Astra hides the button when issuing a FEC would be incorrect. There are three reasons:

  • The invoice came from a received document. The supplier already issued their own electronic invoice and already reported the sale; a FEC on top would double-report the purchase. Just record the payment.
  • It's a historical record migrated from another system. Submitting it now would consume a current consecutive number and present a prior-period purchase as if it belonged to the current one.
  • The invoice is voided.

If you expected to be able to issue and the button isn't there, first check whether the invoice was created from Document Reception — that's the most common case. (If a FEC was ever issued on the invoice, the button stays put even when the block applies: it's the only way to check its status.)

Tax effect: evidence does not automatically create credit or deductibility

FEC is part of the evidence. Income-tax deductibility depends on the purchase, its connection to the activity and formal and substantive requirements. VAT credit depends on tax actually paid or declared, use of the purchase and applicable restrictions or proportionality.

Keep the supplier document, FEC and Hacienda response, payment evidence and VAT evidence. For imported merchandise, also keep the relevant customs documentation. Review the documents with your accountant before using them in a return.

Official sources and review

Reviewed October 12, 2026.

Common problems

Message Cause and fix
The receiver's (supplier's) address is required when the identification type is not foreign Review the supplier’s identification type and actual domicile. Do not pad or invent the number to bypass address validation.
The foreign supplier has no registered address It's a warning: it doesn't stop sending. To add it, use Add address in the message itself.
A line is missing its CABYS code Assign a 13-digit CABYS code. The message carries a button to do it on the spot.
The line's CABYS is for goods (or a service) and its unit of measure is for a service (or goods) Change the CABYS or the unit with the message's buttons. Hacienda rejects the mix.
The line carries less IVA than its CABYS rate If the supplier charged you IVA, use Charge 13 %. If the code doesn't describe what you bought, change the CABYS.
Items cannot be modified after the FEC has been submitted The document is already with Hacienda. Correct it with a credit or debit note.
This document comes from the supplier's own electronic invoice No FEC applies — the supplier already reported the sale. Just record the payment.

Need more help?

Our team is ready to assist you.

EmailWhatsApp

Use Astra for your business

Astra · Astranexo

See plans and pricing