# Paymenter Configuration Commands

**Date:** March 23, 2026  
**Server:** Billing VPS (38.68.14.188)  
**Directory:** `/var/www/paymenter`  
**Method:** Laravel Tinker (`php artisan tinker`)

---

## Environment Check

```bash
cd /var/www/paymenter
php artisan --version
# Output: Laravel Framework 12.41.1
```

## Database Schema Discovery

```php
// Check existing products and categories
\App\Models\Product::count()  // 0
\App\Models\Category::count() // 2

// Discover category names
\App\Models\Category::all()->pluck('name', 'id')
// Output: 1 => "Support", 2 => "Minecraft Servers"

// Discover product table schema
\Schema::getColumnListing('products')
// No 'price' or 'billing_cycle' fields - uses Plan/Price model

// Discover plans table schema
\Schema::getColumnListing('plans')
\DB::select("SHOW COLUMNS FROM plans WHERE Field = 'billing_unit'")
// Enum: hour, day, week, month, year

\DB::select("SHOW COLUMNS FROM plans WHERE Field = 'type'")
// Enum: free, one-time, recurring

// Discover prices table schema
\Schema::getColumnListing('prices')
```

---

## Create Subscriptions Category

```php
$category = new \App\Models\Category();
$category->name = 'Subscriptions';
$category->slug = 'subscriptions';
$category->description = 'Firefrost Gaming subscription tiers - Choose your path and unlock server access';
$category->save();
echo "Created category ID: " . $category->id . "\n";
// Output: Created category ID: 3
```

---

## Product 1: The Awakened ($1 one-time)

```php
$product = new \App\Models\Product();
$product->name = 'The Awakened';
$product->description = 'The Handshake - $1 one-time payment. Unlocks whitelist access to all 13+ Minecraft servers. 1 home. Choose your path at Elemental tier.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();

$plan = new \App\Models\Plan();
$plan->name = 'One-Time Payment';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'one-time';
$plan->billing_period = 1;
$plan->billing_unit = null;
$plan->sort = 0;
$plan->save();

$price = new \App\Models\Price();
$price->price = 1.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();

echo "Created: The Awakened (Product: {$product->id}, Plan: {$plan->id}, Price: {$price->id})\n";
```

---

## Product 2: Fire Elemental ($5/month)

```php
$product = new \App\Models\Product();
$product->name = 'Fire Elemental';
$product->description = '🔥 Path of Fire - $5/month. 5 homes, 25 claimed chunks. Join GingerFury\'s Flamecrafter community. Unlock Fire-exclusive Discord channels.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();

$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();

$price = new \App\Models\Price();
$price->price = 5.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();

echo "Created: Fire Elemental (Product: {$product->id}, Plan: {$plan->id}, Price: {$price->id})\n";
```

---

## Product 3: Frost Elemental ($5/month)

```php
$product = new \App\Models\Product();
$product->name = 'Frost Elemental';
$product->description = '❄️ Path of Frost - $5/month. 5 homes, 25 claimed chunks. Join Frostystyle\'s Crystal Engineer community. Unlock Frost-exclusive Discord channels.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();

$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();

$price = new \App\Models\Price();
$price->price = 5.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();

echo "Created: Frost Elemental (Product: {$product->id}, Plan: {$plan->id}, Price: {$price->id})\n";
```

---

## Products 4-11: Batch Creation (Knight through Sovereign)

```php
// Fire Knight - $10/month
$product = new \App\Models\Product();
$product->name = 'Fire Knight';
$product->description = '🔥 Fire Path - $10/month. 10 homes, 49 claimed chunks, 4 force-loaded chunks. /rtp 30min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 10.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Fire Knight ($10/mo)\n";

// Frost Knight - $10/month
$product = new \App\Models\Product();
$product->name = 'Frost Knight';
$product->description = '❄️ Frost Path - $10/month. 10 homes, 49 claimed chunks, 4 force-loaded chunks. /rtp 30min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 10.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Frost Knight ($10/mo)\n";

// Fire Master - $15/month
$product = new \App\Models\Product();
$product->name = 'Fire Master';
$product->description = '🔥 Fire Path - $15/month. 20 homes, 100 claimed chunks, 9 force-loaded chunks. /rtp 15min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 15.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Fire Master ($15/mo)\n";

// Frost Master - $15/month
$product = new \App\Models\Product();
$product->name = 'Frost Master';
$product->description = '❄️ Frost Path - $15/month. 20 homes, 100 claimed chunks, 9 force-loaded chunks. /rtp 15min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 15.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Frost Master ($15/mo)\n";

// Fire Legend - $20/month
$product = new \App\Models\Product();
$product->name = 'Fire Legend';
$product->description = '🔥 Fire Path - $20/month. 35 homes, 121 claimed chunks, 16 force-loaded chunks. /rtp 10min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 20.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Fire Legend ($20/mo)\n";

// Frost Legend - $20/month
$product = new \App\Models\Product();
$product->name = 'Frost Legend';
$product->description = '❄️ Frost Path - $20/month. 35 homes, 121 claimed chunks, 16 force-loaded chunks. /rtp 10min cooldown.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Monthly Subscription';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'recurring';
$plan->billing_period = 1;
$plan->billing_unit = 'month';
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 20.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Frost Legend ($20/mo)\n";

// Sovereign (Founder) - $499 lifetime
$product = new \App\Models\Product();
$product->name = 'Sovereign (Founder)';
$product->description = '⚡ The Ascended - $499 lifetime. BOTH Fire + Frost paths. 50 homes, 225 claimed chunks, 81 force-loaded chunks. No /rtp cooldown. Exclusive Founder channels.';
$product->category_id = 3;
$product->stock = -1;
$product->hidden = false;
$product->save();
$plan = new \App\Models\Plan();
$plan->name = 'Lifetime Access';
$plan->priceable_type = 'App\Models\Product';
$plan->priceable_id = $product->id;
$plan->type = 'one-time';
$plan->billing_period = 1;
$plan->billing_unit = null;
$plan->sort = 0;
$plan->save();
$price = new \App\Models\Price();
$price->price = 499.00;
$price->setup_fee = 0.00;
$price->currency_code = 'USD';
$price->plan_id = $plan->id;
$price->save();
echo "Created: Sovereign (Founder) ($499 lifetime)\n";

echo "\n✅ ALL SUBSCRIPTION TIERS CONFIGURED!\n";
```

