Skip to content

IIAPI Reference

Complete API reference for IIAPI e-invoice integration.

Base URL

Production: https://api.your-domain.com/api/iiapi
Development: http://localhost:3000/api/iiapi

Invoice Endpoints

Create VAT Invoice

http
POST /vat-invoices
Content-Type: application/json

{
  "seller": {
    "taxCode": "0123456789",
    "name": "Your Company",
    "address": "123 Street"
  },
  "buyer": {
    "taxCode": "9876543210",
    "name": "Customer Company",
    "address": "456 Avenue"
  },
  "invoiceDate": "2024-01-15",
  "currencyCode": "VND",
  "items": [
    {
      "itemName": "Product",
      "quantity": 10,
      "unitPrice": 100000,
      "amount": 1000000,
      "vatRate": 10,
      "vatAmount": 100000
    }
  ],
  "totalAmount": 1000000,
  "totalVatAmount": 100000,
  "totalPayment": 1100000
}

Create POS Invoice

http
POST /pos-sale-invoices
Content-Type: application/json

{
  "invoiceDate": "2024-01-15",
  "items": [
    {
      "itemName": "Coffee",
      "quantity": 2,
      "unitPrice": 50000,
      "amount": 100000
    }
  ],
  "totalAmount": 100000,
  "totalPayment": 100000,
  "paymentMethod": "CASH"
}

Invoice Management

InvoiceManagementService exposes four operations. The optional clientName query parameter selects a registered client; when omitted, the default client is used.

Cancel Invoice

http
POST /invoices/cancel?clientName=vnpay-client
Content-Type: application/json

{ ...cancel invoice request body }

Get Invoice Detail

http
POST /invoices/detail?clientName=vnpay-client
Content-Type: application/json

{ ...invoice detail request body }

Get Tax Code Information

http
GET /tax-code/{taxCode}?clientName=vnpay-client

Get Invoice PDF

Returns the invoice PDF in base64.

http
POST /invoices/pdf?clientName=vnpay-client
Content-Type: application/json

{ ...invoice PDF request body }

Invoice Status

StatusDescription
DRAFTCreated, not submitted
PENDINGSubmitted to T-VAN
SIGNEDDigitally signed
SENTSent to CQT
ACCEPTEDCQT accepted
REJECTEDCQT rejected
CANCELLEDCancelled

Error Codes

BANA does not define its own e-invoice error catalogue - errors are surfaced from the VNPAY viiAPI provider response (HTTP status + provider error payload). Inspect the provider response and the service logs.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.