首页龙虾技能列表 › 发票查验(invoice-verify) - 慧穗云 — 技能工具

🧾 发票查验(invoice-verify) - 慧穗云 — 技能工具

v1.0.1

使用慧穗云发票查验 API,根据发票代码、号码、日期和金额等信息查询发票详情。

1· 257·0 当前·0 累计
by @xiaoyierle (小毅尔勒)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/9
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, environment variables, and runtime instructions are coherent with an invoice-verification integration for 慧穗云; no signs of data-exfiltration or unrelated privileges were found, though there are small inconsistencies to fix before use.
评估建议
This skill appears to do what it says: it uses your HSY AK/SK to obtain a token and call 慧穗云's invoice-check API. Before installing: (1) confirm you trust huisuiyun.com and are comfortable providing HSY_AK/HSY_SK to this skill; (2) note the script requires the Python 'requests' package although only 'python3' is declared—install or vendor that dependency; (3) be aware HSY_API_URL and HSY_TYPE are used (with defaults) but not listed as required env vars in metadata—set them explicitly if you use ...
详细分析 ▾
用途与能力
Name/description match the requested credentials (HSY_AK, HSY_SK) and the code calls 慧穗云 token and invoice-check endpoints. No unrelated credentials, binaries, or config paths are requested.
指令范围
SKILL.md instructs running the included Python script with JSON payloads and documents the expected API behavior. The instructions only reference the service endpoints and the configured HSY env vars; they do not read unrelated files or attempt to transmit data to unexpected endpoints.
安装机制
This is instruction-only (no install spec) which is low-risk, but the Python script depends on the third-party 'requests' package while the skill only declares 'python3' as a required binary. That mismatch may cause runtime failure if 'requests' is not available and should be clarified or the dependency declared.
凭证需求
Required secrets HSY_AK and HSY_SK are appropriate for the stated API usage. The script also reads HSY_API_URL and HSY_TYPE (with sensible defaults), but SKILL metadata did not declare HSY_API_URL or HSY_TYPE as required env vars—this mismatch should be documented. No unrelated secrets are requested.
持久化与权限
The skill does not request permanent presence (always:false) and does not modify other skills or system settings. It simply makes outbound HTTPS calls to the configured API.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/9

- 文档新增了慧穗云 AK/SK 获取地址说明,便于用户快速获取 API 密钥。 - 明确提示:缺少环境变量时,脚本会返回带有获取链接的错误信息,优化新手指引体验。 - 返回参数“invoiceStatus”补充了更多取值,新增了部分(7)、全额(8)、待确认(80)红冲等状态说明。 - 接口文档链接格式优化,查验接口说明更简洁明了。

● 无害

安装命令 点击复制

官方npx clawhub@latest install invoice-verify-hsy
镜像加速npx clawhub@latest install invoice-verify-hsy --registry https://cn.clawhub-mirror.com

技能文档

发票查验-慧穗云(Invoice Verify)

基于慧穗云官方 API 的发票查验技能,支持通过发票代码、号码、开票日期、金额等信息查验发票真伪。

环境变量配置

# Linux / macOS
export HSY_API_URL="https://huisuiyun.com"
export HSY_AK="your_ak_here"
export HSY_SK="your_sk_here"
export HSY_TYPE="2"  # 1: ISV等级AKSK, 2: 慧穗云等级AKSK

# Windows PowerShell $env:HSY_API_URL="https://huisuiyun.com" $env:HSY_AK="your_ak_here" $env:HSY_SK="your_sk_here" $env:HSY_TYPE="2"

获取 AK/SK:

  • 慧穗云秘钥管理:https://huisuiyun.com/account/conf/secretkey

注意: 如果未配置环境变量,脚本会返回包含配置链接的错误信息,方便用户快速获取秘钥。

脚本路径

脚本文件:skills/invoice-verify-hsy/invoice-verify-hsy.py

使用方式

1. 查验发票信息

通过 /api/v2/agent/cdk/invoice/check 接口查验增值税发票接口文档

python3 skills/invoice-verify-hsy/invoice-verify-hsy.py verify '{"storeFlag":0,"invoiceList":[{"invoiceCode":"3300201130","invoiceNo":"00517731","amount":7559.41,"drewDate":"2021-06-22","invoiceType":"01"}]}'

