Skip to main content
Self-facilitation is the case where a resource server verifies and settles its own payments without a third-party facilitator. The x402 protocol allows it. StellarX402 does not encourage it.

What you give up

  • Fee sponsorship. Buyers now need XLM in addition to USDC. That kills most agent use cases.
  • Bazaar discovery. Listings come from the facilitator’s index. A self-facilitating server has to publish elsewhere, or be handed to agents out-of-band.
  • Neutral verification. Buyers are trusting the seller with the verify decision. This raises the trust bar significantly — acceptable for internal APIs, uncomfortable for public ones.
  • Ops surface. You now run a Stellar RPC client, a Soroban submit loop, and a sponsor account. See Operator Guides.

When it makes sense

  • Private internal APIs where the caller and callee share a security context and payment is more accounting than commerce.
  • Regulated environments where a third-party facilitator is not acceptable and buyers already trust the seller.
  • Research and demos where the facilitator distinction adds noise you do not want.

The interface

The @stellarx402/facilitator package exports the same verify/settle logic that the standalone facilitator uses. You can embed it:

The honest recommendation

Do not self-facilitate unless one of the three cases above applies to you. Use the hosted facilitator, or run your own dedicated facilitator instance that your servers point at over the network. It gives you almost all the control with none of the coupling.