Credit Notes

Credit notes reverse or adjust amounts on invoices Hacienda has already accepted. In Costa Rica, the Electronic Credit Note (NC) is a document with its own clave numérica that references the original invoice and is submitted to Hacienda for validation. In Astra an NC is always created from the invoice it corrects, never from scratch.

What is an NC?

A credit note reduces the amount a customer owes. It reverses an issued invoice fully or partially. Common cases: returns, data or amount corrections, post-sale discounts, cancellations.

In Costa Rica's FE 4.4 system, the NC is a standalone electronic document with its own consecutive sequence, signed XML, and 50-digit clave numérica. It transmits to Hacienda just like an invoice.

Always references an invoice

Every NC must reference an original invoice (FE or electronic ticket) accepted by Hacienda. There's no "standalone" NC. That's why Astra has no "New credit note" button: the NC is created from the detail of the invoice it corrects, and Astra builds the reference (clave numérica, document type and date) automatically.

Key features in Astra:

  • Linked to the original invoice: the NC detail shows the Original document and the invoice shows its Related notes.
  • Once accepted by Hacienda, it reduces the invoice's outstanding balance.
  • Own consecutive sequence (separate from invoices).
  • Signed and submitted to Hacienda exactly like an invoice.
  • The total cannot exceed the invoice's Available amount for CN (the total minus already-accepted NCs) — Astra validates this before sending.
  • Inherits the currency and exchange rate of the original invoice: a USD invoice produces a USD credit note.

When to issue an NC

NCs are the legal way to correct or reverse an invoice already accepted by Hacienda. As long as the invoice hasn't been submitted, simply edit it.

Full cancellation

The invoice was issued by mistake, the customer returned everything, or the service wasn't rendered. The NC cancels 100% and the balance goes to zero. If you also need a corrected invoice, Astra can create the replacement for you (see Cancel & redo below).

Partial return

Some products come back or a service was partially completed. You issue the NC only for the returned lines and quantities; the invoice stays active for the rest. The return works even if the product is already inactive: if you add a line by hand, the credit note's product search also shows inactive products, with their badge, and the variant picker offers their inactive variants.

Price or data correction

The price, date, or the customer's name, email or ID were wrong. Since Hacienda doesn't allow editing an accepted document, the path is to cancel with an NC and issue a new invoice — the Cancel & redo flow does both.

Post-invoice discount

You agreed on a discount after issuing. A partial NC with the reason Financial credit note applies it retroactively.

Before Hacienda, just edit

If you spot an error before submitting the invoice to Hacienda, just edit it. NCs are only needed after the document was accepted and can no longer be modified.

Rejected invoices are not corrected with an NC

If Hacienda rejected the invoice, there is no valid document to reference. In that case the invoice header doesn't offer the NC button but Replace rejected invoice, which issues a new invoice with its own consecutive. See Electronic Invoicing.

Create a credit note

Where it's created

  1. Open the invoice (FE or electronic ticket) you want to correct, for example from Revenue → Invoices.
  2. In the header, click the Credit Note button (circle with a minus sign). It only appears when the invoice is Accepted by Hacienda and still has an amount available to credit.
Accepted invoices only

You can't create an NC on drafts, rejected invoices, or invoices already credited 100%. If the available amount reached zero, the window says: "No more credit notes can be created. The full amount has already been credited."

Step 1: Choose the action

The Credit Note window opens, showing the Available amount for CN and three options:

  • Cancel & redo — when you need to fix an error in the invoice (amount, data, lines). Astra sends an NC for 100% and, once Hacienda accepts it, automatically creates a new draft invoice with the same data for you to correct and send again.
  • Partial credit note — when you refund or reduce only part of it. You choose which lines (and how many units) the customer returns; the invoice stays active for the rest.
  • Cancel without replacement — the invoice was issued by mistake and no new one is needed. Astra creates the NC for 100% right away and takes you to send it; no new invoice is created.

Step 2: Fill in the note

