ecpay-einvoice-ts
Version:
ECPay e-invoice SDK for TypeScript
40 lines (26 loc) • 754 B
Markdown
綠界電子發票API(非官方API)
======
只是用Typescript封裝綠界提供的`電子發票`API,非官方API,僅供參考。
## 使用方式
```bash
npm i ecpay-einvoice-ts
```
## 初始化
```typescript
import ECPay from 'ecpay-einvoice-ts';
const ecpay = ECPay( {
MerchantID: 'Your MerchantID',
HashKey: 'Your HashKey',
HashIV: 'Your HashIV',
BaseURL: 'https://einvoice-stage.ecpay.com.tw' , // 測試環境
});
```
## Example
### 查詢發票
```typescript
const issues = await ecpay.GetIssueList({
// 放置參數,跟官方API一樣
BeginDate: "2023-10-01", EndDate: "2023-10-19", MerchantID: "2000132", NumPerPage: 200, ShowingPage: 1
})
```
...