Payment rails that can own one leg of a mixed-cart checkout. The historical marketplace providers remain valid so existing games keep their one-provider behavior; IoTravel adds hosted WeTravel and connected-account direct Stripe.
Payment rails that can own one leg of a mixed-cart checkout. The historical marketplace providers remain valid so existing games keep their one-provider behavior; IoTravel adds hosted WeTravel and connected-account direct Stripe.
(handle-abort-refund-card-funding payload)(handle-accept-cart-offers payload)(handle-acknowledge-refund-funding-reconciliation payload)(handle-add-to-cart payload)Buyer fast-path: add a directly-buyable capability to a cart at the
listed price. Synthesizes a proposed offer for quantity units (default 1)
tagged :auto-generated, and considers it in the cart.
Buyer fast-path: add a directly-buyable capability to a cart at the listed price. Synthesizes a proposed offer for `quantity` units (default 1) tagged :auto-generated, and considers it in the cart.
(handle-approve-return payload)Seller approves a requested return, optionally attaching an RMA number, shipping instructions, and the amount they are willing to refund (defaults to the requested amount, or the order's remaining refundable total).
Seller approves a requested return, optionally attaching an RMA number, shipping instructions, and the amount they are willing to refund (defaults to the requested amount, or the order's remaining refundable total).
(handle-archive-cart payload)(handle-block-card-funded-buyer-refund-attempt payload)(handle-cancel-payment-leg payload)(handle-cancel-return payload)Buyer withdraws their own return request.
Buyer withdraws their own return request.
(handle-cancel-subscription payload)Stop future cycles. The buyer or the seller may cancel; the GM may too, since the provider can report a cancellation that happened out of band.
Stop future cycles. The buyer or the seller may cancel; the GM may too, since the provider can report a cancellation that happened out of band.
(handle-confirm-receipt payload)Buyer confirms they received the order and are satisfied. This is the fast
path for coseller payout release: confirming makes the order immediately
eligible for coseller/settle-checkout, instead of waiting for the
policy's :payout-hold-days window to elapse since payment. Idempotent —
confirming an already-confirmed order is a no-op, not an error.
Buyer confirms they received the order and are satisfied. This is the fast path for coseller payout release: confirming makes the order immediately eligible for `coseller/settle-checkout`, instead of waiting for the policy's :payout-hold-days window to elapse since payment. Idempotent — confirming an already-confirmed order is a no-op, not an error.
(handle-consider-offer payload)(handle-create-cart payload)(handle-declare-capability payload)(handle-deny-return payload)Seller denies a requested return. A denied return stops holding the order's coseller payout.
Seller denies a requested return. A denied return stops holding the order's coseller payout.
(handle-expire-refund-card-funding payload)(handle-expire-returns payload)Game Master sweep: a return the seller has left :requested for longer than the policy's :return-response-days auto-approves, so silence cannot strand a buyer. Auto-approval keeps the settlement freeze — the order stays held until a refund is issued — so this sweep is about visibility and refund eligibility, not about releasing money.
Game Master sweep: a return the seller has left :requested for longer than the policy's :return-response-days auto-approves, so silence cannot strand a buyer. Auto-approval keeps the settlement freeze — the order stays held until a refund is issued — so this sweep is about visibility and refund eligibility, not about releasing money.
(handle-express-intent payload)(handle-fee-adjustment-ledger-failed payload)(handle-fee-adjustment-ledger-succeeded payload)(handle-issue-refund payload)Seller (or an operator) refunds an amount against a paid order. Requires a caller-supplied :refund-id — that id is the ledger idempotency key and the PSP idempotency key, and is what makes a retried refund safe.
After settlement, seller refunds remain blocked for manual resolution. A GM discretionary reversal is instead funded entirely by @game and never claws back seller, platform, coseller, or future-earnings balances.
Seller (or an operator) refunds an amount against a paid order. Requires a caller-supplied :refund-id — that id is the ledger idempotency key and the PSP idempotency key, and is what makes a retried refund safe. After settlement, seller refunds remain blocked for manual resolution. A GM discretionary reversal is instead funded entirely by @game and never claws back seller, platform, coseller, or future-earnings balances.
(handle-mark-application-fee-refunded payload)The payment provider returned a seller-direct application fee. The buyer's refund is already final; this idempotent ledger effect removes only the reversed commission from @commission-escrow.
The payment provider returned a seller-direct application fee. The buyer's refund is already final; this idempotent ledger effect removes only the reversed commission from @commission-escrow.
(handle-mark-checkout-paid payload)Buyer marks an aggregate checkout as paid. Cascades :paid to every order in the checkout. The buyer pays the full retail total once; commissions are invisible to them.
Buyer marks an aggregate checkout as paid. Cascades :paid to every order in the checkout. The buyer pays the full retail total once; commissions are invisible to them.
(handle-mark-fulfilled payload)Seller records fulfillment/shipment for a paid order: sets fulfillment status and optional carrier / tracking-number / tracking-url. Orthogonal to the payment :status, so it is callable once the order is :paid (and still after :payment-received). Idempotent — re-marking with the same status is a success no-op that refreshes tracking fields.
Seller records fulfillment/shipment for a paid order: sets fulfillment status and optional carrier / tracking-number / tracking-url. Orthogonal to the payment :status, so it is callable once the order is :paid (and still after :payment-received). Idempotent — re-marking with the same status is a success no-op that refreshes tracking fields.
(handle-mark-payment-leg-failed payload)(handle-mark-payment-leg-paid payload)(handle-mark-payment-received payload)Seller confirms they received their payout for a specific order. Only callable once the buyer has paid the checkout (order is :paid).
Seller confirms they received their payout for a specific order. Only callable once the buyer has paid the checkout (order is :paid).
(handle-mark-refund-settled payload)The PSP confirmed the refund. Records the PSP refund id and emits the settle batch (@refunds-pending -> @refunds-paid). Idempotent: safe to call from the orchestration path AND from a redelivered webhook.
The PSP confirmed the refund. Records the PSP refund id and emits the settle batch (@refunds-pending -> @refunds-paid). Idempotent: safe to call from the orchestration path AND from a redelivered webhook.
(handle-mark-return-received payload)Seller confirms the returned goods arrived, optionally noting their condition. The usual precondition for issuing the refund.
Seller confirms the returned goods arrived, optionally noting their condition. The usual precondition for issuing the refund.
(handle-mark-return-shipped payload)Buyer ships the goods back and records carrier / tracking details.
Buyer ships the goods back and records carrier / tracking details.
(handle-prepare-card-funded-buyer-refund payload)(handle-propose-offer payload)(handle-query-capabilities payload)(handle-query-cart payload)(handle-query-carts payload)(handle-query-categories payload)(handle-query-checkout-batches payload)(handle-query-checkout-group payload)(handle-query-checkout-payment-details payload)Return the immutable order snapshots and aggregate application fee required to create a processor session. This is deliberately separate from the buyer order projection: commission stays hidden from buyers while the GM does not have to impersonate a seller to calculate the exact snapshotted fee.
Return the immutable order snapshots and aggregate application fee required to create a processor session. This is deliberately separate from the buyer order projection: commission stays hidden from buyers while the GM does not have to impersonate a seller to calculate the exact snapshotted fee.
(handle-query-checkouts payload)(handle-query-commerce-adapters payload)(handle-query-hashtags payload)(handle-query-intents payload)(handle-query-offers payload)(handle-query-orders payload)(handle-query-owned-cart payload)(handle-query-refunds payload)List refunds across orders. :filters {:status "reserved"} is the recovery query for refunds whose PSP call never completed; {:status "blocked-manual"} is the post-settlement operator queue.
List refunds across orders. :filters {:status "reserved"} is the recovery
query for refunds whose PSP call never completed; {:status
"blocked-manual"} is the post-settlement operator queue.(handle-query-returns payload)List returns across orders. The operator queue for auto-approved returns is :filters {:status "approved" :auto-approved true}.
List returns across orders. The operator queue for auto-approved returns is
:filters {:status "approved" :auto-approved true}.(handle-query-subscriptions payload)Subscriptions filtered by :buyer or :seller. The locked attribution chain is included deliberately: it is permanent once set, so it must be inspectable.
Subscriptions filtered by :buyer or :seller. The locked attribution chain is included deliberately: it is permanent once set, so it must be inspectable.
(handle-reconcile-seller-direct-funding payload)Correct the Market snapshot after an atomic, idempotent ledger batch has transferred the verified fee from buyer escrow to commission escrow and returned the seller's net to payment incoming. The batch precedes this event; a failed state update can then be retried without moving money a second time.
Correct the Market snapshot after an atomic, idempotent ledger batch has transferred the verified fee from buyer escrow to commission escrow and returned the seller's net to payment incoming. The batch precedes this event; a failed state update can then be retried without moving money a second time.
(handle-record-chargeback payload)A PSP dispute was opened against a checkout. Freeze the affected orders and record it — no ledger movement, because the money has not actually left and may come back if the dispute is won.
A PSP dispute was opened against a checkout. Freeze the affected orders and record it — no ledger movement, because the money has not actually left and may come back if the dispute is won.
(handle-record-checkout-payment-ref payload)Merge late-arriving payment metadata into an existing checkout's payment-ref. Used to backfill Stripe fee data after the payment has already been marked paid. Idempotent when the merge does not change state.
Merge late-arriving payment metadata into an existing checkout's payment-ref. Used to backfill Stripe fee data after the payment has already been marked paid. Idempotent when the merge does not change state.
(handle-record-external-refund payload)Ingest a refund created outside the market protocol (typically in the Stripe dashboard). The amount is allocated across the checkout's orders pro-rata by gross; unsettled portions are reserved on the ledger, settled portions are recorded :blocked-manual. Deduped on the PSP refund id.
Ingest a refund created outside the market protocol (typically in the Stripe dashboard). The amount is allocated across the checkout's orders pro-rata by gross; unsettled portions are reserved on the ledger, settled portions are recorded :blocked-manual. Deduped on the PSP refund id.
(handle-record-refund-card-payment payload)(handle-record-refund-card-session payload)(handle-record-refund-funding-charge-event payload)(handle-record-refund-funding-processor-fee payload)(handle-record-seller-checkout-paid payload)Record a verified seller-owned charge and fund only its application fee.
Record a verified seller-owned charge and fund only its application fee.
(handle-record-subscription-invoice-paid payload)Record any paid post-start subscription invoice (cycle or prorated update) as an ordinary paid order. Seller-direct invoices fund only their verified application fee; marketplace-owned invoices fund gross receipts.
Record any paid post-start subscription invoice (cycle or prorated update) as an ordinary paid order. Seller-direct invoices fund only their verified application fee; marketplace-owned invoices fund gross receipts.
(handle-record-subscription-started payload)Create or attach a provider to a stable Market subscription. A Free Liam entitlement can therefore become a paid Stripe subscription without losing its identity or the attribution chain captured at signup.
Create or attach a provider to a stable Market subscription. A Free Liam entitlement can therefore become a paid Stripe subscription without losing its identity or the attribution chain captured at signup.
(handle-record-woo-quote payload)(handle-refund-card-funding-ledger-failed payload)(handle-refund-card-funding-ledger-succeeded payload)(handle-refund-funding-charge-loss-ledger-failed payload)(handle-refund-funding-charge-loss-ledger-succeeded payload)(handle-refund-funding-fee-ledger-failed payload)(handle-refund-funding-fee-ledger-succeeded payload)(handle-refund-ledger-failed payload)MoM callback: the reserve batch failed (typically the funding account no longer holds the order's gross). No PSP call was made.
MoM callback: the reserve batch failed (typically the funding account no longer holds the order's gross). No PSP call was made.
(handle-refund-ledger-succeeded payload)MoM callback: the reserve batch committed. Internal refunds await the PSP; external refunds await a top-level mark-refund-settled event. MoM ignores effects returned by callbacks, so this callback cannot launch the settle leg.
MoM callback: the reserve batch committed. Internal refunds await the PSP; external refunds await a top-level mark-refund-settled event. MoM ignores effects returned by callbacks, so this callback cannot launch the settle leg.
(handle-refund-reverse-failed payload)MoM callback: the reverse leg failed, so funds are stranded in @refunds-pending. Operator territory.
MoM callback: the reverse leg failed, so funds are stranded in @refunds-pending. Operator territory.
(handle-refund-reverse-succeeded payload)MoM callback: the reserved amount went back to the buyer. The refund is terminally failed and stops holding the order.
MoM callback: the reserved amount went back to the buyer. The refund is terminally failed and stops holding the order.
(handle-refund-settle-failed payload)MoM callback: the settle leg failed AFTER the PSP already refunded the buyer. The money really left, so this is not a failed refund — it is a ledger discrepancy for an operator, and it keeps holding the order.
MoM callback: the settle leg failed AFTER the PSP already refunded the buyer. The money really left, so this is not a failed refund — it is a ledger discrepancy for an operator, and it keeps holding the order.
(handle-refund-settle-succeeded payload)MoM callback: @refunds-pending -> @refunds-paid committed. The refund is done.
MoM callback: @refunds-pending -> @refunds-paid committed. The refund is done.
(handle-register-category payload)(handle-register-commerce-adapter payload)Register public, non-secret capabilities for a seller-owned commerce adapter. Runtime URLs and credentials stay in the GM; Market stores only enough data to validate listings and let clients render provider-neutral checkout UI.
Register public, non-secret capabilities for a seller-owned commerce adapter. Runtime URLs and credentials stay in the GM; Market stores only enough data to validate listings and let clients render provider-neutral checkout UI.
(handle-register-hashtag payload)(handle-remove-from-cart payload)Buyer removes a previously-added listing line item from a cart. Only :auto-generated offers belonging to the actor can be removed this way; they are withdrawn and unconsidered atomically.
Buyer removes a previously-added listing line item from a cart. Only :auto-generated offers belonging to the actor can be removed this way; they are withdrawn and unconsidered atomically.
(handle-request-return payload)Buyer opens a return against a paid order. A seller may also call this on their own order (goodwill / recall), in which case the return is created already approved. Idempotent: an open return with the same reason is returned as-is rather than duplicated.
Buyer opens a return against a paid order. A seller may also call this on their own order (goodwill / recall), in which case the return is created already approved. Idempotent: an open return with the same reason is returned as-is rather than duplicated.
(handle-reserve-seller-refund payload)After platform-collected proceeds have settled, fund a voluntary refund from the seller's available Market balance. If insufficient, the atomic ledger effect fails and the refund returns to awaiting-seller-funding. Future seller earnings may make a later attempt fundable.
After platform-collected proceeds have settled, fund a voluntary refund from the seller's available Market balance. If insufficient, the atomic ledger effect fails and the refund returns to awaiting-seller-funding. Future seller earnings may make a later attempt fundable.
(handle-resolve-chargeback payload)A PSP dispute closed. won unfreezes the affected orders; lost closes the
dispute and defers the money movement to the external-refund path (the game
HTTP layer submits market/record-external-refund next), because the funds
really did leave.
A PSP dispute closed. `won` unfreezes the affected orders; `lost` closes the dispute and defers the money movement to the external-refund path (the game HTTP layer submits market/record-external-refund next), because the funds really did leave.
(handle-retire-category payload)(handle-retire-hashtag payload)(handle-retry-payment-leg payload)(handle-reverse-refund payload)The PSP rejected the refund after the ledger reserve committed. Returns the reserved amount to the buyer (@refunds-pending -> buyer).
The PSP rejected the refund after the ledger reserve committed. Returns the reserved amount to the buyer (@refunds-pending -> buyer).
(handle-rotate-card-funded-buyer-refund-attempt payload)(handle-set-marketplace-provider payload)Game Master selects the game-wide marketplace provider — the SaaS that operates the marketplace and owns checkout/settlement. Native :intergraph runs checkout
Game Master selects the game-wide marketplace provider — the SaaS that operates the marketplace and owns checkout/settlement. Native :intergraph runs checkout + payment itself; external providers own the whole flow while Intergraph captures the records as the cross-provider system of record.
(handle-set-returns-policy payload)Game Master sets the returns policy: how long a buyer may open a return (:return-window-days), how long a seller has to respond before the request auto-approves (:return-response-days), and how long a denied return keeps holding payout (:post-denial-grace-days). Absent fields keep their defaults.
Game Master sets the returns policy: how long a buyer may open a return (:return-window-days), how long a seller has to respond before the request auto-approves (:return-response-days), and how long a denied return keeps holding payout (:post-denial-grace-days). Absent fields keep their defaults.
(handle-set-seller-defaults payload)Register (or update) a seller's default commission rate (bps) and, optionally, the store commerce provider they run their store on (:shopify, :woocommerce, :printful, or native :intergraph — informational/system-of-record). This is a prerequisite for declaring capabilities and proposing offers.
Register (or update) a seller's default commission rate (bps) and, optionally, the store commerce provider they run their store on (:shopify, :woocommerce, :printful, or native :intergraph — informational/system-of-record). This is a prerequisite for declaring capabilities and proposing offers.
(handle-start-refund-card-funding payload)(handle-unconsider-offer payload)(handle-update-capability payload)(handle-update-cart payload)(handle-update-category payload)(handle-update-hashtag payload)(handle-update-intent payload)(handle-update-offer payload)(handle-update-subscription-status payload)(handle-withdraw-capability payload)(handle-withdraw-intent payload)(handle-withdraw-offer payload)(recurring-capability? capability)(validate-payload event-key payload)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |