Skip to content

What-if Record payment dispute (rollup delta)

POST
/v1/actions/hospitality.action.record_payment_dispute/whatif
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.record_payment_dispute/whatif \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "amount": { "amount": "example", "currency": "example" }, "card_brand": "example", "charge_still_refundable": true, "closed_at": "2026-04-15T12:00:00Z", "dispute_fee": { "amount": "example", "currency": "example" }, "evidence_due_by": "2026-04-15T12:00:00Z", "evidence_past_due": true, "evidence_submitted_at": "2026-04-15T12:00:00Z", "funds_reinstated_at": "2026-04-15T12:00:00Z", "funds_withdrawn_at": "2026-04-15T12:00:00Z", "has_evidence": true, "network_reason_code": "example", "observed_at": "2026-04-15T12:00:00Z", "opened_at": "2026-04-15T12:00:00Z", "psp_dispute_reference": "example", "reason": "bank_cannot_process", "status": "inquiry_needs_response", "submission_count": 1, "visa_ce3_required_actions": [ "missing_customer_identifiers" ], "visa_ce3_status": "requires_action" }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.payment" } }'

What-if projection of apply_hospitality_action_record_payment_dispute — 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.record_payment_dispute: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
Disputed amount
object
amount
required
string format: decimal
currency
required
string format: iso-4217
card_brand
The disputed card's brand as the processor reports it
string
charge_still_refundable
Whether the disputed payment can still be refunded
boolean
closed_at
Closed at
string format: date-time
dispute_fee
What the processor charged for the case, net of any fee a win returned
object
amount
required
string format: decimal
currency
required
string format: iso-4217
evidence_due_by
Evidence deadline
string format: date-time
evidence_past_due
Whether the last submission reached the processor after the deadline
boolean
evidence_submitted_at
Evidence submitted at
string format: date-time
funds_reinstated_at
Funds reinstated at
string format: date-time
funds_withdrawn_at
Funds withdrawn at
string format: date-time
has_evidence
Whether the processor holds evidence for the case (staged or submitted)
boolean
network_reason_code
The card network's reason code for the case
string
observed_at
required
When the processor reported this state (the event's own timestamp, never the time of the call)
string format: date-time
opened_at
required
Opened at
string format: date-time
psp_dispute_reference
required
The processor's own id for the case — the upsert key
string
reason
required
Reason
string
Allowed values: bank_cannot_process check_returned credit_not_processed customer_initiated debit_not_authorized duplicate fraudulent general incorrect_account_details insufficient_funds noncompliant product_not_received product_unacceptable subscription_canceled unrecognized
status
required
Status
string
Allowed values: inquiry_needs_response inquiry_under_review inquiry_closed needs_response under_review won lost prevented
submission_count
Evidence submission count
integer
visa_ce3_required_actions
What the processor says the case still lacks for Visa CE 3.0
Array<string>
Allowed values: missing_customer_identifiers missing_disputed_transaction_description missing_merchandise_or_services missing_prior_undisputed_transaction_description missing_prior_undisputed_transactions
visa_ce3_status
The processor's Visa Compelling Evidence 3.0 status for the case
string
Allowed values: requires_action qualified not_qualified
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.payment

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.