Skip to content

Rust Plugin (Oxide/uMod)

The Pixlpay Rust plugin integrates directly with your Oxide/uMod server to automatically deliver purchased items to players.

Features

  • Native Oxide/uMod integration
  • Automatic polling for pending deliveries
  • Support for purchases, refunds, and chargebacks
  • Online player queuing (wait for player to connect)
  • Admin commands for debugging and management
  • Detailed logging

Requirements

Installation

Step 1: Download the Plugin

Download PixlPay.cs from your Pixlpay dashboard under Settings > Game Servers > Downloads.

Step 2: Install the Plugin

Copy PixlPay.cs to your server's Oxide plugins directory:

oxide/plugins/PixlPay.cs

Step 3: Load the Plugin

Reload the plugin via RCON or server console:

oxide.reload PixlPay

The plugin will generate a default configuration file at oxide/config/PixlPay.json.

Configuration

Edit oxide/config/PixlPay.json:

json
{
  "Store Secret": "",
  "Server Secret": "",
  "Debug Mode": false,
  "Dev Mode": false,
  "Dev API URL": "http://localhost:8000"
}

Configuration Options

OptionDescription
Store SecretYour store's secret key (shared across all servers)
Server SecretThis specific server's secret key (unique per server)
Debug ModeEnable verbose logging for troubleshooting
Dev ModeUse development API URL instead of production
Dev API URLCustom API URL for local development

Getting Your Secrets

  1. Log in to your Pixlpay Dashboard
  2. Go to Settings > Game Servers
  3. Click on your Rust server (or add one)
  4. Click Show Credentials to reveal the secrets
  5. Copy both the Store Secret and Server Secret

Reload After Configuration

After entering your secrets, reload the plugin:

oxide.reload PixlPay

How It Works

  1. Plugin polls Pixlpay API every 60 seconds for pending notifications
  2. Three notification types are supported:
    • Purchase: Executes when player buys a product
    • Refund: Executes immediately when a refund is processed
    • Chargeback: Executes immediately when a dispute occurs
  3. Commands requiring online players are queued if player is offline
  4. When player connects, queued commands execute automatically
  5. Multiple commands per product are supported (one per line)
  6. Results are reported back to Pixlpay

Admin Commands

All commands require the pixlpay.admin permission.

CommandDescription
/pixlpay statusShow plugin status (API URL, mode, connection status)
/pixlpay pollForce poll for pending commands
/pixlpay queueShow pending deliveries waiting for players
/pixlpay history [count]Show command history (default: 10)
/pixlpay testTest API connection
/pixlpay debugToggle debug mode
/pixlpay heartbeatSend heartbeat to API

Permissions

PermissionDescription
pixlpay.adminAccess to all /pixlpay commands

Admin access is granted if the player has:

  • The pixlpay.admin Oxide permission, OR
  • Is set as ownerid in server config, OR
  • Is set as moderatorid in server config

Granting Permission

oxide.grant user <steamid> pixlpay.admin

Setting Up Products

When creating products in your Pixlpay dashboard, configure commands in the Delivery section.

Example Commands

Give Items:

inventory.giveto {steam_id} wood 1000
inventory.giveto {steam_id} stones 1000
inventory.giveto {steam_id} metal.fragments 500

Give Weapons:

inventory.giveto {steam_id} rifle.ak 1
inventory.giveto {steam_id} ammo.rifle 128

Server Messages:

say {player} just purchased VIP status!

Run Console Commands:

oxide.grant user {steam_id} vip.kit

Available Placeholders

PlaceholderDescription
{player}Player's display name
{steam_id}Player's Steam ID (64-bit)
{quantity}Quantity purchased
{order_id}Order ID
{order_number}Order number
{product_name}Product name
{customer_email}Customer email
{customer_name}Customer name

Multiple Commands

Add multiple commands, one per line:

inventory.giveto {steam_id} supply.signal 3
inventory.giveto {steam_id} rifle.bolt 1
inventory.giveto {steam_id} ammo.rifle 64
oxide.grant user {steam_id} vip.status
say {player} just became a VIP!

Execution Modes

Configure per-product in your Pixlpay dashboard:

ModeBehavior
ImmediateCommands execute immediately, even if player is offline
When OnlineCommands are queued until the player connects

For items that need to be given directly to a player's inventory, use "When Online" to ensure the player is connected.

Log Files

Logs are written to oxide/logs/PixlPay/:

FileContents
deliveries_YYYY-MM-DD.txtAll successful deliveries
errors_YYYY-MM-DD.txtErrors and warnings

Admin Notifications

If the plugin is not configured, admins will receive an in-game warning when they join the server. This helps ensure you don't forget to set up the plugin.

Troubleshooting

Authentication Errors (401/403)

Symptoms:

  • "Authentication failed" in logs
  • Commands not being received

Solutions:

  1. Verify both secrets are correct in config
  2. Check the keys match your Pixlpay dashboard
  3. Ensure you're using the correct Store Secret and Server Secret pair
  4. Reload the plugin after updating config

Commands Not Executing

Solutions:

  1. Enable debug mode: /pixlpay debug
  2. Check status: /pixlpay status
  3. Test connection: /pixlpay test
  4. Check the Oxide logs in oxide/logs/

Wrong API URL

Solutions:

  1. Check /pixlpay status to see current API URL
  2. If in dev mode, verify Dev API URL is correct
  3. Set Dev Mode to false for production

Player Not Found

Symptoms: Commands execute but player doesn't receive items.

Solutions:

  1. Ensure Steam ID format is correct (should be 17-digit Steam64 ID)
  2. Verify player is online if using "When Online" mode
  3. Check if player has inventory space
  4. Test command manually in console

Common Item IDs

ItemID
Woodwood
Stonestones
Metal Fragmentsmetal.fragments
High Quality Metalmetal.refined
Sulfursulfur
AK-47rifle.ak
Bolt Actionrifle.bolt
Thompsonsmg.thompson
Rocket Launcherrocket.launcher
C4explosive.timed
Supply Signalsupply.signal
Large Wood Boxbox.wooden.large

TIP

For a complete list of item shortnames, see the Rust Wiki or use a command like itemlist in your server console.

Security Best Practices

  1. Protect your config file - Don't expose oxide/config/PixlPay.json publicly
  2. Use unique Server Secrets - Each server should have its own secret
  3. Monitor your logs - Check for unauthorized access attempts
  4. Keep Oxide updated - Ensure you're running the latest version
  5. Backup configurations - Keep copies of your config files

Support

Built for game developers, by game developers.