Go back Stop polling tebex purchases and push them instead.
March 1, 2026

Bye bye tebex.jar

Stop polling tebex purchases and push them instead.

Replacing the Tebex Plugin With a Webhook-First Backend

This project moves purchase handling out of the game server plugin and into a backend. The backend receives Tebex webhooks, validates them, and stores purchase data for distributed game servers to consume.

What It Does

When a payment is completed, Tebex sends an event to a webhook endpoint. The backend processes it immediately and records a normalized purchase entry. This gives one consistent handling path for all servers.

  • Instant event handling after checkout.
  • Single backend flow for distributed systems.
  • No per-server plugin logic for purchase processing.

Why Remove Plugin-Based Purchase Handling

In multi-server environments, plugin-based handling can duplicate logic and create inconsistent outcomes. A backend-first design centralizes validation and processing. Every purchase follows the same rules, regardless of where players connect.

How the Webhook Flow Works

The flow is event-driven: Tebex sends, backend verifies, backend stores, servers consume.

flowchart LR
  A[Player completes checkout] --> B[Tebex sends payment.completed webhook]
  B --> C[Backend receives request]
  C --> D{Signature valid?}
  D -- No --> E[Reject request]
  D -- Yes --> F[Parse and map purchase data]
  F --> G[Store purchase entry]
  G --> H[Distributed game servers read shared state]

Signature Checks Are Mandatory

Webhook endpoints are reachable from outside. Signature checks verify that each request is authentic and unchanged. If the signature is invalid, the request is rejected and no purchase entry is written.

sequenceDiagram
  participant T as Tebex
  participant B as Backend
  participant S as Shared State

  T->>B: Webhook + signature
  B->>B: Verify signature
  alt Invalid signature
    B-->>T: 403 Rejected
  else Valid signature
    B->>B: Parse and map purchase
    B->>S: Store purchase entry
    B-->>T: 200 Accepted
  end

Result

The backend handles purchases instantly, scales better for distributed systems, removes dependence on plugin-side processing, and protects the pipeline through strict signature validation.