Refund payloads
Refund events fire as a refund moves through its lifecycle. The entity that changed arrives under data.object as a RefundFatPayload, wrapped in the standard webhook envelope. The payloads on this page are built from real emitted examples.
Base fields
Every payload extends BaseEventPayload:
| Field | Type | Nullable | Notes |
|---|---|---|---|
object | string | No | Discriminator for the entity. "refund". |
id | string | No | Raw entity UUID, prefixed ref_ in the example. |
workspace_id | string | No | Raw workspace UUID the refund belongs to. |
created_at | datetime | Yes | ISO 8601 creation timestamp. |
Refund fields
In addition to the base fields, a refund carries:
| Field | Type | Nullable | Notes |
|---|---|---|---|
sale_id | string | No | The sale being refunded, prefixed sl_. |
team_member_id | string | Yes | ID of the team member tied to the refund. |
commission_transaction_id | string | Yes | ID of the affected commission transaction. |
team_member | team_member object | Yes | Snapshot of the team member. See edge cases and nested objects. |
commission_transaction | object | Yes | Snapshot of the affected commission transaction at refund time. |
refund_amount | decimal | No | Total refund amount as a decimal string (e.g. "100000.00"). |
remaining_refund | decimal | No | Refund amount still outstanding, as a decimal string. Decreases as the refund completes. |
refund_reason | string | Yes | Free-text reason supplied with the refund. |
status | string | No | pending on creation, partial (and beyond) as it completes. |
created_at | datetime | No | ISO 8601 creation timestamp. |
updated_at | datetime | No | ISO 8601 timestamp of the last change. |
Confirmed wire contract. Money fields (refund_amount, remaining_refund) are decimal strings in major units - "100000.00" is 100,000.00, not minor units. Parse them as decimals, never as integers. The same convention applies to the nested commission_transaction amounts. Timestamps created_at and updated_at are emitted as ISO 8601 strings.
refund.created
Fires the moment a refund is initiated. status is pending and remaining_refund equals the full refund_amount.
Real refund.created payload
Code
refund.completed
Fires as the refund settles. The data.object shape is identical to refund.created, with these differences:
statusbecomespartial(and later, terminal states as the refund fully settles).remaining_refunddecreases - e.g. from"100000.00"to"99107.74"- as portions are applied.updated_atadvances to the settlement time.
Track progress by reading remaining_refund and status on each event rather than assuming arrival order.
Edge cases
- Two team_member shapes (confirmed). The top-level
team_memberis the Variant B shape - it carries{department, is_active}and has nouser_id. Theteam_membernested insidecommission_transactionfollows the commission variant. - Nested team_member is null (confirmed). The
commission_transaction.team_membercan benulleven when the top-levelteam_memberis fully populated. Do not assume the nested member mirrors the top-level one - read each independently and toleratenullon the nested field. - Decimal-string money. Both the refund's own amounts and the nested commission amounts are decimal strings. Treat them as decimals.
