F0401 expanded XML — full field mapping (English)
Summary
Ministry of Finance (Taiwan) F0401 expanded XML credential: field paths, English descriptions, types, lengths, requirement flags, validation hints, and examples. For implementers mapping DTOs, APIs, and databases.
Legal notice
Field layout and legal meaning follow MOF / Taiwan e-invoice regulations. This English page is a technical aid. The Chinese F0401 table remains the on-site SSOT for nuanced wording.
Document purpose
| Item |
Description |
| Audience |
F0401 XML upload, center integration, issue / void / allowance data design |
| Naming |
Keep field names identical to the table’s “Field name” column for DTO / API / DB |
| Validation |
Implement required flags, lengths, formats, and checks per Req and Validation columns |
| Pre-issuance checks |
Also follow Invoice issuance validation (English) |
Requirement key
| Code |
Meaning |
| M |
Mandatory |
| O |
Optional |
| Ctx |
Context-dependent (e.g. B2B vs B2C, carrier, donation) |
Full field mapping table
| # |
Structure |
Category |
Field name |
English description |
Type |
Len |
Req |
Value / notes |
Validation |
When |
Example |
| 1 |
Main |
Invoice |
— |
Invoice header (group) |
— |
— |
— |
— |
— |
— |
— |
| 2 |
Main |
Invoice |
InvoiceNumber |
Full invoice number |
String |
10 |
M |
2 letters + 8 digits |
Must match track and serial rules |
All invoices |
AB12345678 |
| 3 |
Main |
Invoice |
InvoiceDate |
Issue date |
Date |
8 |
M |
YYYY-MM-DD |
Must not be after system date |
All invoices |
2025-01-01 |
| 4 |
Main |
Invoice |
InvoiceTime |
Issue time |
Time |
8 |
M |
HH:MM:SS |
Valid time |
All invoices |
14:30:15 |
| 5 |
Main |
Seller |
Seller.Identifier |
Seller GUI (tax ID) |
String |
10 |
M |
8-digit seller GUI |
Must pass Taiwan GUI check digit |
All invoices |
12345678 |
| 6 |
Main |
Seller |
Seller.Name |
Seller legal name |
String |
60 |
M |
Seller name |
Non-empty |
All invoices |
XYZ Co., Ltd. |
| 7 |
Main |
Seller |
Seller.Address |
Seller address |
String |
200 |
M |
Registered address |
Valid address |
All invoices |
… |
| 8 |
Main |
Seller |
Seller.PersonInCharge |
Seller person in charge |
String |
60 |
O |
— |
— |
— |
— |
| 9 |
Main |
Seller |
Seller.TelephoneNumber |
Seller phone |
String |
20 |
O |
— |
— |
— |
— |
| 10 |
Main |
Seller |
Seller.FacsimileNumber |
Seller fax |
String |
20 |
O |
— |
— |
— |
— |
| 11 |
Main |
Seller |
Seller.EmailAddress |
Seller email |
String |
100 |
O |
— |
— |
— |
— |
| 12 |
Main |
Seller |
Seller.CustomerNumber |
Seller customer number |
String |
20 |
O |
— |
— |
— |
— |
| 13 |
Main |
Seller |
Seller.RoleRemark |
Seller role remark |
String |
100 |
O |
— |
— |
— |
— |
| 14 |
Main |
Buyer |
Buyer.Identifier |
Buyer GUI |
String |
10 |
Ctx |
8-digit buyer GUI for B2B |
Required for B2B |
B2B |
87654321 |
| 15 |
Main |
Buyer |
Buyer.Name |
Buyer display name |
String |
60 |
M |
Buyer name |
Non-empty |
All invoices |
ABC Corp. |
| 16 |
Main |
Buyer |
Buyer.Address |
Buyer address |
String |
200 |
O |
Buyer address |
Recommended for B2B |
B2B |
… |
| 17 |
Main |
Buyer |
Buyer.PersonInCharge |
Buyer person in charge |
String |
60 |
O |
— |
— |
— |
— |
| 18 |
Main |
Buyer |
Buyer.TelephoneNumber |
Buyer phone |
String |
20 |
O |
Mobile format for SMS |
Prompt if invalid |
— |
— |
| 19 |
Main |
Buyer |
Buyer.FacsimileNumber |
Buyer fax |
String |
20 |
O |
— |
— |
— |
— |
| 20 |
Main |
Buyer |
Buyer.EmailAddress |
Buyer email |
String |
100 |
O |
Valid email for notifications |
Prompt if invalid / multiple |
— |
— |
| 21 |
Main |
Buyer |
Buyer.CustomerNumber |
Buyer member / customer id |
String |
20 |
O |
Platform member id |
— |
— |
— |
| 22 |
Main |
Buyer |
Buyer.RoleRemark |
Buyer role remark |
String |
100 |
O |
— |
— |
— |
— |
| 23 |
Main |
Buyer |
BuyerRemark |
Buyer remark |
String |
200 |
O |
— |
— |
— |
— |
| 24 |
Main |
Buyer |
MainRemark |
Main-file remark |
String |
200 |
O |
— |
— |
— |
— |
| 25 |
Main |
Buyer |
CustomsClearanceMark |
Customs clearance flag |
String |
1 |
O |
1 via customs; 2 not |
Required 1 or 2 for zero-rate |
Zero-rate |
— |
| 26 |
Main |
Buyer |
Category |
Offset / reversal category |
String |
2 |
O |
— |
— |
— |
— |
| 27 |
Main |
Buyer |
RelateNumber |
Related reference no. |
String |
20 |
M |
Order or billing id |
— |
— |
— |
| 28 |
Main |
Buyer |
InvoiceType |
Invoice type enum |
Enum |
— |
O |
— |
— |
— |
— |
| 29 |
Main |
Buyer |
GroupMark |
Batch-issue mark |
String |
1 |
O |
— |
— |
— |
— |
| 30 |
Main |
Buyer |
DonateMark |
Donation flag |
Enum |
— |
M |
Donate or not |
1 donate → NPOBAN required; 0 not |
Donation invoices |
0 |
| 31 |
Main |
Buyer |
CarrierType |
Carrier type code |
Enum |
— |
O |
MOF carrier code |
Required if carrier used |
E-invoice carrier |
3J0002, EJ1520 |
| 32 |
Main |
Buyer |
CarrierId1 |
Carrier visible id |
String |
400 |
O |
Visible id |
Required if CarrierType set |
Carrier used |
/ABC12345 |
| 33 |
Main |
Buyer |
CarrierId2 |
Carrier hidden id |
String |
400 |
O |
Hidden id |
Required if CarrierType set |
Carrier used |
A1B2C3D4E5 |
| 34 |
Main |
Buyer |
PrintMark |
Print flag |
String |
1 |
M |
Y / N |
If Y, do not fill carrier fields |
All invoices |
N |
| 35 |
Main |
Buyer |
NPOBAN |
Donation donee GUI |
String |
10 |
O |
NPO tax id |
When DonateMark=1, valid NPO GUI |
Donation |
12345678 |
| 36 |
Main |
Buyer |
RandomNumber |
Random code on invoice |
String |
4 |
M |
— |
— |
— |
— |
| 37 |
Main |
Buyer |
BondedAreaConfirm |
Buyer zero-rate confirmation flag |
Enum |
— |
O |
— |
— |
— |
— |
| 38 |
Main |
Buyer |
ZeroTaxRateReason |
Zero-rate reason code |
Enum |
— |
O |
— |
— |
— |
— |
| 39 |
Main |
Buyer |
Reserved1 |
Reserved field 1 |
String |
20 |
O |
— |
— |
— |
— |
| 40 |
Main |
Buyer |
Reserved2 |
Reserved field 2 |
String |
100 |
O |
— |
— |
— |
— |
| 41 |
Details |
Details |
— |
Line items (group) |
— |
— |
— |
— |
— |
— |
— |
| 42 |
Details |
Details |
Description |
Product / service name |
String |
500 |
O |
— |
— |
— |
— |
| 43 |
Details |
Details |
Quantity |
Quantity |
Decimal |
20 |
M |
— |
— |
All invoices |
— |
| 44 |
Details |
Details |
Unit |
Unit of measure |
String |
6 |
O |
— |
— |
All invoices |
— |
| 45 |
Details |
Details |
UnitPrice |
Unit price |
Decimal |
20 |
M |
— |
— |
All invoices |
— |
| 46 |
Details |
Details |
TaxType |
Line tax category |
Enum |
— |
M |
— |
— |
All invoices |
— |
| 47 |
Details |
Details |
Amount |
Line amount |
Decimal |
20 |
M |
Qty × price; C tax-incl., B excl. tax |
Warn if amount diff > NT$5 |
All invoices |
— |
| 48 |
Details |
Details |
SequenceNumber |
Line sequence no. |
String |
4 |
M |
4-digit line id |
— |
— |
— |
| 49 |
Details |
Details |
Remark |
Line remark |
String |
120 |
O |
— |
— |
— |
— |
| 50 |
Details |
Details |
RelateNumber |
Line related ref. |
String |
50 |
O |
— |
— |
— |
— |
| 51 |
Main |
AmountSummary |
SalesAmount |
Taxable sales total |
Decimal |
20 |
M |
Taxable base |
Non-negative; must match detail sum |
All invoices |
1000 |
| 52 |
Main |
AmountSummary |
FreeTaxSalesAmount |
Exempt sales total |
Decimal |
20 |
O |
Exempt base |
For exempt lines |
Exempt sales |
0 |
| 53 |
Main |
AmountSummary |
ZeroTaxSalesAmount |
Zero-rate sales total |
Decimal |
20 |
O |
Zero-rate base |
Attach zero-rate schedule when required |
Export / specific services |
0 |
| 54 |
Main |
AmountSummary |
TaxType |
Header tax category |
Enum |
— |
M |
1 / 2 / 3 / 9 |
— |
— |
— |
| 55 |
Main |
AmountSummary |
TaxRate |
VAT rate |
Decimal |
5 |
M |
VAT % |
e.g. 0%, 5%, exempt rules |
All invoices |
5 |
| 56 |
Main |
AmountSummary |
TaxAmount |
VAT amount |
Decimal |
20 |
M |
Header VAT |
Typically SalesAmount × TaxRate |
All invoices |
50 |
| 57 |
Main |
AmountSummary |
TotalAmount |
Grand total |
Decimal |
20 |
M |
Invoice total |
Must be positive |
All invoices |
1050 |
| 58 |
Main |
AmountSummary |
DiscountAmount |
Discount amount |
Decimal |
20 |
O |
— |
— |
— |
— |
| 59 |
Main |
AmountSummary |
OriginalCurrencyAmount |
Amount in original currency |
Decimal |
20 |
O |
— |
— |
— |
— |
| 60 |
Main |
AmountSummary |
ExchangeRate |
FX rate |
Decimal |
10 |
O |
Rate |
Per MOF announced rates |
Cross-border |
30.5 |
| 61 |
Main |
AmountSummary |
Currency |
ISO currency code |
String |
3 |
O |
Currency |
ISO 4217 for cross-border |
Cross-border e-commerce |
USD |
Validation summary (before F0401 upload)
| Area |
Key points |
| Tax type |
Main vs Details TaxType consistent or valid mixed-tax (C only); codes 1/2/3/9. |
| B / C class |
8-digit valid GUI → B (lines excl. tax, compute TaxAmount); 0000000000 → C (incl. tax, header tax 0). |
| Sales & tax |
SalesAmount / FreeTaxSalesAmount / ZeroTaxSalesAmount = sums of detail Amount by line tax type; tax/total tolerances ≤ NT$5. |
| Upload |
B-type 7 days, C-type 48 hours (confirm current MOF text). |
| GUI check digit |
Weighted algorithm; digit 7 = 7 → Z1 or Z2 divisible by 5. |
| Conditional |
Seller.Name, Seller.Address, Buyer.Name mandatory; zero-rate → CustomsClearanceMark; carrier / print / cloud rules → see Invoice issuance validation. |
Type mapping for code
| Table type |
Suggested API / DB type |
Note |
| String |
string |
Respect max length |
| Decimal |
decimal or number |
Money, qty, rate — avoid binary float drift |
| Date |
string (YYYY-MM-DD) or date |
Per stack |
| Time |
string (HH:MM:SS) or time |
Per stack |
| Enum |
string or enum |
Values per MOF / center (e.g. DonateMark 0 | 1) |
Suggested nested objects
| Structure + category |
Suggested object |
Fields (field names) |
| Main + Invoice |
Invoice |
InvoiceNumber, InvoiceDate, InvoiceTime |
| Main + Seller |
Seller |
Seller.* (Identifier, Name, Address, …) |
| Main + Buyer |
Buyer |
Buyer.*, BuyerRemark, MainRemark, RelateNumber, DonateMark, CarrierType, CarrierId1, CarrierId2, PrintMark, NPOBAN, RandomNumber, … |
| Details + Details |
Details[] |
Description, Quantity, Unit, UnitPrice, TaxType, Amount, SequenceNumber, Remark, RelateNumber |
| Main + AmountSummary |
AmountSummary |
SalesAmount, FreeTaxSalesAmount, ZeroTaxSalesAmount, TaxType, TaxRate, TaxAmount, TotalAmount, DiscountAmount, OriginalCurrencyAmount, ExchangeRate, Currency |
Version history
| Version |
Date |
Author |
Changes |
| v1.0 |
2026-05-15 |
SystemLead |
Full F0401 table in English; aligned with Chinese SSOT row set. |