Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Fulfillment channels · Boson Protocol
Skip to content

Fulfillment channels

Boson is a commitment / escrow protocol — it doesn't deliver the goods for you. What it does provide is a state machine that says when delivery is owed (after REDEEMED) and an opinionated set of channels for how to deliver, especially for digital and agent-to-agent commerce.

The five built-in channels

ChannelUseDelivery mechanism
InlineDirect HTTP responseThe seller's server returns the asset in the same response that confirms commit (atomic)
EmailDigital codes, links, instructionsServer sends an email containing the asset or a one-time link
XMTPAgent-to-agent, on-chain identityServer posts to the buyer's XMTP address
WebhookServer-to-serverServer POSTs to a URL the buyer provided at commit time
IPFS pointerLarge filesServer returns an IPFS CID; buyer fetches separately

The channels are implemented in @bosonprotocol/x402-fulfillment, but the concept applies to any seller — even an SDK-based marketplace.

Picking a channel

ScenarioChannel
Selling an API call responseInline
Selling a digital license / activation codeEmail
Selling agent-readable JSONXMTP or Inline
Selling a large file (model weights, dataset)IPFS pointer
Selling a physical good with trackingWebhook (your fulfillment system posts back)

Channel declaration (x402)

In x402, the seller's 402 Payment Required response advertises which channel(s) it supports. The client picks; the server delivers via that channel after on-chain settlement.

{
  "accepts": [{
    "scheme": "escrow",
    "fulfillment": {
      "channels": [
        { "id": "inline" },
        { "id": "email" }
      ]
    },
    "…": "…"
  }]
}

Custom channels can be registered via the FulfillmentChannel interface in x402-fulfillment.

Non-x402 delivery

If you're not using x402 — e.g. a marketplace selling physical goods — fulfillment is between your backend and your shipping system. The protocol's contract with you is "the exchange is REDEEMED; the buyer has signaled they want the goods." See Build → Sellers → Handle redemption / deliver.

Reorg / re-delivery safety

Two principles:

  1. Tie delivery to the VoucherRedeemed event, not to a subgraph read. Subgraph lag means you might miss redemptions; the event is the source of truth.
  2. Make delivery idempotent. Key on exchangeId. Re-firing the event (due to a reorg or replay) must not double-deliver. Persist a "delivered" flag per exchangeId.

Common footguns

  • Email delivery is asynchronous. A buyer who commits and immediately checks email may not see the message for 30+ seconds. Show "delivery in progress" in your UI.
  • Webhook handlers are public endpoints. Authenticate the request — the simplest is HMAC-sign the payload with a per-exchange secret.
  • XMTP requires the buyer's address to have an XMTP identity. Not every wallet has one. Have a fallback channel.

Where to look in code

Next