How Bagseven works
Follow the customer, payment, entitlement, and agent through the platform.
The access lifecycle
- 1
Define what you sell
A feature is a stable identifier. A plan connects that feature to a price, allocation, access duration, and provider wallet.
- 2
Collect a direct payment
Checkout fixes the plan and amount for a customer. The customer transfers the configured token to the provider’s wallet.
- 3
Verify and create access
The backend verifies payment ownership, recipient, token, amount, confirmations, and payment reuse before issuing a grant.
- 4
Check and consume
Applications and agents use the same living grant. Credits decrease on metered consumption; access expires at paid_through.
The three clocks
| Clock | Source of truth | What it means |
|---|---|---|
| Payment | Avalanche payment transaction | Evidence of settlement. |
| Renewal | Payer-authorized BagSubscriptionPlan contract and collection journal | Whether future collection is authorized and whether a due payment confirmed. A grant flag alone cannot authorize payment. |
| Access | remaining and paid_through on the grant | Whether the feature can be used now. |
Keep these separate in your product. A historical payment is not perpetual access. A renewal flag is not proof that the next payment has been collected.
The agent path
An MCP agent can inspect and use prepaid credits without making another payment. If it requests a new payment, the daemon resolves the registered worker, checks the required grant, obtains policy authorization, and executes within the on-chain mandate limits.
A React feature gate improves the interface. It does not replace the server check before protected work or the contract checks before spending.