为了: 管理员
使用管理密钥读取发票
列出您所在中心已发布的发票,并阅读其中一张发票,包括金额、付款和退款情况,以便您进行会计核算或报告。
在本文中4 个部分
开始之前
此页面介绍了如何阅读发票信息。相关操作路径位于https://prd-api-manage.caseactive.com/v1/<hub id>之下。“关键功能”可以查看每个案例中的所有已发布发票,包括已结清的发票,但无法创建、修改、退款或支付任何发票。
电话
| 称呼 | 它的作用 |
|---|---|
GET /invoices | 按日期排序的发票列表,最新的一行在最上方。 |
GET /invoices/<case_id>/<invoice_id> | 阅读了一份发票 |
| 范围 | 它的作用 | 必需的 | 默认 |
|---|---|---|---|
status | 只有具有以下状态的开票才符合要求:open、paid、void、uncollectible或processing | 不 | 全部 |
case_id | 只有一单案件的发票需要处理。 | 不 | 每个案例都不同。 |
limit | 每页最多可以显示1000张发票。 | 不 | 20 |
start_key | 上一页中的startKey | 不 | 首页 |
虽然还有更多的发票需要处理,请继续联系我们。 nextLink, 或者发送 startKey 因为 start_key. 此列表没有按日期进行筛选的功能,也无法查看发票最后一次修改的时间。如果你想了解自上次同步以来发生的所有变更,包括付款和退款情况,请进行搜索吧。 case_invoices 包含……的表格 filter_by=updated_on:> 接下来是最后一次同步在Unix时间上的时间点。一旦更改被保存后,它会在几秒钟后生效,因此每个窗口的启动时间应略早于前一个窗口结束的时间。请添加这些时间信息吧。 filter_by=refund_status:=succeeded 为了获得退款。请参见相关说明。 使用管理键搜索案件和用户.
发票
每一金额都是整数美分数:96300相当于963美元。
{
"data": {
"case_id": "cc-1a2b3c4d5e6f70",
"invoice_id": "invoice::20260915143000_ab12cd34ef5678",
"host_id": "ca-7e6d5c4b3a2f10",
"name": "September legal services",
"description": "Consultation and filing for Jane Sample's claim",
"invoice_number": "INV-1042",
"po_number": "PO-778",
"terms": "Net 15",
"host_ref_id": "acct-1042",
"notes": "Thank you for your business.",
"participants_ids": ["cu-4f1c2a9e8b7d60"],
"user_id": "cu-9d8c7b6a5f4e30",
"status": "paid",
"due_date": "2026-09-30T17:00:00+00:00",
"transactions": {
"transactions": [
{"transaction_type": "charge", "description": "Consultation (hours)", "value": 35000, "quantity": 2, "currency": "usd"},
{"transaction_type": "charge", "description": "Court filing fee", "value": 30000, "quantity": 1, "currency": "usd"}
],
"discount": 0.1,
"tax": 0.07
},
"subtotal": 100000,
"discount": 0.1,
"discount_amount": 10000,
"discounted_amount": 90000,
"tax": 0.07,
"tax_amount": 6300,
"total": 96300,
"payment_gateway": "stripe",
"stripe_payment": {"user_id": "cu-4f1c2a9e8b7d60", "fees": 2863, "stripe_fee": 2823, "application_fee": 40, "net": 93437},
"payment_attempts": [{"datetime": "2026-09-20T14:05:12+00:00", "success": true, "user_id": "cu-4f1c2a9e8b7d60"}],
"completed_on": "2026-09-20T14:05:20+00:00",
"published": 1,
"created_on": "2026-09-15T14:30:00+00:00",
"updated_on": "2026-09-20T14:05:20+00:00"
}
}
| 场地 | 它包含什么 |
|---|---|
invoice_id, case_id | 这份发票,以及用来装它的箱子。请同时阅读这两份文件。 |
name, description | 其标题和描述 |
invoice_number, po_number, terms, notes, host_ref_id | 已按照要求填写在发票上。host_ref_id是其参考编号。 |
participants_ids | 被宣传为适用于这些人的产品/服务 |
user_id | 是谁创造了它? |
status | open:等待付款中。 paid:已在线支付或标记为已支付。 void:已取消。 uncollectible和processing:由您的员工自行设定。 paid和void为最终确认结果。 |
due_date | 当那一天到来时 |
transactions | 其格式如下:每个元素都是charge或credit,同时包含description、以美分表示的value以及quantity;此外还规定了相应的费率。 |
subtotal | 先扣除费用,再计算信用额,总额始终不会低于0 |
discount, discount_amount, discounted_amount | 折现率以分数形式表示:0.1 是10%),折扣后的金额,以及扣除折扣后的总计金额。 |
tax, tax_amount | 税率以分数形式表示:0.07 为7%),而扣除折扣后的金额所缴纳的税款则以美分为单位表示。 |
total | 应支付的金额,以美分为单位 |
payment_gateway | 在线上支付时,结果为stripe;当员工确认已支付款项时,结果为manual |
stripe_payment | 对于在线支付而言,需要明确以下信息:是谁进行了支付?支付的费用是多少?最终的金额以美分为单位是多少? |
payment_attempts | 每个人都试图在线支付:何时能够支付、是否成功,以及为什么没有成功。 |
refunded | 如有退款情况,退款金额将以status(pending、succeeded、failed或canceled)表示,其余金额则以分为单位显示在amount位上,具体数值则通过reason来表示。发票本身的状态则保持为paid不变。 |
completed_on | 当该款项被支付或撤销后 |
如果电话被拒绝
| 地位 | message | 为什么 |
|---|---|---|
| 404 | InvoiceDoesNotExistException | 那个箱子上没有包含有该识别码的发票,在你的中心系统中也没有记录。 |
| 400 | InvoiceNotPublishedException | 这张发票实际上是一张汇票。 |
| 400 | SchemaFieldsException | status并不在五个之中。 |
| 400 | InvalidStartKeyException | start_key并不在这份名单上 |
关于错误 bodies 以及其他代码格式,请参考 处理 API 错误和状态代码 的相关说明。