Skip to content
Back to blog

Practical guides

How to correct or cancel an accepted e-invoice in JoFotara

Reading time
8 min read
Published
Last updated
How to correct or cancel an accepted e-invoice in JoFotara

This guide covers invoices a business submits to Jordan's national e-invoicing system, which the Income and Sales Tax Department (ISTD) runs through the JoFotara portal. In that system, a business corrects an accepted invoice with a return invoice (a credit note) that references the original's number, UUID and total. ISTD sets this out in its version 1.5 technical integration guide (in Arabic, checked 4 November 2026) (opens in a new tab).

The return invoice Jordan's tax department requires, the right fix for each mistake, and the checks your billing system should run before it sends a return.

Once JoFotara, Jordan's national e-invoicing system, accepts an invoice, it stays exactly as you sent it. You correct it by sending a return invoice, which the technical guide from the Income and Sales Tax Department (ISTD) calls an invoice with a credit note. If the sale still stands with another price or another buyer, our reading of the guide is that you then issue a new invoice with the right details.

The rules below describe how a billing system should behave under version 1.5 of ISTD's guide. Ask your accountant or ISTD how a specific case is treated for tax.

What ISTD allows after an invoice is accepted

The return invoice is the only document the guide describes for changing an accepted invoice. It sets these conditions:

  1. A return covers quantities only.
  2. It cannot exceed the quantity sold on the original invoice.
  3. You may send one or more returns against the same original until all of its quantities are used.
  4. Each return carries the original's invoice number, its UUID (the unique ID your system gives each invoice) and its total.
  5. The return's type and currency follow the original, so a local cash invoice gets a local cash return.
  6. The buyer details on the return match those on the original.
  7. Each return states its reason.

Conditions 1 to 4 are on page 23 of the guide, 5 on page 24, 6 on page 26 and 7 on page 27.

Separate rejected and accepted states

Every submission gets a response, and its status field, EINV_STATUS, tells you which fix applies. The guide lists three values: SUBMITTED (accepted), ALREADY_SUBMITTED (accepted on an earlier attempt) and NOT_SUBMITTED (rejected because of an error).

Article data table: Separate rejected and accepted states (1)
StateHow you knowWhat to do
Draft, never sentNo response is storedEdit or delete it under your own approval rules
Sent, no answer yetThe request timed out or the connection droppedKeep it locked and send it again with the same invoice number and UUID. If the first attempt was accepted, the answer is ALREADY_SUBMITTED with the original QR code
RejectedNOT_SUBMITTED, with the errors listed in EINV_RESULTSFix the data where it was entered, then resubmit
AcceptedSUBMITTED or ALREADY_SUBMITTED, with a QR codeLeave it as it is and issue a return invoice

Store the full response to every attempt: the status, the QR code, the UUID and any errors. That record proves the original was accepted and shows what it contained. Our JoFotara developer guide explains where rejections usually come from and how to resubmit.

Choose the fix for each mistake

Article data table: Choose the fix for each mistake (2)
Mistake on an accepted invoiceWhat to send
Goods came back or a service was refundedA return for the returned quantities
The quantity billed was too highA return for the extra quantity
The whole sale was cancelledReturns for every quantity on the invoice, in one return or several
Wrong price, discount or tax rate on a line (our reading)A return for that line's full quantity, then a new invoice with the right values
Wrong buyer (our reading)A return for all quantities, carrying the original buyer's details, then a new invoice to the right buyer
The quantity billed was too low (our reading)A new invoice for the missing quantity

The last three rows are our reading of the guide, which allows returns on quantities only and describes no document that changes a price or a buyer. Agree them with your accountant before you build them.

Never hard-delete accepted history

Make accepted invoices immutable in business meaning. Each later document has its own identity, state, and link to the original. Your system can label the original as returned or partly returned. It should keep the original, every return and every new invoice, along with who requested, approved and sent each one, and why.

ClinicTek, the clinic system we build and run, keeps its own issued invoices fixed in the same way. After an invoice is issued, an attempt to change it shows "This invoice can no longer be edited." To cancel one, Void invoice asks for a Reason for voiding and warns that "Voiding is permanent and audited." A paid invoice must be refunded before it can be voided, and a voided invoice stays on record with who voided it and when.

Send a return in nine steps

  1. Open the original and confirm that its stored status is SUBMITTED or ALREADY_SUBMITTED, with a QR code.
  2. Check that no other return on the same invoice is waiting to be sent, so two people cannot create two returns.
  3. Pick the lines and quantities to return. Block any quantity above what remains: the quantity sold minus what earlier returns took back.
  4. Enter the reason.
  5. Have an authorised person approve the return. Ask for a second approval on a full return.
  6. Save the return with its own number and UUID before anything is sent, then put it in the sending queue.
  7. Send it and store the response. If it is rejected, fix the data and resend it with the same number and UUID. The original stays accepted throughout.
  8. If the sale stands with new details, issue the new invoice and link it to the return.
  9. Record the money as its own entry: a refund, a credit on the customer's account, or an allocation to another invoice.

