POST /admin/billing/invoice/{invoice_number}/credit-note
对已有发票开具红字冲销发票,用于退款、折扣等负向金额调整。参考:GAAP/IFRS (Double-Entry Accounting Principles)。
计费服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
invoice_number |
path |
string |
Yes |
|
|
|
原发票编号 |
Request Body
Schema: dto.CreditNoteRequest
| Field | Type | Required | Example | Constraints | Description |
amount |
number |
Yes |
99 |
|
|
invoice_number |
string |
Yes |
INV-2026-001 |
|
|
reason |
string |
Yes |
服务取消 |
|
|
Referenced Schemas
dto.CreditNoteDetailResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.CreditNoteResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.CreditNoteResponse
| Field | Type | Required | Example | Constraints | Description |
amount |
number |
No |
99 |
|
|
applied_at |
string |
No |
2026-04-15T12:00:00Z |
|
|
credit_note_number |
string |
No |
CN-2026-001 |
|
|
invoice_number |
string |
No |
INV-2026-001 |
|
|
issued_at |
string |
No |
2026-04-15T10:00:00Z |
|
|
reason |
string |
No |
服务取消 |
|
|
status |
string |
No |
issued |
|
|
tenant_id |
string |
No |
tnt_abc123 |
|
|