Skip to content

What-if Add check payment (rollup delta)

POST
/v1/actions/hospitality.action.add_check_payment/whatif
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.add_check_payment/whatif \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "amount": { "amount": "example", "currency": "example" }, "authorised_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "credential_token": "example", "external_ref": "example", "folio_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "guest_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "override_reason": "example", "paid_at": "2026-04-15T12:00:00Z", "poiid": "example", "psp_reference": "example", "reservation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tender": "room_charge", "tendered": { "amount": "example", "currency": "example" }, "terminal_transaction_id": "example", "tip": { "amount": "example", "currency": "example" } }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.guest_check" } }'

What-if projection of apply_hospitality_action_add_check_payment — previews the action (execute-and-roll-back) and folds its would-be events into rollup deltas, returning the contribution an apply would make to the daily_rooms fact (ADR / RevPAR / TRevPAR / Occupancy inputs) without persisting anything. Requires the same actions:hospitality.action.add_check_payment:apply scope as apply. An action that emits no rooms-fact events yields an empty daily_rooms.

Media typeapplication/json
object
branch

Apply against an open branch’s overlay view instead of the canonical (main) plane. The action’s writes land in the branch’s copy-on-first-write overlay, its events in the branch’s own stream, and the invocation is journaled for merge-by-replay. Branch writes are action-only, so this is the write-side entry point to a branch (POST /v1/branches forks one).

string format: uuid
params
required
object
amount
required
Applied to the check (tip excluded); cash may exceed the balance and gives change
object
amount
required
string format: decimal
currency
required
string format: iso-4217
authorised_by
Confirms the overriding manager (optional; with override_reason): must be the staff member signed in — the override's authoriser is always the session's own, never one named here
string format: uuid
credential_token
The tapped room key's token (required for charge_to_key) — resolved server-side to its in-house stay and folio
string
external_ref
Source-system key for a replayed / connector-landed payment (replay key)
string
folio_id
Folio to post to (required for room_charge; for charge_to_key the key names it, and any other is refused)
string format: uuid
guest_id
The guest the server confirmed — the reservation's guest (room_charge and charge_to_key)
string format: uuid
override_reason
Override the stay's no-post or credit refusal, and why (room_charge and charge_to_key) — taken under a manager's own session: an F&B manager, a front-office supervisor, the manager on duty, the general manager or the owner, active at the check's house
string
paid_at
When the payment was taken — business time (defaults to now)
string format: date-time
poiid
The terminal (POIID) a card payment was taken on
string
psp_reference
The processor's reference for a card payment (Adyen pspReference)
string
reservation_id
The reservation the folio is a window of (required for room_charge; for charge_to_key the key names it)
string format: uuid
tender
required
Tender
string
Allowed values: room_charge cash card comp external charge_to_key
tendered
Cash handed over (cash only; defaults to amount)
object
amount
required
string format: decimal
currency
required
string format: iso-4217
terminal_transaction_id
The terminal's own transaction id for a card payment
string
tip
Tip (card, room_charge and charge_to_key only)
object
amount
required
string format: decimal
currency
required
string format: iso-4217
return_modified

When true, the response carries modified_objects and modified_links projections — the engine reads the event log inside the same transaction so the projection observes the handler’s own writes.

boolean
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.guest_check

Rollup deltas the action would contribute, computed and rolled back.

Media typeapplication/json
object
daily_rooms
required

Per (property, business_date) additive contribution to the rooms rollup.

Array<object>
object
business_date
required
string format: date
currency

ISO 4217, when the fold observed one.

string
property_id
required
string format: uuid
rooms_revenue_net_delta
required

Decimal, net rooms revenue delta.

string
rooms_sold_delta
required
integer format: int64
total_revenue_net_delta
required

Decimal, net total revenue delta.

string
Examplegenerated
{
"daily_rooms": [
{
"business_date": "2026-04-15",
"currency": "example",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rooms_revenue_net_delta": "example",
"rooms_sold_delta": 1,
"total_revenue_net_delta": "example"
}
]
}
Cache-Control
string
Allowed value: no-store

Always no-store — derived, uncommitted data.

Validation error — the apply would be rejected.