1.0.12 • Published 10 months ago

ezpay-invoice-js v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

ezPay Invoice SDK js CI codecov

ezPay 發票 SDK

Installation

yarn add ezpay-invoice-js

Usage

Create SDK Instance (ES5)

const EzpayInvoiceClient = require("ezpay-invoice-js");
const client = new EzpayInvoiceClient({
  merchantId: "ezPay Invoice Merchant ID",
  hashKey: "ezPay Invoice Hash Key",
  hashIV: "ezPay Invoice Hash IV",
  env: "production", // 'sandbox' | 'production'
});

Create SDK Instance (ES6)

import EzpayInvoiceClient from "ezpay-invoice-js";
const client = new EzpayInvoiceClient({
  merchantId: "ezPay Invoice Merchant ID",
  hashKey: "ezPay Invoice Hash Key",
  hashIV: "ezPay Invoice Hash IV",
  env: "production", // 'sandbox' | 'production'
});

開立發票 Issue invoice

詳情請見官方文件:文件網址

await client.issueInvoice({
  
})

作廢發票 Revoke invoice

詳情請見官方文件:文件網址

await client.revokeInvoice(
  'invoice number',   // 發票號碼 
  'invoke reason'     // 作廢原因
)

開立折讓 Issue allowance

詳情請見官方文件:文件網址

await client.issueAllowance({
  
})

作廢折讓 Revoke allowance

詳情請見官方文件:文件網址

await client.revokeAllowance(
  'allowance number',   // 折讓號碼
  'invoke reason'     // 作廢原因
)
1.0.12

10 months ago

1.0.11

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.10

12 months ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago