Delivery

Delivery System

How WERM ensures purchases are reliably delivered to players.

Hybrid Delivery Engine

WERM uses a hybrid delivery system that combines multiple methods to ensure 100% delivery reliability. Purchases are never lost, even if players are offline or servers experience downtime.

Webhook Push

Primary method

Plugin Polling

Fallback method

Offline Queue

Never lose a delivery

How Delivery Works

1

Order Created

When a player purchases a product, an order is created and queued for delivery.

2

Webhook Attempt

WERM immediately sends a signed webhook to your server with the delivery payload. If the player is online and the server confirms execution, delivery is complete.

3

Polling Fallback

If the webhook fails (server offline, timeout, etc.), the plugin automatically polls for pending deliveries every 15 seconds.

4

Offline Queue

If the player is offline, the delivery is queued. When they join, the plugin checks for pending deliveries and executes them.

Delivery Confirmed

Once commands execute successfully, the delivery is marked complete. One-time tokens ensure commands never run twice.

Delivery Methods Explained

Webhook Push (Primary)

The fastest delivery method. WERM sends an HMAC-signed HTTP request directly to your server's plugin endpoint.

  • • Delivery within milliseconds of purchase
  • • Cryptographically signed for security
  • • Includes nonce and timestamp for replay protection
  • • Automatic retries on failure

Plugin Polling (Fallback)

If webhooks fail (firewall, network issues), the plugin polls the WERM API for pending deliveries.

  • • Checks every 15 seconds by default
  • • Works even without port forwarding
  • • Configurable polling interval
  • • Lower bandwidth than webhooks

Offline Queue

Purchases made while a player is offline are queued and delivered when they next join the server.

  • • No time limit on queued deliveries
  • • Players notified on join
  • • Manual claim with /werm claim
  • • Full order history preserved

Command Execution

When a delivery is processed, WERM executes the commands you configured for the product:

Console Context

Commands run from the server console with full permissions

Sequential Execution

Commands run in order, one after another, with a small delay

Placeholder Replacement

Placeholders like {player}, {uuid}, {quantity} are replaced before execution

Error Handling

Failed commands are logged and reported back to WERM for monitoring

Delivery Statuses

StatusMeaning
pendingDelivery is queued and waiting to be sent
processingCommands are being executed on the server
completedAll commands executed successfully
queuedPlayer offline, waiting for them to join
failedDelivery failed after max retries (requires manual review)

Troubleshooting

Deliveries Not Arriving

Check that your server is verified, the plugin is installed and connected, and the player exists on the server.

Commands Not Working

Test commands manually in console first. Ensure plugins required by your commands are installed and loaded.

Webhook Failures

Webhooks require port forwarding or a reverse proxy. The plugin will fall back to polling automatically.

Manual Redelivery

Use /werm force <player> to manually trigger delivery check for a specific player.