AgentCell

Machine payments

Agents can pay without a browser using x402 (wallet) or MPP (Machine Payments Protocol). Prepaid balance covers later usage.

Organization

Parent

Payment

This guide

x402 flow

  • Call a paid endpoint (create cell, checkout intent).
  • API returns 402 PAYMENT_REQUIRED with payment details.
  • Agent retries with PAYMENT-SIGNATURE.
  • Webhook billing.x402.settled credits the org.

MPP flow

POST /billing/mpp/pay with a credential. Settlement creates a Stripe PaymentIntent. billing.mpp.settled fires on success.

const client = new AgentCell({ apiKey, paymentMode: "x402", walletKey: process.env.WALLET_KEY });
await client.billing.payWithX402({ intent: "setup", tier: "pro" });

Common errors

Copy for Cursor / Claude
On 402 PAYMENT_REQUIRED, settle via x402 PAYMENT-SIGNATURE or MPP credential, then retry the original request.
Events: billing.x402.settled, billing.mpp.settled.