Keep refunds and credits apart from the invoice

A return changes what the customer owes. Record any money paid back in a separate entry. Leave the original payment as it was, and record the refund or credit with its amount, method, reference and approval. Show a refund through a payment provider as pending until the provider confirms it.

ClinicTek's Refund payment form works this way. It asks for the Refund amount, a Reason and, for electronic payments, the Provider refund reference, and it refuses an amount above what is still refundable. When one invoice carries a patient share and an insurer share, a return can change the insurer's claim too. Open a follow-up for whoever handles claims. Our guide to reconciling payments with e-invoices covers matching these entries in the daily close.

Make retries safe

A request is idempotent when sending it twice has the same effect as sending it once. The national system supports this. The invoice number and UUID together form the key that blocks a duplicate invoice (guide, page 23). Resending an accepted invoice returns ALREADY_SUBMITTED with the original QR code (page 99). To use it:

  • Create the number and UUID once, when the document is saved, and reuse them on every retry.
  • Keep the number of a timed-out invoice. A new number would create a second invoice.
  • Lock the invoice and its returns in the database, so two sessions cannot approve two returns at once. A disabled button in the browser cannot stop a second request.

What our connector checks before a return is sent

Our JoFotara connector follows version 1.5 of ISTD's guide. Before a return leaves the billing system, the connector checks three things: the return references the original invoice number and UUID, the original total is above zero, and the return states a reason. It also blocks an ordinary invoice from referencing an original, because only returns may point to one.

When the national system answers with an error, the connector sorts it by who can fix it:

  • The connector retries a temporary error, such as a timeout or an unreachable server, with the same number and UUID.
  • It marks a setup error, such as a wrong Client-Id or Secret-Key or a wrong tax number, for whoever administers the account.
  • It marks a data error for correction by whoever entered the data, who fixes it and resends.

Your billing system decides who sees each marked error.

If your current billing system deletes or overwrites submitted invoices, the JoFotara integration service page explains how we connect a system you already run.

Test these cases before go-live

Article data table: Test these cases before go-live (3)
CaseExpected result
Edit a draftSaved; nothing sent
Timeout on the first send, then a retryOne accepted invoice; the retry answers ALREADY_SUBMITTED
Rejected invoice, fixed and resentAccepted; no second invoice
Full return of an unpaid invoiceReturn accepted; balance zero; no refund created
Partial return of a paid invoiceReturn accepted for those quantities; refund recorded separately
Second partial return on the same invoiceAccepted up to the remaining quantity; anything above it is blocked
Return with no reasonBlocked before sending
Wrong price on a paid invoiceFull return of the line, a new invoice, and a refund or credit for the difference
The return is rejectedOriginal unchanged; the return goes back to its owner with the error
Two people return the same line at onceOne return created; the second person sees the change

Run each case with test data, then check the exports and the invoice history.

Cancelling an invoice at the till without a gap in the numbers has its own test in invoice numbering and cancellation at the till.

Checked against version 1.5 of ISTD's technical integration guide (approved 14 May 2026) on 4 November 2026.

Does your billing system let staff delete a submitted invoice?

If so, or if edits overwrite the original, tell us when you ask for a JoFotara connection; we quote that change separately. We build the connection around your current system and store JoFotara's response to every invoice as the record that the original was accepted. Our JoFotara integration service page lists what we need from you before we write a scope and a quote.

Frequently asked questions

ISTD's guide does not cover purchase invoices. In its model the seller issues every invoice and every return, from its own system or on the national e-invoicing portal. Ask the supplier to send a return invoice against the wrong one, then record the return in your own accounts. Keep both invoices as you received them. Jordan's expenses regulation (No. 55 of 2015) has relied since 1 April 2025 on e-invoices from the national system, or from a system linked to it, when local purchases of goods and services are deducted as expenses. Regulation No. 2 of 2025 added this rule.

Sources

Continue on the company guides

JoFotara developer guide, Link a device on the JoFotara portal, JoFotara integration for a live system.

#E-invoicing

Read our editorial policy

Continue reading

Related articles

  1. Practical guides / 14 min read

    Reconcile Payments with Electronic Invoices

    Cover: Reconcile Payments with Electronic Invoices
  2. Cover: Backup and Business Continuity for Small Systems
  3. Cover: How to Write a Software Project Brief Suppliers Can Price

Building a custom system for your business?

After “How to correct or cancel an accepted e-invoice in JoFotara”: tell us scope, users, and integrations — we reply with a practical plan after reviewing your request.