Skip to content

Preview Record payment dispute (dry-run)

POST
/v1/actions/hospitality.action.record_payment_dispute/preview
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.record_payment_dispute/preview \
--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" } }'

Scenario preview of apply_hospitality_action_record_payment_dispute — runs the action exactly as apply would (validation, handler dispatch, modified-object projection, commit-time cross-link validation) then rolls the transaction back. Returns the modified_objects / modified_links / warnings the apply would have produced without persisting anything or firing any outward effect. Requires the same actions:hospitality.action.record_payment_dispute:apply scope as apply. No Idempotency-Key.

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

Preview computed and rolled back. modified_objects and modified_links carry the effect set the apply would produce; preview is always true.

Media typeapplication/json
ApplyActionResponse

Envelope returned by the Aerandil action engine. correlation_id ties every event emitted by this invocation; modified_objects and modified_links project the events the handler emitted (per the action’s declared effects); warnings carries any non-blocking soft-validator observations.

object
correlation_id
required

Per-invocation correlation id; matches events.correlation_id for every event this action appended.

string format: uuid
modified_links
required

Links established or removed by this invocation. Empty when the caller did not request return_modified.

Array<object>
object
from_id
required
string format: uuid
from_type
required
string
kind
required
Allowed values: linked
link_type
required
Allowed values: hospitality.link.dispute_for_payment hospitality.link.folio_has_payment hospitality.link.payment_refunds_payment hospitality.link.payment_for_reservation
to_id
required
string format: uuid
to_type
required
string
modified_objects
required

Objects created, modified, or soft-deleted by this invocation. Empty when the caller did not request return_modified.

Array<object>
object
id
required
string format: uuid
kind
required
Allowed values: created modified
object_type
required
Allowed values: hospitality.payment_dispute hospitality.payment hospitality.folio hospitality.reservation hospitality.dispute_evidence_packet
warnings

Non-blocking soft-validator observations emitted during this invocation (e.g. comp-authority over-limit, recipe pour-cost over sell-price). Absent when no warnings were emitted.

Array<object>
object
message
required

Human-readable summary, suitable for logging or operator-UI surfacing.

string
object_type
required

Object type the warning was raised against.

string
property

Property the warning anchors to, when a single field is the locus. Absent for multi-field rules.

string
rule
required

Stable kebab-case rule identifier (e.g. comp-authority-over-limit).

string
Example
{
"modified_links": [
{
"kind": "linked",
"link_type": "hospitality.link.dispute_for_payment"
}
],
"modified_objects": [
{
"kind": "created",
"object_type": "hospitality.payment_dispute"
}
]
}
Cache-Control
string
Allowed value: no-store

Always no-store — uncommitted live data.

Conflict — concurrent modification or unique constraint violation the apply would hit.

Validation error — the apply would be rejected.