Skip to Content
DocsGuidesDefining Tiers & Usage Modes

Defining Tiers & Usage Modes

In FX402, tiers and modes define what users pay for and what they can do after payment.
Together, they form the backbone of the R402 payment model.


🧩 1. What Is a Tier?

A tier is a named pricing option specifying how long access lasts and how much it costs.

Example Tier

{ "id": "7d", "label": "1 Week Access", "duration_seconds": 604800, "price": { "amount": "2.00", "currency": "USDC", "chain": "solana" } }
FieldTypeDescription
idstringUnique key for this tier (e.g., 1d, 7d, 30d).
labelstringOptional, human-readable label.
duration_secondsnumberHow long access lasts, in seconds.
price.amountstringPayment amount.
price.currencystringThe currency (e.g., USDC, SOL).
price.chainstringBlockchain used for settlement.

Here are common tier setups:

TierDuration (seconds)Ideal For
1d86,400Trials, demo access
7d604,800Short-term licenses
30d2,592,000Monthly subscriptions
90d7,776,000Long-term/enterprise use

🧠 3. Usage Modes

Usage modes describe what renters can do with a resource.

"modes": ["view", "remix", "commercial-lite"]
ModeDescription
viewRead-only access; user may view or consume
remixAllows modification, reuse, or derivative works
commercial-liteLimited commercial use (e.g., social media sharing)
download (opt)Allows file download or local caching

Developers can define custom modes, as long as they’re clear and JSON-compatible.


🔗 4. Combining Tiers & Modes

Both can be included in a single R402 usage block:

{ "usage": { "tiers": [ { "id": "1d", "price": { "amount": "0.25", "currency": "USDC" } }, { "id": "7d", "price": { "amount": "1.00", "currency": "USDC" } } ], "modes": ["view", "remix"] } }

🧰 5. Design Tips

  • Keep tiers simple and predictable.
  • Prefer fewer tiers (1–3) for clarity.
  • Avoid fractional durations (e.g., 1.5d).
  • Label your modes clearly—they’re human-readable.

📚 Next Steps

Issuing & Verifying Receipts →

Last updated on