ezpay-invoice-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

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'     // 作廢原因
)

Readme

Keywords

Package Sidebar

Install

npm i ezpay-invoice-js

Weekly Downloads

24

Version

1.0.12

License

MIT

Unpacked Size

27.3 kB

Total Files

10

Last publish

Collaborators

  • waynehavbitx