With Cancel & redo or Partial credit note a second window opens with these fields:

  • Lines (partial only) — all come checked; uncheck the ones not being returned. If a line has a quantity greater than 1, adjust Qty to refund. The NC total recalculates instantly and can't exceed the available amount. If the goods physically come back, tick Return to stock on that line: when Hacienda accepts the note, those units go back to the location the sale took them from. The box only shows for tracked products that sale still has deducted.
  • Situation — Normal, Contingencia (contingency) or Sin Internet (offline); the last two ask for the voucher issue date.
  • Send the credit note to the customer — checked by default. When you send it to Hacienda, the Send to the customer section decides who gets it, by email and by WhatsApp. Uncheck it and it goes to nobody, even if you open the send window another day.
  • Note reason — Hacienda's reference code (list below). It comes preselected: Cancels reference document when cancelling and Merchandise return for a partial note.
  • Description / justification — required, max 180 characters. E.g. "Client returned 2 units of product X".

With Cancel without replacement there is no second window: Astra creates the NC and opens its detail directly with the Hacienda submission window, where you type the justification.

Reason codes

Hacienda requires a reason code. Available options:

  • 01 — Cancels the referenced document: fully cancels.
  • 02 — Corrects amount: corrects monetary amounts.
  • 06 — Merchandise return: the customer returned products.
  • 09 — Financial credit note: financial adjustments (early-payment discounts, etc.).
  • 13 — Cancels the referenced document due to material error: like 01, but the cancellation books against the original invoice's tax period — it may require amending that month's return in TRIBU-CR.
  • 14 — Corrects amount due to material error: like 02, but the correction books against the original invoice's tax period.
  • 99 — Other: cases not covered above; a Specify the reason field appears and is required.

When you pick 13 or 14, Astra shows a warning reminding you that they affect the original document's tax period.

Step 3: Submit to Hacienda

Cancel & redo: click Send Credit Note. You'll see the progress on screen: Creating credit note → Submitting to Hacienda → Waiting for Hacienda response → Creating replacement invoice. When done, Process completed offers Go to invoice: that's the replacement invoice, in draft, with the same data. Fix what's needed and submit it to Hacienda like any invoice.

  • If Hacienda takes more than a few seconds, you'll see Hacienda is still processing: the replacement invoice is created anyway and the NC status updates on its own when the response arrives.
  • If Hacienda rejects the NC (or something fails before sending), you'll see An error occurred with the exact message and the replacement invoice is not created.

Partial credit note and Cancel without replacement: Astra creates the NC (numbered NC-…), opens its detail and pops up the submission window with the reason and justification already filled in. Review the preview and click Send Credit Note. If you close the window without sending, the NC stays in the list with no FE status; open it and click the Electronic Invoice button (cloud icon) in the header to send it whenever you want.

Permissions

Creating and sending an NC requires the same permission as creating invoices; viewing the list requires the permission to view invoices. If you don't see the Credit Note button on an accepted invoice, check with your organization's administrator.

Credit note list

List of issued credit notes
The credit notes issued, each one linked to the invoice it corrects.

Reach the list from Revenue → Credit Notes. Columns:

  • Doc # — the NC's consecutive, with the NC tag.
  • Contact — the customer.
  • Parent Invoice — number of the invoice it corrects.
  • Issued — issue date.
  • FE — icon with the Hacienda status: Sending…, Processing, Accepted, Rejected or FE Error. Empty if the NC hasn't been sent yet.
  • Total — NC amount in its currency.

Filters and search

  • Status buttons — Accepted, Rejected, Pending and Error filter by FE status.
  • Search — by NC number; by the customer's name, company, email or ID; or by Hacienda clave numérica or consecutive.
  • Sort — click the Doc #, Contact, Issued or Total header.

Click an NC to open its detail. The side panel shows the Original document (link to the invoice) and the Print and Download (PDF) actions. The Electronic Invoice button in the header shows Hacienda's response and the XML files. The tabs are Line Items, Activity and Files; an NC has no payments tab.