请求 JSON 示例:

{
  "storeFlag": 0,
  "invoiceList": [
    {
      "invoiceCode": "3300201130",
      "invoiceNo": "00517731",
      "amount": 7559.41,
      "drewDate": "2021-06-22",
      "invoiceType": "01"
    }
  ]
}

请求参数(verify)

字段名类型必填说明
storeFlagInteger入库标识:0-入库,1-不入库,默认不入库
invoiceListarray发票信息集合(一次查验不超过20张)
invoiceList 数组中每个对象的字段:

字段名类型必填说明
invoiceNoString发票号码,如:00517731
drewDateString开票日期,格式:YYYY-MM-DD,如:2021-06-22
invoiceCodeString发票代码,如:3300201130(全电发票无需传入)
invoiceTypeString发票类型:01-增值税专用发票,08-增值税专用发票(电子),04-增值税普通发票,10-增值税普通发票(电子),09-数电发票(增值税专用发票),90-数电发票(普通发票)等
amountBigDecimal金额:专票(01、08、85)传入不含税金额,数电发票(09、90、51、61)传入价税合计
checkCodeString校验码后六位,普票(04、10、11、14、86)必传
originFileFlagInteger是否获取版式文件:1-是,0-否
exten1-10String扩展字段1-10

返回结果示例(verify)

{
  "code": "200",
  "message": "OK",
  "serialNo": "637680840671330304",
  "data": [
    {
      "checkFlag": true,
      "invoiceCodeNo": "3300201130-00517731",
      "exceptionInfo": null,
      "invoiceVO": {
        "invoiceType": "01",
        "invoiceCode": "3300201130",
        "invoiceNo": "00517731",
        "drewDate": "2021-06-22",
        "checkCode": "56660956691714098653",
        "amount": 7559.41,
        "amountWithTax": 7635,
        "taxAmount": 75.59,
        "sellerName": "杭州江湖有旅人*****公司",
        "sellerTaxNo": "91330100MA2H3LL62A",
        "purchaserName": "慧穗数字科技(上海)**司",
        "purchaserTaxNo": "91330108****U",
        "invoiceStatus": 0,
        "detailList": [
          {
            "goodsName": "设计服务*活动策划",
            "amount": 7559.41,
            "taxRate": 1,
            "taxAmount": 75.59
          }
        ]
      }
    }
  ]
}

返回参数说明

参数名类型说明
codeString返回状态码:200-成功
serialNoString返回流水号
messageString返回信息
dataArray查验返回的信息数组
data[i].checkFlagBoolean查验是否成功:true-成功,false-失败
data[i].invoiceCodeNoString查验的发票代码+号码
data[i].exceptionInfoString查验失败的异常信息
data[i].invoiceVOObject票面信息(查验成功时返回)
invoiceVO.invoiceStatusInteger发票状态:0-正常,1-作废,2-红冲,3-失控,4-异常,7-部分红冲,8-全额红冲,80-红冲发票待确认
invoiceVO.amountDecimal不含税金额
invoiceVO.amountWithTaxDecimal含税金额
invoiceVO.taxAmountDecimal税额
invoiceVO.sellerNameString销方名称
invoiceVO.sellerTaxNoString销方税号
invoiceVO.purchaserNameString购方名称
invoiceVO.purchaserTaxNoString购方税号
invoiceVO.detailListArray发票明细

常见错误码

错误码说明
200查验成功
501连接超时,请稍后重试
其他详见接口返回的 message

注意事项

  • 本接口支持多发票查验,一次查验张数应不大于20张
  • 同一张票每天最多可以查验5次
  • Token 有效期为30天,超出有效期后需重新获取
  • 全电发票查验时发票类型必填
  • 专票传入不含税金额,数电发票传入价税合计
  • 普票必须传入校验码后六位

在 OpenClaw 中的推荐用法

  • 用户提供发票信息(发票代码、号码、开票日期、金额等)
  • 代理构造 JSON 请求体,根据发票类型填写相应的必填字段
  • 调用:python3 skills/invoice-verify-hsy/invoice-verify-hsy.py verify ''
  • 从返回结果中读取查验状态和发票详细信息,并向用户总结发票是否有效及关键信息

如需了解更多欢迎扫码联系

!image

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务