UNPKG

ecpay-einvoice-ts

Version:

ECPay e-invoice SDK for TypeScript

142 lines (125 loc) 3.99 kB
export type IssueItem = { ItemSeq: number, ItemName: string, ItemCount: number, ItemWord: string, ItemPrice: number, ItemTaxType: "1" | "2" | "3", ItemAmount: number, ItemRemark: string, InvType: "07" | "08" vat: "0" | "1" } export type InvoiceInvalidInput = { MerchantID: string, InvoiceNo: string, InvoiceDate: string, Reason: string, } export type InvoiceInvalidResp = { RtnCode: number, RtnMsg: string, InvoiceNo: string, } export type IssueData = { MerchantID: string, RelateNumber: string, ChannelPartner: string, CustomerID: string, CustomerIdentifier: string, CustomerName: string, CustomerAddr: string, CustomerPhone: string, CustomerEmail: string, ClearanceMark: '1' | '2', Print: "0" | "1" Donation: "0" | "1", LoveCode: string, CarrieType: "1" | "2" | "3", CarrierNum: string, TaxType: "1" | "2" | "3" | "4" | "9", SpecialTaxType: string, SaleAmount: number, InvoiceRemark: string, Items: IssueItem[] } export type IssueResp = RepModel & { DecryptedData: { RtnCode: number, RtnMsg: string, InvoiceNo: string, InvoiceDate: string, RandomNumber: string, } } export type QueryWithRelateNumber = { MerchantID: string, RelateNumber: string, } export type QueryWithInvoiceNumberAndDate = { MerchantID: string, InvoiceNo: string, InvoiceDate: string, } export type QueryInvoiceResp = RepModel & { DecryptData: { RtnCode: number, RtnMsg: string, IIS_Mer_ID: string, // 特店編號 ChannelPartner: string, // 通路合作平台商代號 IIS_Number: string, // 發票號碼 IIS_RelateNumber: string, // 訂單編號 IIS_Customer_ID: string, // 客戶編號 IIS_Identifier: string, // 統一編號 IIS_Customer_Name: string, // 客戶名稱 IIS_Customer_Addr: string, // 客戶地址 IIS_Customer_Phone: string, // 客戶電話 IIS_Customer_Email: string, // 客戶信箱 IIS_Clearance_Mark: "1" | "2", // 通關方式 IIS_Types: "07" | "08", // 發票類別 IIS_Category: "B2B" | "B2C", // 發票種類 IIS_Tax_Type: "1" | "2" | "3" | "4" | "9", // 課稅別 SpecialTaxType: number, IIS_Tax_Rate: number, // 稅率 IIS_Tax_Amount: number, // 稅額 IIS_Sales_Amount: number, // 發票金額 IIS_Check_Number: string, // 驗證碼 IIS_Carrier_Type: "1" | "2" | "3", // 載具類別 IIS_Carrier_Num: string, // 載具編號 IIS_Love_Code: string, // 捐贈碼 IIS_IP: string, // 客戶端 IP IIS_Create_Date: string, // 發票開立時間 IIS_Issue_Status: "0" | "1" IIS_Invalid_Status: "0" | "1" IIS_Upload_Date: string, // 發票上傳時間 IIS_Turnkey_Status: "C" | "E" | "G" | "P" IIS_Remain_Allowance_Amt: number, // 剩餘可折讓金額 IIS_Print_Flag: "0" | "1", // 列印註記 IIS_Award_Flag: number Items: IssueItem[], IIS_Random_Number: string, // 隨機碼 InvoiceRemark: string, // 備註 PosBarCode: string, // 條碼 QrCode_Left: string, // QRCode 左半部 QrCode_Right: string, // QRCode 右半部 } } export type GetInvalidInput = { MerchantID: string, RelateNumber: string, InvoiceNo: string, InvoiceDate: string, } export type GetInvalidOutput = { "RtnCode": number, "RtnMsg": string, "ChannelPartner": string, "IIS_Mer_ID": string, "II_Invoice_No": string, "II_Date": string, "II_Upload_Status": "0" | "1", "II_Upload_Date": string, "Reason": string, "II_Seller_Identifier": string, "II_Buyer_Identifier": string, }