# Selling Access to Your AVCodex Agent

Turn an AVCodex agent into a recurring product. Sell credit packs or subscriptions to clients, dealers, or trade partners through Stripe.

If you have already built an internal agent that helps your own team, you can package it for clients: an "AskOurAV" agent for end-clients to troubleshoot their own rooms, a Crestron-programmer assistant your dealers can subscribe to, or a SOP and spec-sheet bot for design firms. Stripe handles the payments. AVCodex handles the access.

## Pricing Models

| Model | Best for |
|-------|----------|
| **One-time credits** | Pay-per-use. Client buys credits, the agent burns them per message. Fits ad-hoc support contracts. |
| **Subscription** | Recurring monthly access. Fits dealer programs, managed-services clients, or in-house programmer seats. |

## Setting Up Payments

**1. Connect Stripe**

Open the **Access** page and click the **Sell** tab. Click the Stripe button to connect your account. If you do not have a Stripe account yet, you will create one during onboarding.

**2. Enable Monetization**

In the **Monetization** card, toggle it on. From here you can also configure:

- **Free Trial Credits**: how many credits new users start with.
- **Currency**: USD, EUR, GBP, BRL, and more.
- **Tax Behavior**: exclusive, inclusive, or unspecified.

**3. Create a Package**

In the **Packages** section, click **New Package**:

- **Name**: what users see (e.g. "100 Support Credits").
- **Package Type**: One Time or Subscription.
- **Credits**: for one-time packages, how many the user gets.
- **Price**: what to charge.

**4. Enable User Signup**

Monetization requires signup. Open the **Access** tab and confirm **User Signup** is on.

## One-Time Credit Packages

Users buy a credit bundle and burn credits per message.

### Setting Up Credits

1. Open **Access** -> **Sell**.
2. Click **New Package**.
3. Select **One Time** as Package Type.
4. Set credit count and price.
5. Click **Create Package**.

### Example Packs for an AV Helpdesk Agent

| Name | Credits | Price |
|------|---------|-------|
| Quick Fix | 100 | $9 |
| Site Pack | 500 | $39 |
| Portfolio | 2000 | $99 |

A managed-services AV firm might sell the **Site Pack** to a single-site client (one conference room and a boardroom) and the **Portfolio** pack to a national account with 30 rooms.

## Subscriptions

Recurring monthly access for ongoing relationships.

### Setting Up Subscriptions

1. Open **Access** -> **Sell**.
2. Click **New Package**.
3. Select **Subscription** as Package Type.
4. Set the monthly price.
5. Click **Create Package**.

Subscriptions provide unlimited access (no credit ledger).

A common pattern: $99/month per dealer for unlimited access to your Crestron-programmer assistant, or $499/month per client site for an end-user AV helpdesk that runs in their conference rooms via QR code.

## Free Trial Credits

Hand new users a few free credits so they can try the agent:

1. Open the **Monetization** card.
2. Set **Free Trial Credits** to a starter amount (10 is a common choice).
3. New users receive those credits automatically.

Useful for letting a prospective dealer or client kick the tires before they pay.

## Access Controls

### User Signup

Required for monetization. It also:
- Tracks per-user usage.
- Enables purchase history.
- Lets you ban or refund individual users.

### Domain Whitelisting

Restrict signups to a specific email domain:

1. Enable **Domain Whitelisting**.
2. Enter the domain (e.g. `acme-corp.com`).
3. Only emails on that domain can sign up.

Useful for an internal-tools rollout or a single-client deployment in a corporate AV environment.

### Email Gating

Whitelist specific email addresses:

1. Enable **Email Gating**.
2. Add the specific addresses allowed to sign up.

More restrictive than domain whitelisting. Good for a small dealer pilot or a named-user contract.

## Advanced Checkout Options

Inside the **Monetization** card, expand **Advanced Checkout Options**:

- **VAT Dynamic Tax**: auto-calculate VAT based on the buyer's country.
- **Collect Shipping Address**: request a shipping address at checkout.
- **Collect Phone Number**: request a phone number at checkout.
- **Collect Tax ID**: for business purchases.
- **Always Collect Billing Address**: even without VAT.
- **Allow Promotion Codes**: let users enter a discount code (handy for trade-show offers).

## Stripe Dashboard

Track revenue at [dashboard.stripe.com](https://dashboard.stripe.com):

- **Payments**: all transactions.
- **Subscriptions**: active subscribers.
- **Customers**: per-customer detail.
- **Reports**: revenue analytics.

## Managing Packages

### Edit a Package

Click a package in the table to edit it.

### Delete a Package

Click the delete button next to a package. Users who already bought are unaffected.

## Troubleshooting

### "Cannot enable monetization when user signup is disabled"

Monetization requires signup. Open the **Access** tab and enable **User Signup**.

### Stripe Not Connecting

1. Confirm you are signed in to the correct Stripe account.
2. Finish all Stripe onboarding steps.
3. If you stall, try the connection again from a fresh browser session.

### Users Cannot Purchase

1. Verify Stripe is connected.
2. Check that monetization is enabled.
3. Make sure at least one package exists.
4. Confirm user signup is enabled.

## Coming Soon: Action-Based Charging

We are exploring credit charges only when the agent performs specific actions, instead of charging per message.

**Why per-message charging is awkward:**
- Users get billed for "hi there" or a question that the agent could not answer.
- Credits drain even when no real outcome was delivered.
- Cost does not line up with the value the agent produced.

**Action-based charging would let you:**
- Charge only when a Custom Action runs (for example, "open a ticket in ServiceNow" or "generate a Crestron control system code skeleton").
- Tie cost to specific high-value behaviors.
- Let users chat freely and pay only for results.

> **Note:** Want this feature? Tell us. The more demand we see from AV ops teams, the sooner we ship it.

## Using with MCP

You can pull billing and subscription data programmatically through the AVCodex MCP Server.

### Available Tools

| Tool | Description |
|------|-------------|
| `get_credits` | View credit balance and usage |
| `get_subscription` | Get subscription tier details |

### Example Prompts

```
"What's my current credit balance?"
"Show me my subscription status."
```

### Workflow: Billing Overview

```
You: Show me my billing information.

Agent: [calls get_credits and get_subscription]

Current Plan: Pro ($29/mo)
Credit Balance: $7.50 remaining
Included Usage: $10/month

This month's usage:
- 2,341 messages processed
- $2.50 in AI costs
```

> **Note:** MCP server access requires a Builder plan or higher.

*AVCodex · Your AV expertise. Amplified by AI.*
