create_invoice
Issue a Korean 전자세금계산서 (electronic tax invoice) in ONE step (registIssue = 즉시발행) through POPBiLL, and register it. The invoice is issued to the buyer immediately; POPBiLL transmits it to 국세청 (NTS / National Tax Service) automatically the NEXT day (익일전송) unless you call send_to_nts to force it now. The invoicer (seller) 사업자번호, name and CEO come from you; the buyer (invoicee) and the line items come in the arguments. 부가세 (VAT) is computed for you server-side: taxType 과세 = 10% (per-line tax = floor(supplyCost x 0.1), 원 단위 절사), 영세/면세 = 0. A unique 문서관리번호 (mgt_key) is generated automatically if you do not pass one (rule: "K" + base36 timestamp + random, uppercased, <=24 chars, unique per business). Returns the mgt_key and the assigned ntsConfirmNum (국세청 승인번호). Required credential headers (set once in your MCP client, per-request, never stored): x-popbill-linkid + x-popbill-secretkey (your OWN Linkhub keys, free from linkhub.co.kr 파트너 신청) + x-popbill-corpnum (your 10-digit 사업자번호, the invoicer/seller — the invoice is issued FROM this business). Optional header x-popbill-mode: test (default = POPBILL_TEST, no fiscal effect) | prod (production, real fiscal effect, live 국세청 transmission). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
Parameters13
| invoicer_corp_name | string | required | Invoicer (seller) legal business name — your company. The seller 사업자번호 comes from the x-popbill-corpnum header, not here. |
| invoicer_ceo_name | string | required | Invoicer (seller) representative / CEO name (대표자 성명). Required by NTS. |
| invoicee_corp_num | string | optional | Buyer (invoicee) 10-digit 사업자번호 (business registration number, digits only) for a business buyer. Required when invoicee_type is 사업자. |
| invoicee_corp_name | string | required | Buyer (invoicee) legal name. |
| invoicee_ceo_name | string | optional | Buyer representative / CEO name (권장 for a 사업자 buyer). |
| invoicee_email | string | optional | Buyer email for the issue notification (optional but recommended). |
| invoicee_type | string | optional | Buyer type: 사업자 (business, default) | 개인 (individual) | 외국인 (foreigner). |
| items | array | required | Line items. Each: item_name, qty (positive integer, default 1), unit_cost (KRW, whole won integer, NET / 공급가액 per unit). supplyCost and tax are computed for you. |
| tax_type | string | optional | 과세 (standard, VAT 10%, default) | 영세 (zero-rated export, 0%) | 면세 (exempt, 0%). |
| purpose_type | string | optional | 영수 (receipt — already paid, default) | 청구 (charge — payment due). |
| write_date | string | optional | Invoice date 작성일자 as YYYYMMDD (or YYYY-MM-DD). Defaults to today in KST. |
| mgt_key | string | optional | Your 문서관리번호 (unique per your business, 1-24 chars, [A-Z0-9_-]). Auto-generated if omitted. |
| memo | string | optional | Optional internal memo (not transmitted to NTS). |
Raw schema
{
"type": "object",
"properties": {
"invoicer_corp_name": {
"type": "string",
"description": "Invoicer (seller) legal business name — your company. The seller 사업자번호 comes from the x-popbill-corpnum header, not here."
},
"invoicer_ceo_name": {
"type": "string",
"description": "Invoicer (seller) representative / CEO name (대표자 성명). Required by NTS."
},
"invoicee_corp_num": {
"type": "string",
"description": "Buyer (invoicee) 10-digit 사업자번호 (business registration number, digits only) for a business buyer. Required when invoicee_type is 사업자."
},
"invoicee_corp_name": {
"type": "string",
"description": "Buyer (invoicee) legal name."
},
"invoicee_ceo_name": {
"type": "string",
"description": "Buyer representative / CEO name (권장 for a 사업자 buyer)."
},
"invoicee_email": {
"type": "string",
"description": "Buyer email for the issue notification (optional but recommended)."
},
"invoicee_type": {
"type": "string",
"enum": [
"사업자",
"개인",
"외국인"
],
"description": "Buyer type: 사업자 (business, default) | 개인 (individual) | 외국인 (foreigner)."
},
"items": {
"type": "array",
"minItems": 1,
"description": "Line items. Each: item_name, qty (positive integer, default 1), unit_cost (KRW, whole won integer, NET / 공급가액 per unit). supplyCost and tax are computed for you.",
"items": {
"type": "object",
"properties": {
"item_name": {
"type": "string",
"description": "Item name (품목명)."
},
"qty": {
"type": "number",
"description": "Quantity (positive integer). Default 1."
},
"unit_cost": {
"type": "number",
"description": "NET unit price in KRW (공급가액, whole won, excludes 부가세)."
}
},
"required": [
"item_name",
"unit_cost"
]
}
},
"tax_type": {
"type": "string",
"enum": [
"과세",
"영세",
"면세"
],
"description": "과세 (standard, VAT 10%, default) | 영세 (zero-rated export, 0%) | 면세 (exempt, 0%)."
},
"purpose_type": {
"type": "string",
"enum": [
"영수",
"청구"
],
"description": "영수 (receipt — already paid, default) | 청구 (charge — payment due)."
},
"write_date": {
"type": "string",
"description": "Invoice date 작성일자 as YYYYMMDD (or YYYY-MM-DD). Defaults to today in KST."
},
"mgt_key": {
"type": "string",
"description": "Your 문서관리번호 (unique per your business, 1-24 chars, [A-Z0-9_-]). Auto-generated if omitted."
},
"memo": {
"type": "string",
"description": "Optional internal memo (not transmitted to NTS)."
}
},
"required": [
"invoicer_corp_name",
"invoicer_ceo_name",
"invoicee_corp_name",
"items"
]
}