Create Receipts
Issue tax-compliant receipts with a single API call. We handle VAT calculations, fiscal codes, digital signatures, and QR code generation automatically.
Basic example
Here's everything you need to create your first receipt:
from mor_sdk import MorClient
client = MorClient(api_key="your_api_key")
receipt = client.receipts.create(
items=[
{
"name": "Ethiopian Coffee (Bunna)",
"quantity": 2,
"unit_price": 150.00,
"tax_code": "STANDARD" # 15% VAT
},
{
"name": "Injera with Doro Wot",
"quantity": 1,
"unit_price": 350.00,
"tax_code": "STANDARD"
}
],
payment_method="ETHQR",
customer_tin="0012345678" # Optional: for B2B sales
)
print(f"Fiscal Code: {receipt.fiscal_code}")
print(f"Total: ETB {receipt.total}")
print(f"VAT: ETB {receipt.vat_amount}")
print(f"QR Code: {receipt.qr_code_url}")What you get back
The API returns a complete receipt object with everything you need:
{
"id": "rcpt_abc123xyz",
"fiscal_code": "MOR-2026-123456",
"receipt_type": "SALE",
"status": "COMPLETED",
"items": [
{
"name": "Ethiopian Coffee (Bunna)",
"quantity": 2,
"unit_price": 150.00,
"subtotal": 300.00,
"vat_rate": 15,
"vat_amount": 45.00
},
{
"name": "Injera with Doro Wot",
"quantity": 1,
"unit_price": 350.00,
"subtotal": 350.00,
"vat_rate": 15,
"vat_amount": 52.50
}
],
"subtotal": 650.00,
"vat_amount": 97.50,
"total": 747.50,
"payment_method": "ETHQR",
"qr_code_url": "https://api.mor.gov.et/verify/MOR-2026-123456",
"created_at": "2026-03-15T10:30:00Z",
"created_at_ethiopian": "2018-07-05 04:30:00" // Megabit 5, 2018
}What we calculate for you
VAT Amounts
We calculate VAT for each item based on your merchant category (A or B) and the item's tax code. You never have to worry about getting the math wrong.
Fiscal Code
Every receipt gets a unique fiscal code that proves it was issued through an authorized system. This code is what MOR uses to track compliance.
QR Code
A verification QR code that customers can scan to confirm the receipt is genuine and was properly reported to the tax authority.
Ethiopian Date
Receipts include both Gregorian and Ethiopian calendar dates. Perfect for local customers who prefer the Ethiopian calendar.
Receipt types
SALEStandard receipt for a sale. This is what you'll use most of the time.
When to use: Customer buys something
CREDIT_NOTEIssued when you need to refund or correct a previous sale.
When to use: Customer returns an item or you made an error
VOIDCancels a receipt that was created in error (within the same day only).
When to use: Wrong amount, duplicate entry, or immediate cancellation
Tax codes
Each item on a receipt needs a tax code. Here are the options:
| Tax Code | VAT Rate | Use For |
|---|---|---|
STANDARD | 15% | Most goods and services |
ZERO_RATED | 0% | Exports, basic food items, medicines |
EXEMPT | N/A | Financial services, education, healthcare |
Issuing a credit note
When you need to refund a customer or correct an error, issue a credit note that references the original receipt:
# Create a credit note (refund)
credit_note = client.receipts.create(
receipt_type="CREDIT_NOTE",
original_receipt_id="rcpt_abc123xyz", # Reference original
reason="Customer returned item - damaged",
items=[
{
"name": "Ethiopian Coffee (Bunna)",
"quantity": 1, # Refunding 1 of the 2 coffees
"unit_price": 150.00,
"tax_code": "STANDARD"
}
]
)
print(f"Credit Note: {credit_note.fiscal_code}")
print(f"Refund Amount: ETB {credit_note.total}")Payment methods
Specify how the customer paid:
CASHCash payment
ETHQRETHQR bank transfer
TELEBIRRTelebirr mobile money
CBE_BIRRCBE Birr mobile money
AMOLEAmole mobile wallet
CARDDebit/Credit card
CARD_INTERNATIONALInternational card (Visa/MC)
BANK_TRANSFERDirect bank transfer
CREDITCredit/On account
Best practices
Always store the receipt ID
Save receipt.idin your database. You'll need it to issue credit notes or look up receipt details later.
Use idempotency keys for retries
Pass an idempotency_keywhen creating receipts. If your request times out and you retry, you won't create duplicates.
Include customer TIN for B2B
If you're selling to another business, include their TIN. This helps them claim input VAT and creates a clear audit trail.