create_b2c_invoice
Create a Taiwan B2C e-invoice with mandatory buyer, line item, and tax data; API returns the invoice creation response.
Instructions
Create a B2C invoice using positional field format (C0401). Returns the API response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | List of invoice line items. Each item: {B1: seq, B2: description, B3: qty, B5: unit_price, B6: amount, B7: tax_type, B13: tax_amount}. | |
| total | Yes | Total amount including tax. | |
| buyer_id | Yes | Buyer identifier (tax ID or empty string). | |
| currency | No | Currency code (e.g. 'USD'). | |
| discount | No | Discount amount. | |
| free_tax | Yes | Tax-exempt sales amount. | |
| tax_rate | Yes | Tax rate (e.g. '0.05'). | |
| tax_type | Yes | Tax type ('1'=taxable, '2'=zero-rate, '3'=exempt, '9'=mixed). | |
| zero_tax | Yes | Zero-tax-rate sales amount. | |
| donate_to | No | NPO ban (love code) when donating. | |
| buyer_name | Yes | Buyer name. | |
| print_mark | Yes | Print mark ('Y' or 'N'). | |
| tax_amount | Yes | Tax amount. | |
| carrier_id1 | No | Carrier ID primary (encoded). | |
| carrier_id2 | No | Carrier ID secondary (plain). | |
| donate_mark | Yes | Donate mark ('1'=donate, '0'=no). | |
| main_remark | No | Main remark. | |
| carrier_type | No | Carrier type (e.g. '3J0002' for mobile barcode). | |
| invoice_date | Yes | Invoice date (YYYYMMDD). | |
| invoice_time | Yes | Invoice time (HHmmss). | |
| invoice_type | Yes | Invoice type code (e.g. '07'). | |
| sales_amount | Yes | Taxable sales amount. | |
| exchange_rate | No | Exchange rate. | |
| random_number | Yes | 4-digit random number. | |
| invoice_number | Yes | Invoice number (e.g. 'AB12345678'). | |
| zero_tax_reason | No | Zero-tax-rate reason code. | |
| customs_clearance | No | Customs clearance mark. | |
| original_currency_amount | No | Original currency amount. |