Confirming delivery
Bob ships the headphones. Ishtaran has absolutely no way of knowing that on its own — it doesn't see the outside world. Mercatto, the one who does know, tells it by recording an event.
const result = await owner.events.ingest(
applicationId, workflowVersionId, awaitingDeliveryStateId, transactionId, deliveredEventTypeId,
EventSource.APPLICATION, { source: 'mercatto-fulfillment' },
);
if (result.outcome !== 'Authorized') {
throw new Error(`Delivery event was rejected: outcome=${result.outcome}`);
}
Result
{ "outcome": "Authorized", "fromStateId": "…", "toStateId": "…" }
The order's Workflow state moves from AguardandoEntrega to Entregue.
Read this before you copy this into a real integration
This event is an audit trail and orchestration signal — not a technical gate. Confirmed by
reading the real source: ExecuteSettlementCommandHandler checks only the Transaction's own status
(Reserved/PartiallySettled) — it has zero reference to Workflow, Rule, or Transition anywhere.
Settlement can be called with or without this event ever being
ingested; Ishtaran validates financial invariants, never facts about the physical world.
That means: making sure Settlement only runs after you've genuinely confirmed delivery is your system's job, not Ishtaran's. See Known Limitations §F.1 for the exact finding, and Failure scenarios for what a Settlement without this event actually looks like when it happens.