How Pricing Works
Costs are determined server-side based on:| Factor | Description |
|---|---|
| Data size | Amount of data being stored (KB) |
| Indexed fields | Number and type of indexes on the collection |
| Price indexes | Value-based pricing via write/read price indexes |
| Creator premiums | Revenue sharing with content creators |
Inspecting Costs via Payment Callback
The payment callback receives anX402Quote with full cost details:
Estimating Batch Costs
For batch operations, the payment callback is invoked once for the entire batch. The quote reflects the total cost:Retention Costs
UsegetRetentionCost() to estimate ongoing storage costs for your collections:
Next Steps
Write Payments
Execute payments
PriceIndex
Value-based pricing