{"openapi":"3.1.0","info":{"title":"DYLI Commerce API","version":"1.33.0","description":"Build collectibles apps with packs, vaulting, buybacks, shipping, secondary marketplace and P2P trading. Pack checkout supports card or USDC; peer marketplace and trade cash use the customer's Base USDC wallet and DYLI's native contracts. Separate settings include DYLI listings and collectors; new marketplace orders always appear on DYLI. eBay checkout is not included. All endpoints require an app-bound server-side Commerce key. Check capabilities before enabling actions."},"servers":[{"url":"https://dyli-commerce-lab-api-dyli.vercel.app/api/commerce/v1","description":"Isolated Base Sepolia lab. Test assets only."}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"tags":[{"name":"Readiness"},{"name":"Configuration"},{"name":"Catalog"},{"name":"Customers"},{"name":"Quotes"},{"name":"Payments"},{"name":"Orders"},{"name":"Packs"},{"name":"Offers"},{"name":"Community"},{"name":"Gifts"},{"name":"Redemptions"},{"name":"Events"}],"paths":{"/community/gifts":{"post":{"tags":["Gifts"],"operationId":"prepareItemGift","summary":"Prepare a gift to another registered customer in this app","description":"Base only. Checks both verified customer wallets, ownership and item restrictions. No transfer occurs at preparation. Persist the key and gift ID; sign the exact transaction and confirm its transaction hash. Managed wallets may use gift sponsorship.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateItemGiftRequest"}}}},"responses":{"200":{"description":"Gift and verified transfer state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemGiftResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}},"get":{"tags":["Gifts"],"operationId":"listItemGifts","parameters":[{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},{"name":"view","in":"query","schema":{"enum":["all","sent","received"],"default":"all"}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"Up to 25 gifts involving this customer","content":{"application/json":{"schema":{"type":"object","properties":{"gifts":{"type":"array","items":{"$ref":"#/components/schemas/ItemGift"}},"pagination":{"type":"object","additionalProperties":true}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/gifts/{giftId}":{"get":{"tags":["Gifts"],"operationId":"getItemGift","parameters":[{"name":"giftId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Gift and verified transfer state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemGiftResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/gifts/{giftId}/confirm":{"post":{"tags":["Gifts"],"operationId":"confirmItemGift","description":"Verify the exact Base transfer, reference, sender, recipient and quantities. Creates normal DYLI gift records once. Retry the same hash after uncertainty or recording failure; never send again.","parameters":[{"name":"giftId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","tx_hash"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}}}}},"responses":{"200":{"description":"Gift and verified transfer state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemGiftResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/{orderId}/transfer":{"post":{"operationId":"prepareSealedBoxTransfer","tags":["Orders"],"summary":"Prepare transfer of a whole sealed pack checkout to another customer in this app","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"description":"Base only. Both customers need verified Base bindings. Preparation does not change ownership. Sign authorization.message with authorization.wallet_address. Never expose your Commerce key to the browser.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["external_customer_id","recipient_external_customer_id"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"recipient_external_customer_id":{"$ref":"#/components/schemas/ExternalId"}}}}}},"responses":{"200":{"description":"Owner-signed sealed pack transfer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxTransferResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/box-transfers/{transferId}/confirm":{"post":{"operationId":"confirmSealedBoxTransfer","tags":["Orders"],"summary":"Verify the owner signature and atomically transfer the sealed checkout","parameters":[{"name":"transferId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"description":"Opening must not have started. A prior opening authorization must be expired and unused at a finalized block. Confirms idempotently, preserves original payment and quote, and records box.transferred. Retry the same transfer after an uncertain response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["external_customer_id","signature"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}}}}}},"responses":{"200":{"description":"Owner-signed sealed pack transfer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxTransferResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/settings":{"get":{"tags":["Community"],"operationId":"getCommunitySettings","summary":"Read marketplace and trading availability","responses":{"200":{"description":"Current availability and inclusion settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityReadiness"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/market":{"get":{"tags":["Community"],"operationId":"getCommunityMarket","summary":"Read app-scoped listings and offers","parameters":[{"name":"kind","in":"query","required":false,"schema":{"enum":["listing","offer"]}},{"name":"token_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_customer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100000}},{"name":"brand","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"subcategory","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"seller","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"min_price","in":"query","required":false,"schema":{"type":"string","maxLength":80},"description":"Decimal USDC, 0 to 1000000, with up to six decimal places."},{"name":"max_price","in":"query","required":false,"schema":{"type":"string","maxLength":80},"description":"Decimal USDC, 0 to 1000000, with up to six decimal places."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["newest","price_low","price_high"],"default":"newest"}}],"responses":{"200":{"description":"Current on-chain orders, at most 25 per page","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommunityMarketOrder"}},"pagination":{"type":"object","properties":{"offset":{"type":"integer"},"next_offset":{"type":["integer","null"]}}},"include_dyli":{"type":"boolean"},"facets":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"string"},"maxItems":100},"categories":{"type":"array","items":{"type":"string"},"maxItems":100},"subcategories":{"type":"array","items":{"type":"string"},"maxItems":100}}}}}}}},"default":{"$ref":"#/components/responses/Error"}},"description":"Filters and sorting apply before pagination, within the app community scope. Facets are scoped to the visible search and seller results."}},"/community/collectors":{"get":{"tags":["Community"],"operationId":"findCommunityCollectors","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":50}}],"responses":{"200":{"description":"Public collector profiles allowed by this app","content":{"application/json":{"schema":{"type":"object","properties":{"collectors":{"type":"array","items":{"$ref":"#/components/schemas/CommunityCollector"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/collectors/{username}/holdings":{"get":{"tags":["Community"],"operationId":"getCollectorHoldings","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Collector's live visible holdings","content":{"application/json":{"schema":{"type":"object","properties":{"collector":{"$ref":"#/components/schemas/CommunityCollector"},"items":{"type":"array","items":{"type":"object","properties":{"token_id":{"$ref":"#/components/schemas/OfferInteger"},"balance":{"type":"integer"},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"has_more":{"type":"boolean"}}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/trades":{"get":{"tags":["Community"],"operationId":"getCustomerTrades","parameters":[{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["all","incoming","outgoing","history"],"default":"all"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"Incoming and outgoing trades, at most 25 per page","content":{"application/json":{"schema":{"type":"object","properties":{"trades":{"type":"array","items":{"$ref":"#/components/schemas/CommunityTrade"}},"pagination":{"type":"object","properties":{"offset":{"type":"integer"},"next_offset":{"type":["integer","null"]}}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/trades/{tradeId}/decline":{"post":{"tags":["Community"],"operationId":"declineCommunityTrade","description":"Receiver only. Updates DYLI's inbox without transferring funds. Does not cancel the sender's on-chain order.","parameters":[{"name":"tradeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OfferInteger"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"}}}}}},"responses":{"200":{"description":"Declined trade","content":{"application/json":{"schema":{"type":"object","properties":{"trade_id":{"$ref":"#/components/schemas/OfferInteger"},"status":{"const":"declined"},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/actions":{"post":{"tags":["Community"],"operationId":"prepareCommunityAction","summary":"Prepare a customer-signed marketplace or P2P action","description":"Persist the Idempotency-Key and body. Approve returned permissions, then sign the exact transaction. Does not reserve stock or move assets by itself.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityActionInput"}}}},"responses":{"200":{"description":"Prepared or existing action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityActionResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}},"get":{"tags":["Community"],"operationId":"listCommunityActions","parameters":[{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Latest 50 customer actions","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/CommunityAction"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/actions/{actionId}":{"get":{"tags":["Community"],"operationId":"getCommunityAction","parameters":[{"name":"actionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"responses":{"200":{"description":"App-scoped action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityActionResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/community/actions/{actionId}/confirm":{"post":{"tags":["Community"],"operationId":"confirmCommunityAction","parameters":[{"name":"actionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"description":"Verify exact sender, target, calldata and receipt before native DYLI settlement. Can reconcile after preparation expiry. Retry requires_action using the same hash, never send a second transaction.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"description":"Confirmed action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityActionResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/offers/query":{"post":{"operationId":"queryCustomerDyliOffers","tags":["Offers"],"summary":"Discover customer-specific post-vault DYLI offers","description":"Requires write scope. May generate a buyback bid using the native DYLI discovery rules, without selling the item. Only DYLI offers are exposed; current ownership is checked. Initial claim deadlines are never extended. Preparation is required for final eligibility checks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferQueryRequest"}}}},"responses":{"200":{"description":"Customer offers","content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","token_id","offers"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"offers":{"type":"array","items":{"$ref":"#/components/schemas/DyliOffer"}},"ownership":{"type":"object","required":["owned","balance"],"description":"Live synchronized-wallet ownership. Zero balance returns an empty offers list with HTTP 200; preparation still requires ownership. Upstream failures remain errors.","properties":{"owned":{"type":"boolean"},"balance":{"$ref":"#/components/schemas/OfferInteger"}}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/offer-acceptances":{"post":{"operationId":"prepareOfferAcceptance","tags":["Offers"],"summary":"Prepare a customer-signed DYLI offer acceptance","description":"Revalidates native sale rules and the on-chain bid, and persists a recoverable acceptance. No sale occurs until the customer signs the returned transaction. Send any approval_transaction first and wait for confirmation. Does not reserve a public bid. Payout overrides and partner fees are unsupported.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferAcceptanceRequest"}}}},"responses":{"200":{"description":"Offer acceptance","content":{"application/json":{"schema":{"type":"object","required":["acceptance"],"properties":{"acceptance":{"$ref":"#/components/schemas/OfferAcceptance"},"idempotent":{"type":"boolean"}}}}}},"201":{"description":"Offer acceptance","content":{"application/json":{"schema":{"type":"object","required":["acceptance"],"properties":{"acceptance":{"$ref":"#/components/schemas/OfferAcceptance"},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"listOfferAcceptances","tags":["Offers"],"parameters":[{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"Customer acceptance history","content":{"application/json":{"schema":{"type":"object","required":["acceptances","pagination"],"properties":{"acceptances":{"type":"array","items":{"$ref":"#/components/schemas/OfferAcceptance"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/offer-acceptances/{acceptanceId}":{"get":{"operationId":"getOfferAcceptance","tags":["Offers"],"parameters":[{"name":"acceptanceId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"responses":{"200":{"description":"Offer acceptance","content":{"application/json":{"schema":{"type":"object","required":["acceptance"],"properties":{"acceptance":{"$ref":"#/components/schemas/OfferAcceptance"},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/offer-acceptances/{acceptanceId}/confirm":{"post":{"operationId":"confirmOfferAcceptance","tags":["Offers"],"parameters":[{"name":"acceptanceId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"description":"Verifies a customer-signed acceptBid receipt and invokes normal DYLI settlement. Timely mined transactions can be confirmed after expiry or loss of item ownership. Retry requires_action with the same hash; never submit a second sale. Completed confirmations are idempotent and reject conflicting hashes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"description":"Offer acceptance","content":{"application/json":{"schema":{"type":"object","required":["acceptance"],"properties":{"acceptance":{"$ref":"#/components/schemas/OfferAcceptance"},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/storefront/limits":{"post":{"tags":["Readiness"],"summary":"Check a shared storefront request budget","description":"Server-only protection using the Commerce key. Separate from normal Commerce read/write quota; capped at 1800 checks/minute. Hash subjects with HMAC-SHA-256 using the server key. Global upstream budgets cannot be partitioned by subject. No payment or order is created. Stop the protected operation on 429 or 503.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["budget","subject_hash"],"properties":{"budget":{"type":"string","enum":["client-read","client-write","customer","upstream-read","upstream-write"]},"subject_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}}}}}},"responses":{"200":{"description":"Request permitted","content":{"application/json":{"schema":{"type":"object","required":["allowed","retry_after_seconds"],"properties":{"allowed":{"const":true},"retry_after_seconds":{"type":"integer","minimum":1,"maximum":60}}}}}},"400":{"description":"Unsupported budget or invalid subject hash"},"401":{"description":"Invalid Commerce key"},"403":{"description":"Commerce membership or application access denied"},"429":{"description":"Budget exceeded; honor Retry-After and preserve pending payments"},"503":{"description":"Protection unavailable; fail closed"}}}},"/bootstrap":{"get":{"operationId":"getCommerceBootstrap","tags":["Configuration"],"summary":"Discover public runtime settings for the selected partner","description":"Server-to-server. Managed auth requires DYLI operator activation; an API key alone does not provision auth or a sandbox. No private auth or wallet credentials are returned.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"}],"responses":{"200":{"description":"Public runtime config; inspect auth.available and root readiness before enabling checkout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceBootstrap"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/wallet/intent":{"post":{"operationId":"managedPackWalletIntent","tags":["Packs"],"summary":"Prepare a sponsored wallet action","description":"Base only. Use the server Commerce key and the current managed-wallet customer token. Supply exactly one pack, gift, marketplace action, offer acceptance, shipping redemption or USDC transfer scope. Saved actions allow only their exact prepared calls and approvals. USDC transfers bind the recipient and exact positive amount. Recovery uses the same scope and saved intent. See /docs/api/commerce-wallet-sponsorship.","parameters":[{"name":"x-customer-access-token","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":16384},"description":"Current Privy wallet access token from this registered managed app. Never log or persist."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","calls","callData"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"box_play_id":{"$ref":"#/components/schemas/Uuid"},"calls":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","required":["to","data"],"properties":{"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"},"value":{"enum":["0",0]}}}},"callData":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"},"item_gift_id":{"$ref":"#/components/schemas/Uuid"},"community_action_id":{"$ref":"#/components/schemas/Uuid"},"offer_acceptance_id":{"$ref":"#/components/schemas/Uuid"},"redemption_id":{"$ref":"#/components/schemas/Uuid"},"transfer":{"type":"object","additionalProperties":false,"required":["id","recipient","amount"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"recipient":{"$ref":"#/components/schemas/EvmAddress"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$","maxLength":78,"description":"Native Base USDC units. 1000000 means 1 USDC."}}}},"oneOf":[{"required":["box_play_id"]},{"required":["item_gift_id"]},{"required":["community_action_id"]},{"required":["offer_acceptance_id"]},{"required":["redemption_id"]},{"required":["transfer"]}]}}}},"responses":{"200":{"description":"Scoped wallet intent result","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/wallet/rpc":{"post":{"operationId":"managedPackWalletRpc","tags":["Packs"],"summary":"Send a scoped wallet operation","description":"Base only. Use the server Commerce key and the current managed-wallet customer token. Supply exactly one pack, gift, marketplace action, offer acceptance, shipping redemption or USDC transfer scope. Saved actions allow only their exact prepared calls and approvals. USDC transfers bind the recipient and exact positive amount. Recovery uses the same scope and saved intent. See /docs/api/commerce-wallet-sponsorship.","parameters":[{"name":"x-customer-access-token","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":16384},"description":"Current Privy wallet access token from this registered managed app. Never log or persist."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","intent","method"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"box_play_id":{"$ref":"#/components/schemas/Uuid"},"intent":{"type":"string","description":"Saved scoped intent token returned by /wallet/intent."},"method":{"type":"string"},"params":{"type":"array","items":{}},"item_gift_id":{"$ref":"#/components/schemas/Uuid"},"community_action_id":{"$ref":"#/components/schemas/Uuid"},"offer_acceptance_id":{"$ref":"#/components/schemas/Uuid"},"redemption_id":{"$ref":"#/components/schemas/Uuid"},"transfer":{"type":"object","additionalProperties":false,"required":["id","recipient","amount"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"recipient":{"$ref":"#/components/schemas/EvmAddress"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$","maxLength":78,"description":"Native Base USDC units. 1000000 means 1 USDC."}}}},"oneOf":[{"required":["box_play_id"]},{"required":["item_gift_id"]},{"required":["community_action_id"]},{"required":["offer_acceptance_id"]},{"required":["redemption_id"]},{"required":["transfer"]}]}}}},"responses":{"200":{"description":"Scoped wallet rpc result","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/wallet/recovery":{"post":{"operationId":"managedPackWalletRecovery","tags":["Packs"],"summary":"Recover a saved sponsored wallet action","description":"Base only. Use the server Commerce key and the current managed-wallet customer token. Supply exactly one pack, gift, marketplace action, offer acceptance, shipping redemption or USDC transfer scope. Saved actions allow only their exact prepared calls and approvals. USDC transfers bind the recipient and exact positive amount. Recovery uses the same scope and saved intent. See /docs/api/commerce-wallet-sponsorship.","parameters":[{"name":"x-customer-access-token","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":16384},"description":"Current Privy wallet access token from this registered managed app. Never log or persist."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","intent"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"box_play_id":{"$ref":"#/components/schemas/Uuid"},"intent":{"type":"string","description":"Saved scoped intent token returned by /wallet/intent."},"id":{"$ref":"#/components/schemas/Uuid"},"resubmit":{"type":"boolean","default":false,"description":"Explicitly resend the same saved signed operation; false only reads recovery."},"item_gift_id":{"$ref":"#/components/schemas/Uuid"},"community_action_id":{"$ref":"#/components/schemas/Uuid"},"offer_acceptance_id":{"$ref":"#/components/schemas/Uuid"},"redemption_id":{"$ref":"#/components/schemas/Uuid"},"transfer":{"type":"object","additionalProperties":false,"required":["id","recipient","amount"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"recipient":{"$ref":"#/components/schemas/EvmAddress"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$","maxLength":78,"description":"Native Base USDC units. 1000000 means 1 USDC."}}}},"oneOf":[{"required":["box_play_id"]},{"required":["item_gift_id"]},{"required":["community_action_id"]},{"required":["offer_acceptance_id"]},{"required":["redemption_id"]},{"required":["transfer"]}]}}}},"responses":{"200":{"description":"Scoped wallet recovery result","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/session":{"post":{"operationId":"verifyManagedCustomerSession","tags":["Customers"],"summary":"Verify customer identity and linked wallet against the configured managed provider","description":"Requires Commerce scope and the normal API key. Customer token is a separate header and is not payment evidence. Identity is derived from verified provider records, not caller-supplied IDs. Does not create a payment, order or customer record.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"x-customer-access-token","in":"header","required":true,"description":"Customer Privy access token. Never persist or log.","schema":{"type":"string","minLength":1,"maxLength":16384}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId","description":"Required for existing login with managed wallets; must equal the customer subject verified by your backend and Privy custom_auth record."}}}}}},"responses":{"200":{"description":"Verified identity for server-side customer sync and ownership checks","content":{"application/json":{"schema":{"type":"object","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ManagedCustomerIdentity"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/":{"get":{"operationId":"getCommerceReadiness","tags":["Readiness"],"summary":"Get partner configuration and runtime capabilities","parameters":[{"$ref":"#/components/parameters/PartnerSlug"}],"responses":{"200":{"description":"Runtime readiness","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/config":{"get":{"operationId":"getPartnerConfig","tags":["Configuration"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"}],"responses":{"200":{"description":"Partner config","content":{"application/json":{"schema":{"type":"object","required":["partner"],"properties":{"partner":{"$ref":"#/components/schemas/PartnerConfig"}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updatePartnerConfig","tags":["Configuration"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerConfigPatch"}}}},"responses":{"200":{"description":"Updated config; webhook_secret is returned once when created or rotated","content":{"application/json":{"schema":{"type":"object","required":["partner"],"properties":{"partner":{"$ref":"#/components/schemas/PartnerConfig"},"webhook_secret":{"type":"string"},"warning":{"type":"string"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/catalog/{surface}":{"get":{"operationId":"getCatalogSurface","tags":["Catalog"],"summary":"Read a partner-filtered catalog surface","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"surface","in":"path","required":true,"schema":{"type":"string","enum":["explore","listings","secondary-listings","packs","boxes","redemptions","ebay","collections","fair-drops","digital-packs","search","options"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"product_id","in":"query","schema":{"type":"integer"}},{"name":"token_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Surface-specific catalog payload. Purchasable rows include purchase.quote_item. Pack rows include optional artwork metadata with public 3D assets; see PackCatalogItem.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/catalog/{surface}/{identifier}":{"get":{"operationId":"getCatalogItem","tags":["Catalog"],"summary":"Read a supported catalog item or collection","description":"Item detail is supported for packs and digital-packs; collection detail uses the collection slug. Pack detail includes optional artwork metadata (PackCatalogItem); the renderer is presentation only.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"surface","in":"path","required":true,"schema":{"type":"string","enum":["packs","boxes","digital-packs","collections"]}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Partner-filtered item payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/customers":{"get":{"operationId":"listCustomers","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"Customers","content":{"application/json":{"schema":{"type":"object","required":["customers","pagination"],"properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/customers/{externalCustomerId}/wallet-authorizations":{"post":{"operationId":"prepareCustomerWalletRegistration","tags":["Customers"],"summary":"Prepare a customer-signed Base wallet registration","description":"Authenticate the customer in your backend and check wallet_registration readiness. Sign the exact returned message with the stated wallet. No payment or transaction is authorized. Ordinary EVM wallets and Base EIP-7702 delegation are supported.","parameters":[{"name":"externalCustomerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet_address"],"properties":{"wallet_address":{"$ref":"#/components/schemas/EvmAddress"}}}}}},"responses":{"200":{"description":"Ten-minute wallet message authorization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerWalletAuthorizationResponse"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/customers/{externalCustomerId}/wallet-authorizations/{authorizationId}/confirm":{"post":{"operationId":"confirmCustomerWalletRegistration","tags":["Customers"],"summary":"Verify wallet ownership and link the DYLI customer profile","description":"Preserves existing customer IDs and usernames or creates a generated DYLI profile. Retry the same signature after an uncertain response; completed repeats are idempotent. No funds move. A prior account with balances or pending purchases requires review.","parameters":[{"name":"externalCustomerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},{"name":"authorizationId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]{130}$"}}}}}},"responses":{"200":{"description":"Linked customer and public DYLI profile","content":{"application/json":{"schema":{"type":"object","required":["customer","profile","idempotent"],"properties":{"customer":{"$ref":"#/components/schemas/Customer"},"profile":{"type":"object","required":["username","name","profile_url"],"properties":{"username":{"type":"string"},"name":{"type":"string"},"profile_url":{"type":"string","format":"uri"}}},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/customers/{externalCustomerId}":{"put":{"operationId":"putCustomer","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/ExternalCustomerId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInput"}}}},"responses":{"200":{"description":"Synchronized customer","content":{"application/json":{"schema":{"type":"object","required":["customer"],"properties":{"customer":{"$ref":"#/components/schemas/Customer"}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"getCustomer","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/ExternalCustomerId"}],"responses":{"200":{"description":"Customer","content":{"application/json":{"schema":{"type":"object","required":["customer"],"properties":{"customer":{"$ref":"#/components/schemas/Customer"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/analytics":{"get":{"operationId":"getCommerceAnalytics","summary":"Private application orders, pack profit and earnings","description":"Server-to-server, scoped to the key's app. Do not expose owner financials to storefront customers. Totals cover all history; only the orders array is paginated. Profile aggregates all the owner's apps and uses the existing Claim flow.","tags":["Configuration"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Commerce report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceAnalytics"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/quotes":{"post":{"operationId":"createQuote","tags":["Quotes"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Quote"},"201":{"$ref":"#/components/responses/Quote"},"default":{"$ref":"#/components/responses/Error"}}}},"/quotes/{quoteId}":{"get":{"operationId":"getQuote","tags":["Quotes"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/QuoteId"}],"responses":{"200":{"$ref":"#/components/responses/Quote"},"default":{"$ref":"#/components/responses/Error"}}}},"/quotes/{quoteId}/payment-authorization":{"post":{"operationId":"createPaymentAuthorization","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/QuoteId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAuthorizationRequest"}}}},"responses":{"200":{"description":"Exact message for the payer to sign","content":{"application/json":{"schema":{"type":"object","required":["authorization"],"properties":{"authorization":{"$ref":"#/components/schemas/PaymentAuthorization"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/quotes/{quoteId}/stripe-checkout":{"post":{"operationId":"createStripeCheckout","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/QuoteId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCheckoutRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/StripeCheckout"},"201":{"$ref":"#/components/responses/StripeCheckout"},"default":{"$ref":"#/components/responses/Error"}}}},"/stripe-checkouts/{paymentSessionId}":{"get":{"operationId":"getStripeCheckout","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/PaymentSessionId"}],"responses":{"200":{"$ref":"#/components/responses/StripeCheckout"},"default":{"$ref":"#/components/responses/Error"}}}},"/stripe-checkouts/resolve":{"get":{"operationId":"resolveStripeCheckout","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"stripe_session_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cs_(test|live)_"}}],"responses":{"200":{"$ref":"#/components/responses/StripeCheckout"},"default":{"$ref":"#/components/responses/Error"}}}},"/stripe-checkouts/{paymentSessionId}/cancel":{"post":{"operationId":"cancelStripeCheckout","summary":"Expire an unpaid Checkout Session before discarding local recovery","description":"Scoped to the authenticated Commerce account. The partner must also verify customer ownership. Stripe must confirm the session is unpaid and expired; completed, processing or uncertain payments are not discarded. This does not refund a payment or cancel an order. Repeating cancellation is safe.","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/PaymentSessionId"}],"responses":{"200":{"description":"Unpaid checkout expired","content":{"application/json":{"schema":{"type":"object","required":["cancelled","checkout"],"properties":{"cancelled":{"const":true},"checkout":{"$ref":"#/components/schemas/StripeCheckout"}}}}}},"409":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/stripe-checkouts/{paymentSessionId}/confirm":{"post":{"operationId":"confirmStripeCheckout","tags":["Payments"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/PaymentSessionId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stripe_session_id":{"type":"string","pattern":"^cs_"}}}}}},"responses":{"200":{"description":"Previously finalized Stripe payment","content":{"application/json":{"schema":{"type":"object","required":["order","checkout"],"properties":{"order":{"$ref":"#/components/schemas/Order"},"checkout":{"$ref":"#/components/schemas/StripeCheckout"},"idempotent":{"type":"boolean"}}}}}},"201":{"description":"Stripe payment finalized","content":{"application/json":{"schema":{"type":"object","required":["order","checkout"],"properties":{"order":{"$ref":"#/components/schemas/Order"},"checkout":{"$ref":"#/components/schemas/StripeCheckout"},"idempotent":{"type":"boolean"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders":{"post":{"operationId":"createUsdcOrder","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Order"},"201":{"$ref":"#/components/responses/Order"},"default":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"listOrders","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"external_customer_id","in":"query","schema":{"$ref":"#/components/schemas/ExternalId"}},{"name":"external_order_id","in":"query","schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Orders","content":{"application/json":{"schema":{"type":"object","required":["orders","pagination"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/{orderId}":{"get":{"operationId":"getOrder","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"$ref":"#/components/responses/Order"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays":{"get":{"operationId":"listBoxPlays","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Customer Pack plays","content":{"application/json":{"schema":{"type":"object","required":["box_plays","pagination"],"properties":{"box_plays":{"type":"array","items":{"$ref":"#/components/schemas/BoxPlay"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createBoxPlay","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Required for a new USDC checkout with quote_id. Reuse the same key to recover the same order."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackPlayRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"201":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays/{boxPlayId}":{"get":{"operationId":"getBoxPlay","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays/{boxPlayId}/results":{"post":{"operationId":"getBoxResults","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}},"summary":"Verify the buy and deliver the paid batch before revealing rewards; poll ready/retry_after_ms"}},"/box-plays/{boxPlayId}/commit":{"post":{"operationId":"confirmBoxCommit","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}},"summary":"Alias of results. Secures items before exposing rewards; poll ready and retry_after_ms.","deprecated":true}},"/box-plays/{boxPlayId}/selection":{"post":{"operationId":"saveBoxSelection","tags":["Packs"],"summary":"Save partial choices without authorizing a transaction; conflict or settling returns 409.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackSelectionDraft"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays/{boxPlayId}/review":{"post":{"operationId":"beginBoxReview","tags":["Packs"],"summary":"Begin the five-minute final-screen review after item delivery. Repeated calls never extend the deadline.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays/{boxPlayId}/decision":{"post":{"operationId":"chooseBoxDisposition","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decisions"],"properties":{"decisions":{"type":"array","minItems":1,"maxItems":10,"items":{"enum":["claim","sell_back"]},"description":"One choice per reward, in index order."},"tx_hash":{"$ref":"#/components/schemas/TransactionHash"}}}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/box-plays/{boxPlayId}/finalize":{"post":{"operationId":"confirmBoxFinalize","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/redemptions/address-validation":{"post":{"operationId":"validateRedemptionAddress","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_customer_id","address"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"address":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Validated address","content":{"application/json":{"schema":{"type":"object","required":["valid","address"],"properties":{"valid":{"const":true},"address":{"$ref":"#/components/schemas/Address"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/redemptions":{"post":{"operationId":"createRedemptionQuote","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRedemptionRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Redemption"},"201":{"$ref":"#/components/responses/Redemption"},"default":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"listRedemptions","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"external_customer_id","in":"query","schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Redemptions","content":{"application/json":{"schema":{"type":"object","required":["redemptions","pagination"],"properties":{"redemptions":{"type":"array","items":{"$ref":"#/components/schemas/Redemption"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/redemptions/{redemptionId}":{"get":{"operationId":"getRedemption","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/RedemptionId"}],"responses":{"200":{"$ref":"#/components/responses/Redemption"},"default":{"$ref":"#/components/responses/Error"}}}},"/redemptions/{redemptionId}/prepare":{"post":{"operationId":"prepareRedemption","description":"Reprice the selected delivery service and return a fresh 10-minute payment window. Prefer courier_id in shipping_selection, otherwise use the option id. A disappeared service returns shipping_option_unavailable instead of substituting another carrier. Refresh unpaid expired quotes with a new idempotency key; never replace a possibly submitted transaction.","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/RedemptionId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareRedemptionRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Redemption"},"default":{"$ref":"#/components/responses/Error"}}}},"/redemptions/{redemptionId}/confirm":{"post":{"operationId":"confirmRedemption","tags":["Redemptions"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/RedemptionId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/Redemption"},"201":{"$ref":"#/components/responses/Redemption"},"default":{"$ref":"#/components/responses/Error"}}}},"/events":{"get":{"operationId":"listEvents","tags":["Events"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"At-least-once event ledger","content":{"application/json":{"schema":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays":{"get":{"operationId":"listPackPlays","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"external_customer_id","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}}],"responses":{"200":{"description":"Customer Pack plays","content":{"application/json":{"schema":{"type":"object","required":["box_plays","pagination"],"properties":{"box_plays":{"type":"array","items":{"$ref":"#/components/schemas/BoxPlay"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createPackPlay","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Required for a new USDC checkout with quote_id. Reuse the same key to recover the same order."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackPlayRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"201":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays/{boxPlayId}":{"get":{"operationId":"getPackPlay","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays/{boxPlayId}/results":{"post":{"operationId":"getPackResults","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}},"summary":"Verify the buy and deliver the paid batch before revealing rewards; poll ready/retry_after_ms"}},"/pack-plays/{boxPlayId}/commit":{"post":{"operationId":"confirmPackCommit","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}},"summary":"Alias of results. Secures items before exposing rewards; poll ready and retry_after_ms.","deprecated":true}},"/pack-plays/{boxPlayId}/selection":{"post":{"operationId":"savePackSelection","tags":["Packs"],"summary":"Save partial choices without authorizing a transaction; conflict or settling returns 409.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackSelectionDraft"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays/{boxPlayId}/review":{"post":{"operationId":"beginPackReview","tags":["Packs"],"summary":"Begin the five-minute final-screen review after item delivery. Repeated calls never extend the deadline.","parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays/{boxPlayId}/decision":{"post":{"operationId":"choosePackDisposition","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decisions"],"properties":{"decisions":{"type":"array","minItems":1,"maxItems":10,"items":{"enum":["claim","sell_back"]},"description":"One choice per reward, in index order."},"tx_hash":{"$ref":"#/components/schemas/TransactionHash"}}}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}},"/pack-plays/{boxPlayId}/finalize":{"post":{"operationId":"confirmPackFinalize","tags":["Packs"],"parameters":[{"$ref":"#/components/parameters/PartnerSlug"},{"$ref":"#/components/parameters/BoxPlayId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConfirmation"}}}},"responses":{"200":{"$ref":"#/components/responses/BoxPlay"},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"PartnerSlug":{"name":"x-partner-slug","in":"header","required":false,"description":"Optional compatibility assertion. The Commerce key identifies its registered application automatically; GET /bootstrap returns partner.slug. If supplied, this slug must match that application or the API returns commerce_app_mismatch. It cannot select another app, including one owned by the same account.","schema":{"type":"string","minLength":1,"maxLength":80,"example":"example-store"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"Offset":{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},"ExternalCustomerId":{"name":"externalCustomerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExternalId"}},"QuoteId":{"name":"quoteId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},"PaymentSessionId":{"name":"paymentSessionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},"OrderId":{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},"BoxPlayId":{"name":"boxPlayId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}},"RedemptionId":{"name":"redemptionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Uuid"}}},"responses":{"Error":{"description":"Error response","headers":{"x-request-id":{"schema":{"type":"string","format":"uuid"}},"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Quote":{"description":"Quote and current chain payment instructions","content":{"application/json":{"schema":{"type":"object","required":["quote","payment"],"properties":{"quote":{"$ref":"#/components/schemas/Quote"},"payment":{"$ref":"#/components/schemas/PaymentInstructions"},"idempotent":{"type":"boolean"}}}}}},"Order":{"description":"Commerce order","content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"$ref":"#/components/schemas/Order"},"idempotent":{"type":"boolean"}}}}}},"StripeCheckout":{"description":"Stripe checkout state","content":{"application/json":{"schema":{"type":"object","required":["checkout"],"properties":{"checkout":{"$ref":"#/components/schemas/StripeCheckout"},"idempotent":{"type":"boolean"}}}}}},"BoxPlay":{"description":"Pack play state and next transaction when applicable. HTTP 200 is not completion: follow ready, restart and recovery.next_action.","content":{"application/json":{"schema":{"type":"object","required":["box_play"],"properties":{"box_play":{"$ref":"#/components/schemas/BoxPlay"},"idempotent":{"type":"boolean"},"ready":{"type":"boolean"},"restart":{"type":"boolean"},"recovery":{"$ref":"#/components/schemas/BoxPlayRecovery"},"retry_after_ms":{"type":["integer","null"]},"finalize_tx_hash":{"type":["string","null"]},"closed":{"type":"boolean"},"refunded":{"type":"boolean","description":"The confirmed cancellation returned the pack price. Does not imply a separately charged partner fee was refunded."}}}}}},"Redemption":{"description":"Redemption state","content":{"application/json":{"schema":{"type":"object","required":["redemption"],"properties":{"redemption":{"$ref":"#/components/schemas/Redemption"},"idempotent":{"type":"boolean"}}}}}}},"schemas":{"PackArtwork":{"type":["object","null"],"description":"Optional public presentation assets. Null for packs without a published 3D design. Hashed URLs support cross-origin reads and immutable caching. The renderer does not purchase or select rewards.","required":["version","design_key","poster_url","model_url","model_format","model_byte_length","texture_url","material_map_url","materials","renderer_url","renderer_export","width_m","height_m"],"properties":{"version":{"type":"integer","enum":[1]},"design_key":{"type":"string"},"poster_url":{"type":"string","format":"uri"},"model_url":{"type":"string","format":"uri"},"model_format":{"type":"string","enum":["glb"]},"model_byte_length":{"type":"integer","minimum":1},"texture_url":{"type":"string","format":"uri"},"material_map_url":{"type":"string","format":"uri","description":"Lossless finish map: R=iridescence, G=roughness, B=metalness."},"materials":{"type":"object","description":"Native foil body colors, gradient and finish. Pass through to the DYLI renderer.","required":["body_top","body_bottom","body_blend","matte","iridescence"],"properties":{"body_top":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"body_bottom":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"body_blend":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1}},"matte":{"type":"boolean"},"iridescence":{"type":"number","minimum":0,"maximum":1}}},"renderer_url":{"type":"string","format":"uri"},"renderer_export":{"type":"string","enum":["createPackScene"]},"width_m":{"type":"number","exclusiveMinimum":0},"height_m":{"type":"number","exclusiveMinimum":0}}},"PackCatalogItem":{"type":"object","additionalProperties":true,"properties":{"artwork":{"$ref":"#/components/schemas/PackArtwork"}}},"ItemGiftReadiness":{"type":"object","properties":{"ready":{"type":"boolean"},"chain_id":{"enum":[8453,84532]},"scope":{"const":"same_app"},"max_items":{"const":20},"max_quantity_per_item":{"const":20},"prepare_endpoint":{"const":"/community/gifts"},"confirmation_endpoint":{"const":"/community/gifts/{id}/confirm"},"requires_recipient_acceptance":{"const":false}}},"CreateItemGiftRequest":{"type":"object","additionalProperties":false,"required":["external_customer_id","recipient_external_customer_id","items"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"recipient_external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"items":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["token_id","quantity"],"properties":{"token_id":{"type":"string","pattern":"^[1-9][0-9]{0,77}$"},"quantity":{"type":"integer","minimum":1,"maximum":20}}}},"message":{"type":"string","maxLength":500}}},"ItemGift":{"type":"object","required":["id","external_customer_id","recipient_external_customer_id","sender","recipient","items","status"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"recipient_external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"sender":{"type":"object","properties":{"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"username":{"type":["string","null"]}}},"recipient":{"type":"object","properties":{"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"username":{"type":["string","null"]}}},"items":{"type":"array","maxItems":20,"items":{"type":"object","additionalProperties":true}},"message":{"type":"string","maxLength":500},"status":{"enum":["prepared","expired","processing","requires_action","completed"]},"transaction":{"oneOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]},"tx_hash":{"type":["string","null"]},"gift_ids":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"ItemGiftResponse":{"type":"object","required":["gift"],"properties":{"gift":{"$ref":"#/components/schemas/ItemGift"},"idempotent":{"type":"boolean"}}},"BoxTransfer":{"type":"object","required":["id","order_id","status","external_customer_id","recipient_external_customer_id","chain_id","quantity","expires_at"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"order_id":{"$ref":"#/components/schemas/Uuid"},"status":{"enum":["prepared","completed"]},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"recipient_external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"chain_id":{"enum":[8453,84532]},"quantity":{"type":"integer","minimum":1,"maximum":10},"expires_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"CustomerWalletAuthorizationResponse":{"type":"object","required":["authorization"],"properties":{"authorization":{"type":"object","required":["id","wallet_address","chain_id","expires_at","message"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","enum":[8453,84532]},"expires_at":{"type":"string","format":"date-time"},"message":{"type":"string"}}},"idempotent":{"type":"boolean"}}},"BoxTransferResponse":{"type":"object","required":["transfer"],"properties":{"transfer":{"$ref":"#/components/schemas/BoxTransfer"},"authorization":{"type":"object","required":["message","wallet_address"],"properties":{"message":{"type":"string"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"}}},"idempotent":{"type":"boolean"}}},"BoxPlayRecovery":{"type":"object","required":["code","requires_new_payment","next_action"],"properties":{"code":{"enum":["resume_paid_opening","results_required","pack_refunded","pack_buy_closed"]},"requires_new_payment":{"type":"boolean","description":"True only for a closed refunded pack. A new purchase must be explicitly chosen by the customer; never automatically charge again."},"next_action":{"type":"object","required":["method","path"],"properties":{"method":{"enum":["GET","POST"]},"path":{"type":"string","description":"DYLI API path to call instead of retrying a stale decision."},"body":{"oneOf":[{"type":"object","required":["order_id"],"properties":{"order_id":{"$ref":"#/components/schemas/Uuid"}}},{"$ref":"#/components/schemas/TransactionConfirmation"}]}}},"new_order_required":{"type":"boolean"}},"allOf":[{"if":{"properties":{"code":{"const":"pack_refunded"}}},"then":{"required":["new_order_required"],"properties":{"requires_new_payment":{"const":true},"new_order_required":{"const":true}}},"else":{"properties":{"requires_new_payment":{"const":false}}}}]},"CommunitySettings":{"type":"object","additionalProperties":false,"properties":{"marketplace_enabled":{"type":"boolean","default":true},"trading_enabled":{"type":"boolean","default":true},"include_dyli_marketplace":{"type":"boolean","default":false},"include_dyli_collectors":{"type":"boolean","default":false}}},"CommunityReadiness":{"type":"object","properties":{"marketplace":{"type":"object","properties":{"ready":{"type":"boolean"},"include_dyli":{"type":"boolean"}}},"trading":{"type":"object","properties":{"ready":{"type":"boolean"},"include_dyli":{"type":"boolean"}}},"chain_id":{"enum":[8453,84532]},"settlement":{"const":"customer_wallet"},"currency":{"const":"USDC"},"gifting":{"$ref":"#/components/schemas/ItemGiftReadiness"},"revenue_share":{"type":"object","description":"Default pack share: 10% of settled profit. Default secondary/cash-trade share: 10% of collected DYLI fees, without an extra customer fee.","properties":{"pack_profit_share_bps":{"type":"integer","const":1000},"secondary_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"cash_trade_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"community_basis":{"const":"collected_dyli_fee"},"settlement":{"const":"commerce_earnings"},"docs_url":{"type":"string","format":"uri"},"custom_rates_url":{"type":"string","format":"uri"}}}}},"CommunityCollector":{"type":"object","properties":{"username":{"type":"string"},"pfp":{"type":["string","null"]},"wallet":{"$ref":"#/components/schemas/EvmAddress"}}},"CommunityTrade":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OfferInteger"},"order_id":{"$ref":"#/components/schemas/OfferInteger"},"status":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/CommunityCollector"},{"type":"null"}]},"to":{"anyOf":[{"$ref":"#/components/schemas/CommunityCollector"},{"type":"null"}]},"role":{"enum":["sender","receiver"]},"from_items":{"type":"array","items":{"type":"object","required":["token_id","quantity"],"properties":{"token_id":{"$ref":"#/components/schemas/OfferInteger"},"quantity":{"type":"integer","minimum":1},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}},"to_items":{"type":"array","items":{"type":"object","required":["token_id","quantity"],"properties":{"token_id":{"$ref":"#/components/schemas/OfferInteger"},"quantity":{"type":"integer","minimum":1},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}},"from_usdc":{"type":"number"},"to_usdc":{"type":"number"},"has_diamonds":{"type":"boolean"},"receipt_available":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"CommunityMarketOrder":{"type":"object","properties":{"order_id":{"$ref":"#/components/schemas/OfferInteger"},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"kind":{"enum":["listing","offer"]},"unit_amount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})$","description":"Integer USDC base units, six decimals. Maximum 1000000000000."},"price":{"type":"number"},"quantity":{"type":"integer"},"expiration":{"type":"integer"},"maker":{"$ref":"#/components/schemas/EvmAddress"},"product":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"image_url":{"type":["string","null"]},"brand":{"type":["string","null"]}}},"collector":{"$ref":"#/components/schemas/CommunityCollector"},"mine":{"type":"boolean"}}},"CommunityActionInput":{"oneOf":[{"type":"object","required":["external_customer_id","kind","token_id","unit_amount","expiration"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"kind":{"enum":["list","offer"]},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"unit_amount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})$","description":"Integer USDC base units, six decimals. Maximum 1000000000000."},"quantity":{"type":"integer","minimum":1,"maximum":20,"description":"Offers must use 1."},"expiration":{"type":"integer","description":"Unix seconds, 5 minutes to 30 days ahead."}}},{"type":"object","required":["external_customer_id","kind","token_id","order_id","expected_amount"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"kind":{"enum":["buy","accept_offer"]},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"order_id":{"$ref":"#/components/schemas/OfferInteger"},"expected_amount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})$","description":"Integer USDC base units, six decimals. Maximum 1000000000000."},"quantity":{"type":"integer","minimum":1,"maximum":20,"description":"Offer acceptance must use 1."}}},{"type":"object","required":["external_customer_id","kind","token_id","order_id"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"kind":{"enum":["cancel_listing","cancel_offer"]},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"order_id":{"$ref":"#/components/schemas/OfferInteger"}}},{"type":"object","required":["external_customer_id","kind","collector","give","receive"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"kind":{"enum":["trade"]},"collector":{"type":"string"},"give":{"type":"array","maxItems":20,"items":{"type":"object","required":["token_id","quantity"],"properties":{"token_id":{"$ref":"#/components/schemas/OfferInteger"},"quantity":{"type":"integer","minimum":1,"maximum":20},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}},"receive":{"type":"array","maxItems":20,"items":{"type":"object","required":["token_id","quantity"],"properties":{"token_id":{"$ref":"#/components/schemas/OfferInteger"},"quantity":{"type":"integer","minimum":1,"maximum":20},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}},"give_usdc":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})$","description":"Integer USDC base units, six decimals. Maximum 1000000000000."},"receive_usdc":{"type":"string","pattern":"^(0|[1-9][0-9]{0,12})$","description":"Integer USDC base units, six decimals. Maximum 1000000000000."}}},{"type":"object","required":["external_customer_id","kind","trade_id"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"kind":{"enum":["accept_trade","cancel_trade"]},"trade_id":{"$ref":"#/components/schemas/OfferInteger"}}}]},"CommunityAction":{"type":"object","required":["id","kind","status","input","wallet_address","external_customer_id"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"kind":{"enum":["list","offer","buy","accept_offer","cancel_listing","cancel_offer","trade","accept_trade","cancel_trade"]},"status":{"enum":["prepared","expired","processing","requires_action","completed"]},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"input":{"type":"object","additionalProperties":true},"transaction":{"anyOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]},"approvals":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"tx_hash":{"type":["string","null"]},"result":{"type":["object","null"],"additionalProperties":true},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"revenue_share":{"type":["object","null"],"description":"Rate saved at preparation. Verified collected fee and earned units are added after completion. Null for ineligible actions.","properties":{"basis":{"const":"collected_dyli_fee"},"share_bps":{"type":"integer","minimum":0,"maximum":10000},"gross_units":{"type":"string","pattern":"^[0-9]+$"},"fee_units":{"type":"string","pattern":"^[0-9]+$"},"earned_units":{"type":"string","pattern":"^[0-9]+$"},"currency":{"const":"USDC"},"chain_id":{"const":8453},"tx_hash":{"type":"string"},"block_hash":{"type":"string"},"recipient":{"$ref":"#/components/schemas/EvmAddress"}}}}},"CommunityActionResponse":{"type":"object","required":["action"],"properties":{"action":{"$ref":"#/components/schemas/CommunityAction"},"idempotent":{"type":"boolean"}}},"OfferInteger":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"Unsigned integer string, less than 2^256."},"OfferQueryRequest":{"type":"object","required":["external_customer_id","token_id"],"additionalProperties":false,"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"token_id":{"$ref":"#/components/schemas/OfferInteger"}}},"CreateOfferAcceptanceRequest":{"type":"object","required":["external_customer_id","token_id","offer_id","expected_amount"],"additionalProperties":false,"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"offer_id":{"$ref":"#/components/schemas/OfferInteger"},"expected_amount":{"$ref":"#/components/schemas/OfferInteger","description":"Exact selected offer.amount in six-decimal USDC base units. 75000000 means 75 USDC."}}},"DyliOffer":{"type":"object","required":["id","token_id","price","amount","currency","maker_wallet","expiration","expires_at","type","eligibility","quantity"],"properties":{"id":{"$ref":"#/components/schemas/OfferInteger"},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"price":{"type":"number","exclusiveMinimum":0,"description":"Offer price in USDC units."},"amount":{"$ref":"#/components/schemas/OfferInteger"},"currency":{"const":"USDC"},"maker_wallet":{"$ref":"#/components/schemas/EvmAddress"},"expiration":{"type":"integer","description":"Unix expiry in seconds."},"expires_at":{"type":"string","format":"date-time"},"type":{"enum":["claim_buyback","standing_buyback"]},"eligibility":{"enum":["requires_preparation","eligible"],"description":"Discovery needs final preparation checks. Eligibility is a snapshot, not a reservation or extension."},"quantity":{"const":1}}},"OfferAcceptance":{"type":"object","required":["id","external_customer_id","token_id","offer_id","offer","wallet_address","status","expires_at"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"token_id":{"$ref":"#/components/schemas/OfferInteger"},"offer_id":{"$ref":"#/components/schemas/OfferInteger"},"offer":{"$ref":"#/components/schemas/DyliOffer"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"status":{"enum":["prepared","expired","processing","requires_action","completed"]},"transaction":{"anyOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]},"approval_transaction":{"anyOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}],"description":"ERC-1155 marketplace operator approval if needed. Sign and confirm before the acceptance transaction."},"tx_hash":{"type":["string","null"]},"result":{"type":["object","null"],"properties":{"dyli_order_id":{"type":["integer","string"]},"tx_hash":{"type":"string"}}},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"WalletRegistrationReadiness":{"type":"object","required":["ready"],"properties":{"ready":{"type":"boolean"},"customer_signature_required":{"const":true},"prepare_endpoint":{"const":"/customers/{externalCustomerId}/wallet-authorizations"},"confirm_endpoint":{"const":"/customers/{externalCustomerId}/wallet-authorizations/{authorizationId}/confirm"}}},"CommerceBootstrap":{"type":"object","required":["version","bootstrap_version","environment","partner","auth","wallet","storefront"],"properties":{"version":{"type":"string"},"bootstrap_version":{"const":1},"environment":{"enum":["lab","production"]},"partner":{"$ref":"#/components/schemas/PartnerConfig"},"auth":{"type":"object","additionalProperties":false,"required":["mode","available","provider","allowed_origins","storefront_origin","session_endpoint"],"properties":{"mode":{"enum":["dyli_managed","existing","privy"]},"available":{"type":"boolean","description":"For existing/privy, the integration mode is registered; this does not certify partner auth implementation."},"provider":{"type":"string"},"verification":{"enum":["partner_server","privy_custom_auth"]},"app_id":{"type":["string","null"]},"client_id":{"type":["string","null"]},"identity_scope":{"enum":["dyli","partner",null]},"allowed_origins":{"type":"array","items":{"type":"string","format":"uri"}},"storefront_origin":{"type":["string","null"],"format":"uri"},"session_endpoint":{"enum":["/auth/session",null]},"sponsor_transactions":{"type":"boolean","description":"Available paid-pack sponsorship for this approved managed app; inspect wallet.gas_sponsorship."}}},"integration":{"type":["object","null"],"properties":{"application_id":{"$ref":"#/components/schemas/Uuid"},"auth_mode":{"enum":["existing","privy","dyli_managed"]},"wallet_mode":{"enum":["existing","embedded","managed"]},"payment_mode":{"enum":["dyli","partner","both"]},"app_type":{"enum":["web","mobile","both","api"]}}},"wallet":{"type":"object","required":["chain","chain_id"],"properties":{"chain":{"const":"base"},"chain_id":{"enum":[8453,84532]},"registration":{"$ref":"#/components/schemas/WalletRegistrationReadiness"},"gas_sponsorship":{"type":"object","properties":{"available":{"type":"boolean"},"chain_id":{"enum":[8453,84532]},"requires_dyli_login":{"type":"boolean"},"requires_customer_access_token":{"type":"boolean"},"item_gifts":{"type":"object","properties":{"available":{"type":"boolean"},"scope":{"const":"same_app"}}},"supported_actions":{"type":"array","uniqueItems":true,"items":{"enum":["pack_openings","marketplace","trading","shipping","usdc_transfers"]}}}},"managed_auth":{"$ref":"#/components/schemas/CommerceBootstrap/properties/auth","description":"Public managed-wallet settings for existing login. Check available separately from auth.available."}}},"storefront":{"type":"object","required":["name","boxes_only"],"properties":{"name":{"type":"string"},"boxes_only":{"type":"boolean","description":"Legacy catalog setting; use community capabilities for marketplace and trading."},"community":{"$ref":"#/components/schemas/CommunityReadiness"}}}}},"ManagedCustomerIdentity":{"type":"object","additionalProperties":false,"required":["userId","externalCustomerId","walletAddress","email","name"],"properties":{"userId":{"type":"string"},"externalCustomerId":{"$ref":"#/components/schemas/ExternalId"},"walletAddress":{"$ref":"#/components/schemas/EvmAddress"},"email":{"type":["string","null"]},"name":{"type":["string","null"]}}},"Uuid":{"type":"string","format":"uuid"},"ExternalId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/|\\-]{0,199}$"},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","description":"EVM 0x-prefixed 32-byte hash or Solana base58 signature"},"Pagination":{"type":"object","required":["limit","offset","total"],"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"Readiness":{"type":"object","required":["name","version","environment","partner","capabilities","payment"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"environment":{"enum":["production","lab"]},"partner":{"$ref":"#/components/schemas/PartnerConfig"},"capabilities":{"type":"object","required":["payments","writes","purchasing_ready","fulfillment"],"properties":{"payments":{"type":"array","items":{"enum":["usdc","stripe_card"]}},"writes":{"type":"object","properties":{"enabled":{"type":"boolean"},"status":{"type":"string"}},"required":["enabled","status"]},"purchasing_ready":{"type":"boolean"},"wallet_registration":{"$ref":"#/components/schemas/WalletRegistrationReadiness"},"fulfillment":{"type":"object","required":["ready","live_ready","test_ready","mode","environment","environment_valid"],"properties":{"ready":{"type":"boolean"},"live_ready":{"type":"boolean"},"test_ready":{"type":"boolean"},"mode":{"enum":["executor","manual_queue","test_queue","unconfigured"]},"environment":{"enum":["production","lab"]},"environment_valid":{"type":"boolean"}}},"box_play":{"type":"object","required":["ready","contract_version","chain_id","max_quantity"],"properties":{"ready":{"type":"boolean"},"enabled":{"type":"boolean"},"contract_version":{"const":"gacha"},"chain_id":{"enum":[8453,84532]},"max_quantity":{"const":10},"network_valid":{"type":"boolean"},"flow":{"type":"array","items":{"enum":["buy","results","decision","finalize"]}},"priced_buy":{"type":"object","properties":{"ready":{"type":"boolean"},"payment_mode":{"const":"pack_buy"},"prepare_endpoint":{"const":"/pack-plays"},"confirmation_endpoint":{"const":"/pack-plays/{id}/results"},"separate_payment_required":{"const":false},"payer_message_required":{"const":false}}}}}},"additionalProperties":true},"payment":{"type":"object","additionalProperties":true}}},"PartnerConfig":{"type":"object","required":["slug","branding","catalog_rules","fee_rules","webhook"],"properties":{"slug":{"type":"string"},"display_name":{"type":["string","null"]},"branding":{"type":"object","additionalProperties":true},"catalog_rules":{"type":"object","additionalProperties":true},"fee_rules":{"$ref":"#/components/schemas/FeeRules"},"webhook":{"type":"object","properties":{"url":{"type":["string","null"],"format":"uri"},"configured":{"type":"boolean"},"has_secret":{"type":"boolean"}},"required":["url","configured","has_secret"]},"updated_at":{"type":"string","format":"date-time"},"community_settings":{"$ref":"#/components/schemas/CommunitySettings"},"revenue_share":{"type":"object","description":"Default pack share: 10% of settled profit. Default secondary/cash-trade share: 10% of collected DYLI fees, without an extra customer fee.","properties":{"pack_profit_share_bps":{"type":"integer","const":1000},"secondary_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"cash_trade_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"community_basis":{"const":"collected_dyli_fee"},"settlement":{"const":"commerce_earnings"},"docs_url":{"type":"string","format":"uri"},"custom_rates_url":{"type":"string","format":"uri"}}}}},"PartnerConfigPatch":{"type":"object","properties":{"display_name":{"type":["string","null"],"maxLength":100},"branding":{"type":"object","additionalProperties":true},"catalog_rules":{"type":"object","additionalProperties":true},"fee_rules":{"$ref":"#/components/schemas/FeeRules"},"webhook_url":{"type":["string","null"],"format":"uri"},"rotate_webhook_secret":{"type":"boolean"},"community_settings":{"$ref":"#/components/schemas/CommunitySettings"}}},"FeeRules":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"type":{"enum":["percent","fixed","fixed_plus_percent"]},"percent":{"type":"number","minimum":0,"maximum":100},"fixed_amount":{"type":"number","minimum":0,"maximum":100000},"per_unit":{"type":"boolean","default":false,"description":"Multiply fixed_amount by pack quantity. Percentages always use subtotal."},"minimum":{"type":["number","null"],"minimum":0,"maximum":100000},"maximum":{"type":["number","null"],"minimum":0,"maximum":100000},"label":{"type":"string","maxLength":80}},"description":"Trusted partner-server fee policy, in account config or as a quote-only override. enabled:false disables it. Default is zero. Fixed fees are per order unless per_unit:true. Does not waive pack price, processing, gas or shipping."},"CommerceAnalytics":{"type":"object","required":["enabled","summary","boxes","orders","pagination","share_percent","as_of"],"properties":{"enabled":{"type":"boolean"},"share_percent":{"const":10},"revenue_share":{"type":"object","description":"Default pack share: 10% of settled profit. Default secondary/cash-trade share: 10% of collected DYLI fees, without an extra customer fee.","properties":{"pack_profit_share_bps":{"type":"integer","const":1000},"secondary_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"cash_trade_fee_share_bps":{"type":"integer","minimum":0,"maximum":10000,"default":1000},"community_basis":{"const":"collected_dyli_fee"},"settlement":{"const":"commerce_earnings"},"docs_url":{"type":"string","format":"uri"},"custom_rates_url":{"type":"string","format":"uri"}}},"community":{"type":"object","properties":{"summary":{"type":"object","properties":{"transactions":{"type":"integer"},"volume":{"type":"number"},"platform_fees":{"type":"number"},"earnings":{"type":"number"},"secondary_earnings":{"type":"number"},"trade_earnings":{"type":"number"}}},"transactions":{"type":"array","items":{"type":"object","properties":{"action_id":{"$ref":"#/components/schemas/Uuid"},"account_id":{"$ref":"#/components/schemas/Uuid"},"application_name":{"type":"string"},"source":{"enum":["secondary","cash_trade"]},"kind":{"enum":["buy","accept_offer","accept_trade"]},"chain_id":{"const":8453},"tx_hash":{"type":"string"},"completed_at":{"type":"string","format":"date-time"},"revenue_share_bps":{"type":"integer"},"volume":{"type":"number"},"platform_fee":{"type":"number"},"earnings":{"type":"number"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"summary":{"$ref":"#/components/schemas/CommerceMetrics"},"boxes":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CommerceMetrics"},{"type":"object","properties":{"box_id":{"type":"integer"},"name":{"type":"string"},"image_url":{"type":["string","null"]}}}]}},"orders":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"order_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"earnings_status":{"enum":["settled","pending","excluded","failed","refunded","cancelled"]}}}},"applications":{"type":"array","items":{"type":"object","additionalProperties":true}},"pagination":{"type":"object","properties":{"offset":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}},"as_of":{"type":"string","format":"date-time"}}},"CommerceMetrics":{"type":"object","description":"Money in USD/USDC. Net profit = settled base sales minus buybacks, kept-item costs, and refunds. Owner share = max(0, net profit × 10%); Your fee is additional. Per-pack shares retain signed contributions and are not independently claimable.","properties":{"orders":{"type":"integer"},"completed_orders":{"type":"integer"},"boxes_opened":{"type":"integer"},"buyback_count":{"type":"integer"},"sales":{"type":"number"},"buybacks":{"type":"number"},"item_costs":{"type":"number"},"refunds":{"type":"number"},"profit":{"type":"number"},"profit_share":{"type":"number"},"your_fee":{"type":"number"},"earnings":{"type":"number"},"secondary_earnings":{"type":"number"},"trade_earnings":{"type":"number"}}},"PartnerAuth":{"type":"object","required":["provider","subject"],"properties":{"provider":{"type":"string","maxLength":50},"subject":{"type":"string","maxLength":250}}},"CustomerInput":{"type":"object","required":["wallet_address"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"wallet_chain":{"const":"base"},"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":200},"partner_auth":{"$ref":"#/components/schemas/PartnerAuth"}}},"Customer":{"allOf":[{"$ref":"#/components/schemas/CustomerInput"},{"type":"object","required":["id","external_customer_id","dyli_user_linked"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"dyli_user_linked":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time"}}}]},"QuoteItem":{"oneOf":[{"type":"object","required":["type","listing_id","quantity"],"properties":{"type":{"const":"listing"},"listing_id":{"type":"string"},"quantity":{"const":1}}},{"type":"object","required":["type","listing_id","product_id","token_id","quantity"],"properties":{"type":{"const":"secondary-listing"},"listing_id":{"type":"string"},"product_id":{"type":"integer"},"token_id":{"type":"string"},"quantity":{"const":1}}},{"type":"object","required":["type","box_id","quantity"],"properties":{"type":{"const":"box"},"box_id":{"type":"integer"},"quantity":{"type":"integer","minimum":1,"maximum":10}}},{"type":"object","required":["type","item_id","quantity"],"properties":{"type":{"const":"ebay"},"item_id":{"type":"string"},"quantity":{"const":1}}},{"type":"object","required":["type","pack_id","quantity"],"properties":{"type":{"const":"pack"},"quantity":{"type":"integer","minimum":1,"maximum":10},"pack_id":{"type":"integer"}}}]},"CreateQuoteRequest":{"type":"object","required":["items"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"items":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/components/schemas/QuoteItem"}},"fee_rules":{"$ref":"#/components/schemas/FeeRules"}}},"PriceBreakdown":{"type":"object","required":["subtotal_cents","partner_fee_cents","total_cents","subtotal","partner_fee","total","currency"],"properties":{"subtotal_cents":{"type":"integer"},"partner_fee_cents":{"type":"integer"},"total_cents":{"type":"integer"},"subtotal":{"type":"number"},"partner_fee":{"type":"number"},"total":{"type":"number"},"currency":{"type":"string"},"fee_label":{"type":"string"},"fee_rules":{"$ref":"#/components/schemas/FeeRules"},"fee_quantity":{"type":"integer","minimum":1},"stripe_discount_cents":{"type":"integer","minimum":0,"description":"Stripe-verified discount on a completed card order. total_cents is the actual amount paid."},"stripe_item_discount_cents":{"type":"integer","minimum":0},"stripe_partner_fee_discount_cents":{"type":"integer","minimum":0},"stripe_card_fee_discount_cents":{"type":"integer","minimum":0}},"additionalProperties":true},"Quote":{"type":"object","required":["id","currency","items","price_breakdown","status","expires_at"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"type":["string","null"]},"currency":{"const":"USDC"},"items":{"type":"array","items":{"type":"object","additionalProperties":true}},"price_breakdown":{"$ref":"#/components/schemas/PriceBreakdown"},"status":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PaymentInstructions":{"type":"object","required":["currency","supported_chains","recipients","tokens"],"properties":{"amount":{"type":["string","number","null"]},"currency":{"const":"USDC"},"supported_chains":{"type":"array","items":{"$ref":"#/components/schemas/PaymentChain"}},"recipients":{"type":"object","additionalProperties":{"type":"string"}},"tokens":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":true},"PaymentChain":{"enum":["base","avalanche","ethereum","arbitrum","optimism","polygon","hyperevm","monad","solana"]},"FulfillmentInput":{"type":"object","properties":{"mode":{"const":"vault","default":"vault"}}},"PaymentAuthorizationRequest":{"type":"object","required":["external_customer_id","customer","payment"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"customer":{"$ref":"#/components/schemas/CustomerInput"},"fulfillment":{"$ref":"#/components/schemas/FulfillmentInput"},"payment":{"type":"object","required":["chain","tx_hash","payer"],"properties":{"chain":{"$ref":"#/components/schemas/PaymentChain"},"tx_hash":{"$ref":"#/components/schemas/TransactionHash"},"payer":{"type":"string"}}}}},"PaymentAuthorization":{"type":"object","required":["message","chain","tx_hash","payer","intent_hash","signature_method"],"properties":{"message":{"type":"string"},"chain":{"$ref":"#/components/schemas/PaymentChain"},"tx_hash":{"$ref":"#/components/schemas/TransactionHash"},"payer":{"type":"string"},"intent_hash":{"type":"string"},"signature_method":{"type":"string"}}},"PaymentInput":{"type":"object","required":["chain","tx_hash","payer","payer_signature"],"properties":{"chain":{"$ref":"#/components/schemas/PaymentChain"},"tx_hash":{"$ref":"#/components/schemas/TransactionHash"},"payer":{"type":"string"},"payer_signature":{"type":"string"}}},"CreateOrderRequest":{"type":"object","required":["quote_id","external_customer_id","customer","payment"],"properties":{"quote_id":{"$ref":"#/components/schemas/Uuid"},"external_order_id":{"$ref":"#/components/schemas/ExternalId"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"customer":{"$ref":"#/components/schemas/CustomerInput"},"fulfillment":{"$ref":"#/components/schemas/FulfillmentInput"},"payment":{"$ref":"#/components/schemas/PaymentInput"}}},"Order":{"type":"object","required":["id","quote_id","external_customer_id","customer","delivery","price_breakdown","payment","status","fulfillment_status"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"quote_id":{"$ref":"#/components/schemas/Uuid"},"external_order_id":{"type":["string","null"]},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"dyli_customer_id":{"type":["string","null"]},"customer":{"type":"object","additionalProperties":true},"fulfillment":{"type":"object","additionalProperties":true},"delivery":{"type":"object","required":["mode","wallet_address","status"],"properties":{"mode":{"const":"collection"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"status":{"type":"string"}}},"price_breakdown":{"$ref":"#/components/schemas/PriceBreakdown"},"currency":{"type":"string"},"payment":{"type":"object","additionalProperties":true},"status":{"type":"string"},"fulfillment_status":{"type":"string"},"dyli_order_ids":{"type":"array","description":"Normal DYLI order records created for this Commerce order. A live order cannot complete until these records are successful, activity-ready, and owned by the linked customer.","items":{"type":"string"}},"error":{"type":["object","null"],"additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"items":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Paid quote snapshots included on GET reads for recovery."}}},"StripeCheckoutRequest":{"type":"object","required":["external_customer_id","customer","ui_mode"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"external_order_id":{"$ref":"#/components/schemas/ExternalId"},"customer":{"$ref":"#/components/schemas/CustomerInput"},"fulfillment":{"$ref":"#/components/schemas/FulfillmentInput"},"ui_mode":{"enum":["hosted","embedded"]},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"}}},"StripeCheckout":{"type":"object","required":["id","status"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"quote_id":{"$ref":"#/components/schemas/Uuid"},"stripe_session_id":{"type":["string","null"]},"checkout_url":{"type":["string","null"],"format":"uri"},"client_secret":{"type":["string","null"]},"publishable_key":{"type":["string","null"]},"status":{"type":"string"},"order_id":{"type":["string","null"],"format":"uuid"},"expires_at":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true},"Transaction":{"type":"object","required":["chain","from","to","data","value"],"properties":{"chain":{"const":"base"},"chain_id":{"type":"integer"},"from":{"$ref":"#/components/schemas/EvmAddress"},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string"},"value":{"const":"0"},"phase":{"type":"string"}}},"TransactionConfirmation":{"type":"object","required":["tx_hash"],"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}},"PackSelection":{"type":["object","null"],"required":["deadline","server_now","revision","decisions","settling","finished"],"properties":{"deadline":{"type":["string","null"],"format":"date-time","description":"Persistent decision deadline; resume does not restart it. Honor the returned time."},"server_now":{"type":"string","format":"date-time","description":"Server clock for a local countdown."},"revision":{"type":"integer","minimum":0},"decisions":{"type":"array","minItems":1,"maxItems":10,"items":{"enum":["claim","sell_back",null]}},"review_started_at":{"type":["string","null"],"format":"date-time","description":"First final-screen review time; subsequent reviews do not extend the deadline."},"review_available":{"type":"boolean","description":"Call /review when the final selection screen opens after item delivery. The five-minute deadline never restarts on refresh."},"settling":{"type":"boolean"},"finished":{"type":"boolean"}},"description":"Persistent saved review choices after item delivery. Sell requires a confirmed sale transaction; unsigned items remain in the customer account, including at the deadline."},"CreatePackPlayRequest":{"type":"object","description":"For new Base USDC purchases that open immediately, use quote_id, external_customer_id and Idempotency-Key. This recommended USDC checkout collects the quoted price and fee inside the buy transaction and starts opening. Do not send a separate upfront payment. Use order_id to open/resume an already-paid order.","oneOf":[{"required":["order_id"],"not":{"required":["quote_id"]}},{"required":["quote_id","external_customer_id"],"not":{"required":["order_id"]}}],"properties":{"order_id":{"$ref":"#/components/schemas/Uuid"},"quote_id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"external_order_id":{"$ref":"#/components/schemas/ExternalId"},"idempotency_key":{"type":"string","minLength":1,"maxLength":200}}},"PackSelectionDraft":{"type":"object","required":["decisions","revision"],"properties":{"decisions":{"type":"array","minItems":1,"maxItems":10,"items":{"enum":["claim","sell_back",null]},"description":"One draft choice per reward in index order; null means undecided."},"revision":{"type":"integer","minimum":0,"description":"Revision returned in box_play.selection."}}},"BoxPlay":{"type":"object","required":["id","order_id","external_customer_id","box_id","wallet_address","status","quantity","contract_version","rewards","opening_reference"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"order_id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"box_id":{"type":"integer"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"status":{"enum":["buy_prepared","drawing","revealed","finalize_prepared","completed","restart_required"]},"finalize_tx_hash":{"type":["string","null"]},"transaction":{"oneOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]},"quantity":{"type":"integer","minimum":1,"maximum":10},"contract_version":{"const":"gacha"},"opening_reference":{"type":"string","description":"Changes after a safe restart; discard old transaction hashes/decisions when it changes."},"buy_tx_hash":{"type":["string","null"]},"rewards":{"type":"array","maxItems":10,"items":{"type":"object","required":["index","product_id","token_id","product","buyback_amount"],"properties":{"index":{"type":"integer","minimum":0,"maximum":9},"product_id":{"type":"integer"},"token_id":{"type":"string"},"product":{"type":"object","additionalProperties":true},"rarity":{"type":["string","null"]},"buyback_amount":{"type":"number","minimum":0,"description":"USD buyback amount"},"disposition":{"enum":["claim","sell_back",null]}}}},"decisions":{"type":"array","maxItems":10,"items":{"enum":["claim","sell_back",null]}},"dyli_order_ids":{"type":"array","items":{"type":["string","integer"]}},"selection":{"$ref":"#/components/schemas/PackSelection"},"approval_transaction":{"oneOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}],"description":"Exact approval to send before the returned transaction. Buy uses USDC approval; claim-before-reveal finalize can use ERC-1155 approval for the buyback helper. Compatible smart wallets can batch approval first."},"payment":{"type":"object","properties":{"mode":{"const":"pack_buy"},"status":{"enum":["awaiting_payment","paid"]},"amount_cents":{"type":"integer"},"currency":{"const":"USDC"}}},"claim_before_reveal":{"type":"boolean","description":"Enabled by default for new Commerce apps. Every item is delivered before rewards are exposed. All Keep completes without a transaction; Sell uses the returned sale transaction and optional item approval."}}},"Address":{"type":"object","required":["name","email","phone","address_line_1","city","state","postal_code","country_alpha2"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"address_line_1":{"type":"string"},"address_line_2":{"type":["string","null"]},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country_alpha2":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":true},"CreateRedemptionRequest":{"type":"object","required":["external_customer_id","items","address"],"properties":{"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"items":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","required":["token_id","quantity"],"properties":{"token_id":{"type":"string","pattern":"^\\d+$"},"quantity":{"type":"integer","minimum":1}}}},"address":{"$ref":"#/components/schemas/Address"},"include_ddp":{"type":"boolean"},"insurance":{"type":"boolean"},"declared_value_overrides":{"type":"object","additionalProperties":{"type":"number"}}}},"PrepareRedemptionRequest":{"type":"object","required":["shipping_selection"],"properties":{"shipping_selection":{"type":"object","additionalProperties":true},"redemption_collection_responses":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"RedemptionFulfillmentOrder":{"type":"object","description":"Current fulfillment and package tracking details. Redemption completed does not mean parcel delivered. Carrier data may be cached for up to 15 minutes.","properties":{"id":{"type":["integer","string"]},"product_id":{"type":"integer"},"shipment_id":{"type":["string","integer","null"],"description":"Current shipment identifier. Multiple items shipped together may share this value. Easyship IDs can be displayed as tracking link text even without a carrier tracking number.","examples":["ESUS360467167"]},"carrier":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"],"description":"For Easyship, https://www.trackmyshipment.co/shipment-tracking/{shipment_id}, retained even when carrier lookup is unavailable. Other providers supply their own tracking URL."},"shipment_status":{"type":["string","null"]},"delivered":{"type":["boolean","null"],"description":"Null when carrier-confirmed delivery is unknown."},"tracking_unavailable":{"type":"boolean"},"tracking_updated_at":{"type":["string","null"],"format":"date-time"},"redeemed_at":{"type":["string","null"],"format":"date-time"},"shipments":{"type":"array","description":"Individual packages when the provider splits fulfillment. Display each package's tracking details.","items":{"type":"object","properties":{"carrier":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"shipped_at":{"type":["string","null"]}},"additionalProperties":true}}},"additionalProperties":true},"Redemption":{"type":"object","required":["id","external_customer_id","wallet_address","items","address","status"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"external_customer_id":{"$ref":"#/components/schemas/ExternalId"},"dyli_customer_id":{"$ref":"#/components/schemas/Uuid"},"wallet_address":{"$ref":"#/components/schemas/EvmAddress"},"items":{"type":"array","items":{"type":"object","additionalProperties":true}},"address":{"$ref":"#/components/schemas/Address"},"shipping_options":{"type":"object","additionalProperties":true},"selected_shipping_option":{"type":["object","null"],"additionalProperties":true},"pricing":{"type":["object","null"],"additionalProperties":true},"payment":{"type":["object","null"],"additionalProperties":true},"transaction":{"anyOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]},"redemption_tx_hash":{"type":["string","null"]},"status":{"type":"string"},"result":{"type":["object","null"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/RedemptionFulfillmentOrder"}}},"additionalProperties":true},"error":{"type":["object","null"],"additionalProperties":true},"expires_at":{"type":["string","null"],"format":"date-time"}}},"Event":{"type":"object","required":["id","event_type","payload","delivery_status","created_at"],"properties":{"id":{"$ref":"#/components/schemas/Uuid"},"order_id":{"type":["string","null"],"format":"uuid"},"event_type":{"type":"string"},"payload":{"type":"object","additionalProperties":true},"delivery_status":{"type":"string"},"delivery_attempts":{"type":"integer"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"request_id":{"type":"string","format":"uuid"}}}}}}
