Agent Pricing
PIE supports a marketplace where agent developers can monetize their agents. This guide covers how pricing works for both developers and users.
Pricing Models
Agents support three pricing models that can be combined:
| Model | Field | Unit | Description |
|---|---|---|---|
| Install Price | installPriceCents | cents | One-time fee on first install. Reinstalls are free. |
| Monthly Subscription | monthlyPriceCents | cents | Recurring 30-day charge. Auto-renewed from user balance. |
| Per-Usage Fee | perUsageMicrodollars | microdollars | Charged each time the agent executes (tool call or automation run). |
| Custom Usage | customUsageEnabled | boolean | Lets your code charge variable amounts via context.billing.chargeUsage(). |
You can combine models. For example, a monthly subscription with a per-usage fee, or just a one-time install price.
Microdollars
All internal amounts use microdollars (1 USD = 1,000,000 microdollars). This allows sub-cent precision for per-usage fees. For install and monthly prices, you set values in cents (e.g., 499 = $4.99).
Setting Prices (Developers)
Use the pricing API to set prices for your agent:
PUT /api/plugins/:id/pricingRequest body:
{
"installPriceCents": 499,
"monthlyPriceCents": 299,
"perUsageMicrodollars": 1000,
"freeUsageQuota": 100
}This would create an agent that costs:
- $4.99 one-time install fee
- $2.99/month subscription
- $0.001 per use after the first 100 free uses
All fields are optional and nullable. Set a field to null to remove that pricing model.
Free Usage Quota
The freeUsageQuota field lets you offer a number of free executions before per-usage charges begin. This is useful for letting users try your agent before paying.
{
"perUsageMicrodollars": 5000,
"freeUsageQuota": 50
}This charges $0.005 per use, but the first 50 uses are free.
Custom Usage Charges
For agents that incur variable costs per execution (phone calls, API pass-through, data processing), enable custom usage charging. This lets your code charge the user any amount during execution using context.billing.chargeUsage().
{
"customUsageEnabled": true,
"maxCustomChargeMicrodollars": 10000000
}This enables custom charging with a max of $10.00 per individual charge call.
How it works:
- Enable
customUsageEnabledvia the pricing API - Optionally set
maxCustomChargeMicrodollars(defaults to $5.00 / 5,000,000 microdollars if not set) - In your handler, call
context.billing.chargeUsage()with the amount and a description
async function handler(input, context) {
const callResult = await makePhoneCall(input.phoneNumber);
// Charge based on actual call duration
const costMicrodollars = Math.ceil(callResult.durationMinutes * 50000); // $0.05/min
await context.billing.chargeUsage({
amount: costMicrodollars,
description: `${callResult.durationMinutes}-min call to ${input.phoneNumber}`,
});
return { success: true, duration: callResult.durationMinutes };
}Limits:
- Minimum charge: 100 microdollars ($0.0001)
- Maximum charge per call:
maxCustomChargeMicrodollarsor $5.00 default - Maximum 10 charge calls per handler execution
- Description: 1-200 characters (shown to users in billing history)
Custom usage charges appear as "Agent Charge" in the user's billing history with the description you provide.
Retrieving Prices
GET /api/plugins/:id/pricingReturns the current pricing configuration (or null if the agent is free).
Revenue Share
- Developers receive 70% of gross earnings (default)
- PIE retains a 30% platform fee
- The platform fee percentage is stored per developer account and may vary
Earnings Tracking
Earnings are tracked per agent per month:
- Gross earnings: Total amount charged to users
- Platform fee: PIE's share
- Net earnings: Amount paid out to developer
Payouts
- Payouts are processed monthly on the 1st via Stripe Connect
- Minimum payout: $1.00
- Developers must complete Stripe Connect onboarding to receive payouts
- Payout status progresses:
pending->paid
Stripe Connect Setup
To receive payouts, developers create a Stripe Connect Express account:
- Go to the Developer page in PIE
- Click Set Up Payouts
- Complete the Stripe Connect onboarding flow
- Once verified, payouts are enabled automatically
You can access your Stripe dashboard at any time to view earnings and payout history.
How Users Are Charged
Prepaid Balance
All agent charges deduct from the user's prepaid balance. Users cannot install paid agents without sufficient balance.
Install Price
When a user installs an agent with an install price:
- PIE checks if the user previously purchased this agent (reinstalls are free)
- If not, PIE verifies sufficient balance
- The install price is deducted
- The purchase is recorded to prevent re-charging
Monthly Subscription
When a user installs an agent with a monthly subscription:
- The first month is charged immediately
- A subscription record is created with a 30-day period
- A daily cron job checks for expired subscriptions and auto-renews
- If the user's balance is insufficient at renewal, the subscription lapses
Per-Usage Fee
Each time the agent executes (tool call or automation run):
- PIE checks if the user is within the free quota
- If beyond the quota, the per-usage fee is deducted from balance
- Developer earnings are recorded
Top-Ups and Auto-Refill
- Users can add funds via Stripe Checkout (one-time top-up)
- Auto-refill can be enabled: when balance drops below a threshold, PIE automatically charges the user's saved payment method
- Default auto-refill threshold: $5.00, default refill amount: $20.00
Best Practices
- Start free - Consider offering a free tier or generous free quota to attract users
- Be transparent - Clearly describe what your agent does before users pay
- Price fairly - Per-usage fees should reflect actual API costs plus a reasonable margin
- Use free quota - Let users try before they buy with
freeUsageQuota - Test pricing - You can update pricing at any time via the API