Receipt & Invoice Management
Part of: MPAC SmartPOS Cloud Platform - Product RequirementsVersion: 2.0 Last Updated: 2026-01-28
Overview
The Receipt & Invoice Management domain provides transaction confirmation and formal tax documentation for customers. It handles multiple delivery channels (print, SMS, email) for receipts and generates formal invoices for business customers requiring tax documentation. The system manages receipt delivery preferences, invoice generation with proper numbering, and PDF generation for both receipts and invoices.
Table of Contents
Receipt Generation & Delivery
Purpose: Provide transaction confirmation to customers via multiple channels.
Receipt Entity
{
"id": 1,
"payment_id": "payment_uuid",
"receipt_number": "RCP-000123",
"delivery_method": "print|sms|email|none",
"mobile_number": "+81-90-1234-5678",
"email": "customer@example.com",
"is_printed": true,
"delivery_status": "pending|sent|failed|printed",
"error_message": null,
"created_at": "2026-01-28T11:05:00Z",
"sent_at": "2026-01-28T11:05:30Z"
}Delivery Methods
1. Print (ESC-POS)
Format receipt with ESC-POS commands
└─ Merchant logo
└─ Store information
└─ Order items with prices
└─ Subtotal, tax, discount, total
└─ Payment method
└─ Receipt number
└─ Thank you message
Send to network printer
└─ IP: store.printer_ip
└─ Port: store.printer_port
└─ Protocol: ESC-POS or JetDirect
Mark: is_printed = true2. SMS Delivery
Request customer mobile number
Format SMS message:
"Thank you for your purchase at [Store Name]!
Receipt #RCP-000123
Total: ¥10,800
View online: https://receipts.mpac-cloud.com/RCP-000123"
Send via AWS SNS
Mark: delivery_status = sent/failed3. Email Delivery
Request customer email
Format HTML email with:
└─ Merchant branding
└─ Itemized receipt
└─ PDF attachment (optional)
Send via AWS SES
Mark: delivery_status = sent/failedCustomer Preferences
If customer registered:
└─ Remember delivery preference
└─ Auto-send without prompting next timeInvoice Management
Purpose: Formal invoices for business customers (tax documentation).
Invoice Entity
{
"id": 1,
"bill_id": "bill_uuid",
"invoice_number": "INV-2026-00123",
"invoice_date": "2026-01-28",
"customer_name": "ABC Corporation",
"customer_address": "1-1-1 Chiyoda, Tokyo",
"customer_tax_id": "T1234567890123",
"invoice_address": "Accounting Dept, ABC Corp",
"subtotal": 100000,
"tax_amount": 8000,
"total_amount": 108000,
"payment_terms": "Due on receipt",
"notes": "Thank you for your business",
"created_by": "user_uuid",
"created_at": "2026-01-28T11:10:00Z"
}Invoice Generation
Staff selects "Generate Invoice"
└─ Request invoice details:
- Customer name (business name)
- Customer address
- Customer tax ID
- Invoice delivery address
└─ Generate invoice_number (sequential per year)
└─ Create invoice record
└─ Format PDF with:
- Merchant tax registration info
- Invoice number and date
- Customer details
- Itemized bill
- Tax breakdown
- Payment information
└─ Store PDF in S3
└─ Email to customer (optional)Invoice Reprinting
- Same invoice number preserved
- Reprint count tracked
- "COPY" watermark on reprints
API Endpoints Summary
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /receipts | Generate receipt |
| GET | /receipts/{id} | Receipt details |
| POST | /receipts/{id}/send | Send receipt (SMS/email) |
| POST | /receipts/{id}/print | Print receipt |
| POST | /invoices | Generate invoice |
| GET | /invoices/{id} | Invoice details |
| GET | /invoices/{id}/pdf | Download PDF |
| POST | /invoices/{id}/email | Email invoice |
See Also
Related Domains:
- Order & Bill - Order and bill management that receipts and invoices document
- Payment Processing - Payment completion that triggers receipt generation
- Settlement - Daily settlement that reconciles receipts and invoices
Technical Implementation:
- External Systems - AWS SNS/SES integration for receipt delivery
- Database Architecture - Receipt and invoice data models
API Reference:
- API Endpoints - Complete API specification for receipt and invoice endpoints
Navigation: ↑ Back to Domain Catalog | ← Previous: Customer | Next: Settlement →