{"lexicon":1,"id":"money.atmosphere.order.defs","defs":{"financialStatus":{"type":"string","knownValues":["not-required","pending","paid","partially-refunded","refunded","disputed","chargeback","failed","canceled"],"maxLength":32,"description":"Payment-derived financial projection, matching money.atmosphere.event.receive#commerceOrder."},"fulfillmentStatus":{"type":"string","knownValues":["unfulfilled","ready","on-hold","processing","partially-fulfilled","fulfilled","failed","canceled"],"maxLength":32},"fulfillmentStateCause":{"type":"string","knownValues":["payment-failed","payment-disputed","payment-refunded","payment-canceled","payment-chargeback","inventory-capacity-conflict","app-update","recipient-update"],"maxLength":32,"description":"Authority that most recently authored the fulfillment state. inventory-capacity-conflict is an ATM-authored paid exception that remains on hold until explicitly resolved or canceled. Absent means no exceptional transition currently owns that state."},"fulfillment":{"type":"object","description":"App-private fulfillment routing. Contains no buyer contact or shipping data.","required":["mode","ownerAppDid","workflow"],"properties":{"mode":{"type":"string","knownValues":["app-managed","atm-managed"],"maxLength":32},"ownerAppDid":{"type":"string","format":"did"},"workflow":{"type":"string","knownValues":["automatic","manual"],"maxLength":16},"managementUrl":{"type":"string","format":"uri","maxLength":2048}}},"routing":{"type":"object","description":"Exact immutable routing and authority snapshot frozen at checkout. Contains no buyer PII.","required":["version","kind","clientOrderId","salesChannelAppDid","fulfillment","inventoryAuthority","inventoryPolicy"],"properties":{"version":{"type":"integer","minimum":1},"kind":{"type":"string","knownValues":["shop","commission"],"maxLength":32},"clientOrderId":{"type":"string","maxLength":200},"salesChannelAppDid":{"type":"string","format":"did"},"fulfillment":{"type":"ref","ref":"#fulfillment"},"inventoryAuthority":{"type":"string","knownValues":["app","atm"],"maxLength":16},"inventoryPolicy":{"type":"string","knownValues":["finite","unlimited"],"maxLength":16}}},"inventoryReservation":{"type":"object","description":"Immutable evidence that ATM reserved a finite inventory pool in the same transaction that created the order. Live availability remains private ATM state.","required":["id","inventoryRevision","quantity"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"inventoryRevision":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Inventory ledger revision frozen when the hold was created."},"quantity":{"type":"integer","minimum":1,"maximum":999}}},"item":{"type":"object","description":"Bounded item snapshot: catalog identity plus the historical display allowlist frozen at checkout. Never raw checkout metadata.","properties":{"quantity":{"type":"integer","minimum":1},"listing":{"type":"ref","ref":"com.atproto.repo.strongRef"},"productUri":{"type":"string","format":"at-uri"},"variantUri":{"type":"string","format":"at-uri"},"inventoryReservation":{"type":"ref","ref":"#inventoryReservation"},"title":{"type":"string","maxLength":200},"variant":{"type":"string","maxLength":200},"sku":{"type":"string","maxLength":120}}},"order":{"type":"object","description":"Canonical current-order projection for the authorized app. `revision` is the same monotonic fence delivered on signed events, so this read is the durable recovery surface for missed or retention-trimmed event history. No amounts, buyer identity, or processor fields.","required":["id","clientOrderId","paymentId","environment","kind","revision","routing","financialStatus","fulfillmentStatus","createdAt","updatedAt"],"properties":{"id":{"type":"string","maxLength":64},"clientOrderId":{"type":"string","maxLength":200},"paymentId":{"type":"string","maxLength":256},"environment":{"type":"string","knownValues":["live","test"],"maxLength":16},"kind":{"type":"string","knownValues":["shop","commission"],"maxLength":32},"revision":{"type":"integer","minimum":1,"description":"Monotonic canonical state revision. Reject strictly lower revisions as stale, exactly as for signed payment.order events."},"routing":{"type":"ref","ref":"#routing"},"financialStatus":{"type":"ref","ref":"#financialStatus"},"fulfillmentStatus":{"type":"ref","ref":"#fulfillmentStatus"},"fulfillmentStateCause":{"type":"ref","ref":"#fulfillmentStateCause"},"item":{"type":"ref","ref":"#item"},"createdAt":{"type":"string","format":"datetime"},"updatedAt":{"type":"string","format":"datetime"}}},"fulfillmentEvent":{"type":"object","description":"One append-only app-authored fulfillment transition. `revision` is the order revision this event advanced the order to.","required":["id","seq","fromFulfillmentStatus","toFulfillmentStatus","revision","createdAt"],"properties":{"id":{"type":"string","maxLength":64},"seq":{"type":"integer","minimum":1,"description":"Monotonic per-order history sequence."},"fromFulfillmentStatus":{"type":"ref","ref":"#fulfillmentStatus"},"toFulfillmentStatus":{"type":"ref","ref":"#fulfillmentStatus"},"revision":{"type":"integer","minimum":2},"note":{"type":"string","maxLength":1000,"maxGraphemes":1000},"tracking":{"type":"ref","ref":"#tracking"},"createdAt":{"type":"string","format":"datetime"}}},"tracking":{"type":"object","description":"Bounded shipment/delivery reference recorded with a fulfillment transition.","properties":{"carrier":{"type":"string","maxLength":64},"number":{"type":"string","maxLength":128},"url":{"type":"string","format":"uri","maxLength":2048}}}}}