---

## Add Slugs to All Products

```php
$products = [
    2 => 'the-awakened',
    3 => 'fire-elemental',
    4 => 'frost-elemental',
    5 => 'fire-knight',
    6 => 'frost-knight',
    7 => 'fire-master',
    8 => 'frost-master',
    9 => 'fire-legend',
    10 => 'frost-legend',
    11 => 'sovereign-founder'
];

foreach($products as $id => $slug) {
    $product = \App\Models\Product::find($id);
    if($product) {
        $product->slug = $slug;
        $product->save();
        echo "Product {$id}: {$product->name} -> {$slug}\n";
    }
}

echo "\n✅ All slugs added!\n";
```

---

## Verification Commands

```php
// Count products in Subscriptions category
\App\Models\Product::where('category_id', 3)->count()
// Output: 10

// List all subscription products with prices
$products = \App\Models\Product::where('category_id', 3)->with('plans.prices')->get();
foreach($products as $product) {
    echo "Product: {$product->name}\n";
    foreach($product->plans as $plan) {
        echo "  Plan: {$plan->name} ({$plan->type}";
        if($plan->billing_unit) echo ", {$plan->billing_period} {$plan->billing_unit}";
        echo ")\n";
        foreach($plan->prices as $price) {
            echo "    Price: \${$price->price} {$price->currency_code}";
            if($price->setup_fee > 0) echo " (Setup: \${$price->setup_fee})";
            echo "\n";
        }
    }
    echo "\n";
}
```

---

## Privacy Fix: Update Elemental Tier Descriptions

```php
// Fix Fire Elemental
$product = \App\Models\Product::find(3);
$product->description = '🔥 Path of Fire - $5/month. 5 homes, 25 claimed chunks. Join GingerFury\'s Flamecrafter community. Unlock Fire-exclusive Discord channels.';
$product->save();

// Fix Frost Elemental
$product = \App\Models\Product::find(4);
$product->description = '❄️ Path of Frost - $5/month. 5 homes, 25 claimed chunks. Join Frostystyle\'s Crystal Engineer community. Unlock Frost-exclusive Discord channels.';
$product->save();

echo "✅ Fixed Elemental tier descriptions (nicknames only)\n";
```

---

## Product URLs

After configuration, products are accessible at:

```
https://billing.firefrostgaming.com/store/subscriptions
https://billing.firefrostgaming.com/store/subscriptions/the-awakened
https://billing.firefrostgaming.com/store/subscriptions/fire-elemental
https://billing.firefrostgaming.com/store/subscriptions/frost-elemental
https://billing.firefrostgaming.com/store/subscriptions/fire-knight
https://billing.firefrostgaming.com/store/subscriptions/frost-knight
https://billing.firefrostgaming.com/store/subscriptions/fire-master
https://billing.firefrostgaming.com/store/subscriptions/frost-master
https://billing.firefrostgaming.com/store/subscriptions/fire-legend
https://billing.firefrostgaming.com/store/subscriptions/frost-legend
https://billing.firefrostgaming.com/store/subscriptions/sovereign-founder
```

---

## Final Product IDs

| Product ID | Name | Price | Type |
|------------|------|-------|------|
| 2 | The Awakened | $1.00 | One-time |
| 3 | Fire Elemental | $5.00 | Monthly |
| 4 | Frost Elemental | $5.00 | Monthly |
| 5 | Fire Knight | $10.00 | Monthly |
| 6 | Frost Knight | $10.00 | Monthly |
| 7 | Fire Master | $15.00 | Monthly |
| 8 | Frost Master | $15.00 | Monthly |
| 9 | Fire Legend | $20.00 | Monthly |
| 10 | Frost Legend | $20.00 | Monthly |
| 11 | Sovereign (Founder) | $499.00 | One-time |

---

**Total Configuration Time:** ~45 minutes  
**Products Created:** 10  
**Plans Created:** 10  
**Prices Created:** 10  
**Status:** Complete and verified
