Get an invoice settlement
Reads collected invoice principal and its committed reversal movements.
Reads collected invoice principal and its committed reversal movements.
- Path
GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/invoice_settlements/invoice-settlement - Scope
billing:read - Effect
read— nothing is written. - Collection invoice_settlements
Request
| Field | Type | What it is |
|---|---|---|
name | string | Settlement resource name, ending in the processor invoice ID. Required. |
Response
| Field | Type | What it is |
|---|---|---|
name | string | Canonical settlement resource name. |
uid | string | Stable identifier of the settlement's original journal entry. Output only. |
meta | ResourceMeta | Resource metadata. |
processor_invoice_id | string | Stable processor invoice identifier. Output only. |
livemode | bool | Production when true, sandbox when false. Output only. |
subject | Subject | The billed customer subject. Output only. |
currency_code | string | Currency of the original invoice. Output only. |
paid_time | timestamp | Original processor collection time. Output only. |
gross_collected_minor | uint32 | Original cash collected, including tax. Output only. |
tax_minor | uint32 | Tax included in the original collection. Output only. |
net_principal_minor | uint32 | Original cash collected less tax, before reversals. Output only. |
list_principal_minor | uint32 | Pre-discount, tax-exclusive subtotal, only when proven. Output only. |
movements | InvoiceSettlementMovement[] | Apply each movement ID once for this invoice. Order is not significant. Output only. |
ResourceMeta
| Field | Type | What it is |
|---|---|---|
generation | int64 | Increases by one on every change to spec. Output only. |
etag | string | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only. |
create_time | timestamp | When the Resource was created. Output only. |
update_time | timestamp | When the Resource last changed. Output only. |
delete_time | timestamp | Set while the Resource is being deleted. Output only. |
labels | map<string, string> | Caller-writable, indexed labels (AIP-122 label rules). |
annotations | map<string, string> | Caller-writable, unindexed annotations. |
display_name | string | Caller-writable human-readable name. |
creator | string | The principal that created the Resource. Output only. |
Subject
| Field | Type | What it is |
|---|---|---|
end_user | string | An end user's id (Sylphx Auth, or the app's own OIDC issuer). One of the kind group. |
customer_organization | string | A customer organization's id. One of the kind group. |
InvoiceSettlementMovement
| Field | Type | What it is |
|---|---|---|
movement_id | string | Stable movement identity within the invoice. Output only. |
kind | string | refund, dispute_withdrawn, or dispute_reinstated. Actual debits and credits are recognized independently of dispute lifecycle status. Output only. |
currency_code | string | Currency of this movement, which may differ from invoice currency. Output only. |
principal_minor | uint32 | Positive magnitude. Refunds exclude returned tax. Dispute debits and credits exclude fees and do not reverse the original tax liability. Output only. |
occurred_time | timestamp | Effective time of the committed journal entry (wire JSON: occurred_time). Output only. |
list_principal_minor | uint32 | Tax-exclusive, pre-discount reversal principal in this movement's currency. Omitted without explicit journal evidence; not derived from cash. Do not net movements in a different currency against the original invoice. Output only. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.INVALID_STATE— The Resource is in a state that forbids the call.UNAVAILABLE— The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.
Every error arrives in the body Errors describes.
Examples
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/invoice_settlements/invoice-settlement" \
-H "Authorization: Bearer $SYLPHX_API_KEY"