Skip to content
Platform documentation
Plans & checkout
Core concepts

Plans & checkout

Sell a feature and settle directly to the provider’s wallet.

Define a plan

FieldExample
featureocr
name100 document credits
amount10.00 USDC
credits100
ttl_seconds2592000 seconds of access
merchant_walletThe provider wallet receiving the customer payment.
intervalonce for a single purchase; month for an explicit payer-authorized, fixed 30-day subscription.

Open a checkout session

Create a session server-side for a plan and holder. The checkout page lets the customer connect a wallet, transfer the exact token amount, and confirm the payment. Successful confirmation creates the grant.

typescript
const { session } = await bagseven.createCheckoutSession({
  plan_id: "your-plan-id",
  holder: "customer-123",
  billing_email: "customer@example.com",
  expires_in: 3600,
});

// Open this on your deployed console origin:
const checkout = new URL("/checkout", consoleOrigin);
checkout.searchParams.set("session", session.id);
Optional worker binding

Human checkout does not inherit the MCP worker and needs no deployed agent mandate. Supply worker_id only when access must be bound to a registered worker. Prepaid consumption still checks its holder, binding, expiry and credits.

Direct settlement and platform fees

The customer’s payment goes to the provider’s merchant wallet. Bagseven records a platform fee of 0.1% per payment as a separate amount owed by the provider. It is not deducted from the provider’s payment or added as an automatic split transfer.

Fee accrual is not collection

The platform records fee liability. Automated fee invoice collection is not implemented by the checkout flow.

Payment evidence

Confirmation checks a successful receipt, the configured token contract, the provider recipient, the paying wallet, the amount, and required confirmations. The paying wallet also signs payment authorization. Reusing a transaction for another checkout is rejected.

Bagseven documentationemail and wallet · Avalanche · Registry