{"lexicon":1,"id":"tickets.atmosphere.createTicketHold","defs":{"main":{"type":"procedure","description":"Atomically reserve ticket capacity and return an ATM checkout URL. Exactly one of eventId or eventUri identifies the event. Requires app service-auth. Signed-in app buyers must supply buyerDid and buyerAssertionJwt together; omit both for guest checkout.","input":{"encoding":"application/json","schema":{"type":"object","required":["items"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"eventId":{"type":"string","minLength":1,"maxLength":300},"eventUri":{"type":"string","format":"at-uri"},"buyerDid":{"type":"string","format":"did","description":"Signed-in buyer DID. Must be accompanied by buyerAssertionJwt; omit both fields for guest checkout. ATM-hosted Tickets OAuth identity is resolved only from ATM's private server session and is never accepted through this field."},"buyerAssertionJwt":{"type":"string","description":"Short-lived user service-auth JWT from buyerDid to ATM, scoped to lxm money.atmosphere.payment.assertPayer. Must be accompanied by buyerDid; omit both fields for guest checkout. ATM verifies it inside the private checkout envelope.","maxLength":8192},"customerEmail":{"type":"string","maxLength":320,"description":"Private delivery/receipt hint for ticket emails. Stored privately by ATM; never written to protocol records."},"offerCode":{"type":"string","minLength":3,"maxLength":64,"description":"Optional organizer offer code. ATM resolves its public terms and enforces private eligibility, schedule, and usage limits while reserving the hold."},"items":{"type":"array","items":{"type":"ref","ref":"tickets.atmosphere.defs#ticketHoldItemRequest"},"minLength":1,"maxLength":20},"returnUrl":{"type":"string","format":"uri","maxLength":2000},"cancelUrl":{"type":"string","format":"uri","maxLength":2000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200},"metadata":{"type":"unknown"}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["holdId","token","url","expiresAt","amount","currency","items"],"properties":{"holdId":{"type":"string","maxLength":300},"token":{"type":"string","maxLength":500},"url":{"type":"string","format":"uri","maxLength":2000},"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"expiresAt":{"type":"string","format":"datetime"},"amount":{"type":"integer","minimum":0,"description":"Final buyer checkout amount in minor units after any order-level offer and passed-through ATM ticket fee. This may differ from the sum of item price snapshots."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"Lowercase ISO 4217 currency code, matching money.atmosphere.price."},"items":{"type":"array","items":{"type":"ref","ref":"tickets.atmosphere.defs#ticketHoldItem"},"minLength":1,"maxLength":20},"reused":{"type":"boolean"}}}},"errors":[{"name":"InvalidBuyerIdentity","description":"buyerDid and buyerAssertionJwt were not supplied together, or trusted and app-supplied buyer identity were combined."},{"name":"AppNotRegistered","description":"Caller DID is not registered as an ATM app."},{"name":"TicketsModuleDisabled","description":"This app has not enabled ATM Tickets."},{"name":"OrganizerNotRegistered","description":"Organizer has not signed in to ATM yet."},{"name":"PaymentSetupIncomplete","description":"Organizer has not finished ATM payment setup."},{"name":"OrganizerConsentRequired","description":"A verified organizer authorization (organizerAssertionJwt) is required to configure ticketing for this organizer."},{"name":"OrganizerReassignmentNotAllowed","description":"This event already belongs to a different organizer; a fresh organizer authorization is required to reassign it."},{"name":"RecipientAppApprovalRequired","description":"The organizer has not approved this app to originate ticket payments."},{"name":"RecipientAppReapprovalRequired","description":"The app's ticket checkout terms changed and require renewed organizer approval."},{"name":"RecipientAppApprovalBlocked","description":"The organizer has blocked or revoked this app's ticket-payment approval."},{"name":"TicketProtocolRefsRequired","description":"Every paid ticket tier requires a portable ticket or catalog reference."},{"name":"InvalidItems","description":"At least one ticket tier is required."},{"name":"InvalidQuantity","description":"Ticket quantity must be at least 1."},{"name":"TicketTierNotFound","description":"One or more ticket tiers were not found."},{"name":"MixedEvents","description":"A ticket hold can only contain tiers from one event."},{"name":"MixedCurrency","description":"A ticket hold can only use one currency."},{"name":"TicketsUnavailable","description":"The tier is not currently on sale."},{"name":"FreeTicketRequiresClaim","description":"Free tiers must use tickets.atmosphere.claimFreeTicket."},{"name":"QuantityTooHigh","description":"Requested quantity exceeds the per-order maximum."},{"name":"InsufficientTicketCapacity","description":"Not enough capacity remains for the request."},{"name":"OfferCodeInvalid","description":"The offer code is invalid, unavailable, expired, or does not apply to the requested ticket tier."},{"name":"OfferRequiresSingleTier","description":"An offer code may currently be applied to only one ticket tier per checkout."},{"name":"OfferNotAvailableForPayWhatYouWant","description":"Offer codes cannot be combined with pay-what-you-want ticket pricing."},{"name":"OfferCodeBusy","description":"The offer reservation is contended; retry shortly."},{"name":"IdempotencyKeyConflict","description":"The idempotency key was already used for a different ticket purchase."},{"name":"IdempotencyKeyInFlight","description":"A hold for this idempotency key is already being created; retry to resume it."},{"name":"LiveModeNotEnabled","description":"This app may not create live-environment holds yet."},{"name":"TicketsBusy","description":"The inventory row is contended; retry shortly."}]}}}