How credits apply

Only NCs accepted by Hacienda affect balances. While the NC is pending, or if it was rejected, the invoice doesn't change.

Effect on the invoice

  • If the invoice was unpaid, the NC reduces the outstanding balance. An NC for the full amount brings the invoice to zero and shows it as Voided.
  • If it was partially paid, the NC reduces the remaining balance.
  • If it was paid (or the amount paid exceeds the new total), the customer is owed money and Astra asks you to decide what to do with it.

Credit owed after a return

When the NC leaves money owed to the customer, both the invoice and the NC show the Customer credit owed banner with the amount (always in colones). Pick an option:

  • Store credit — credited to the customer's account to apply to future purchases; no cash moves.
  • Refund — you return the money in cash, SINPE, bank transfer or card reversal. Requires the refund permission; cash comes out of the open cash session.
  • Gift certificate — issues a gift certificate for the amount. Requires the Gift Certificates add-on.

This banner doesn't appear with Cancel & redo: the obligation moves to the replacement invoice, it isn't money to return. If the invoice has no customer assigned, first use Assign customer.

Using the credit

The contact detail shows Account Credit in the side panel (visible to users who can view financial data) and the Payments tab keeps the payment history. When recording a payment for that customer, the payment window shows Available Credit with the amount and the Apply available account credit button; on the invoice, the Actions block also offers Apply Credit. The credit is only used if you apply it: otherwise the payment is recorded as usual. On the original invoice, NCs and NDs are listed in the side panel under Related notes.

Submit to Hacienda

How it works

  1. Astra generates the XML with the reference to the original invoice's clave numérica.
  2. Signs it with your organization's digital certificate.
  3. Sends it to Hacienda's API.
  4. Hacienda responds with acceptance or rejection (seconds to minutes).
  5. If you left Send the credit note to the customer checked, whoever you ticked under Send to the customer receives the PDF and signed XML (by email and, if ticked, by WhatsApp) and then Hacienda's response.
The reference is critical

The reference block includes the clave numérica (50 digits), document type, and issue date of the original invoice. Astra builds it automatically from the invoice you created the NC from; Hacienda validates that it matches its records.

Response statuses

  • Sending… — being transmitted.
  • Processing — Hacienda received it and is validating.
  • Accepted — validated by Hacienda. Legally valid; from here on it affects balances.
  • Rejected — Hacienda found an issue. The message appears in the NC's Electronic Invoice window.
  • FE Error — the submission failed. Check the message in the same window.

Errors before sending

  • Amount exceeds the available amount — Astra blocks it when creating the NC ("The NC total exceeds the remaining creditable amount"). Remove lines or reduce quantities.
  • Incomplete FE configuration or expired certificate — the window shows "Fix errors before sending". Fix it in Settings and try again: since nothing reached Hacienda, you can resend the same NC.
  • Document validation error (for example, a service CABYS with a goods unit) — the exact message appears in the window. Fix the product or the invoice and try again.

If Hacienda rejects the NC

A rejected NC stays rejected: it can't be resent or "replaced", and the customer email is cancelled. Since a rejected NC doesn't consume the invoice's available amount, the fix is to go back to the original invoice, correct the cause of the rejection, and create a new NC with the Credit Note button.

For end-to-end FE configuration (certificate, emitter, environment), see Electronic Invoicing.

NC on a purchase invoice (FEC)

If you issued an Electronic Purchase Invoice to a supplier and need to correct it, the flow is similar but starts from Expenses → Purchase Invoices: open the accepted FEC and click Create Credit Note (or Create Debit Note). A single window lets you check lines and quantities, pick the reason (the same codes 01, 02, 06, 09, 13, 14 and 99) and type the justification. If you leave every line at its full quantity, Astra treats it as a full cancellation; otherwise as partial. On confirm, the note opens for you to submit it to Hacienda.

Need more help?

Our team is ready to assist you.

EmailWhatsApp

Use Astra for your business

Astra · Astranexo

See plans and pricing