ManagerV LogoManagerV Docs

Tebex Integration Guide

Complete guide to integrate Tebex payment system with your store

Tebex Payment Integration

Complete guide to integrate Tebex Headless API for processing payments in your store system.

Tebex is a leading payment provider for gaming communities, supporting multiple payment methods and currencies worldwide.


Prerequisites

Before you begin, ensure you have:

  • ✅ A Tebex account (Sign up here)
  • ✅ A Tebex Webstore
  • ✅ Admin access to your dashboard
  • ✅ Backend server running

Overview

The Tebex integration uses the Headless API approach:

  • Products are managed in Tebex Dashboard
  • Baskets are created via API
  • Payments are processed by Tebex
  • Webhooks notify your system of completed payments

Architecture

[Your Store] → [Tebex API] → [User Checkout] → [Tebex Webhooks] → [Your Backend]

Step 1: Get Tebex Credentials

Create Tebex Account

  1. Go to Tebex.io
  2. Click "Sign Up"
  3. Create your account
  4. Verify your email

Create a Webstore

  1. Dashboard → Create Webstore
  2. Choose your game/platform
  3. Complete webstore setup

Get API Token

  1. Go to Webstore Settings
  2. Navigate to "Headless API" section
  3. Click "Create Token"
  4. Copy the token (format: t-xxxxxxxxxx)

Keep your token secure! Never commit it to public repositories.


Step 2: Configure Products in Tebex

Create Categories

  1. Tebex Dashboard → Packages
  2. Click "Categories"
  3. Create categories (e.g., VIP, Ranks, Items)

Add Products

  1. Go to "Packages""Create Package"
  2. Fill in product details:
    • Name: Product name
    • Price: Set price and currency
    • Description: Product description
    • Category: Select category
    • Image: Upload product image

Configure Commands (Optional)

For Minecraft/Gaming servers:

  1. Edit package → "Commands" tab
  2. Add commands to execute on purchase:
    give {username} diamond 64
    lp user {username} parent set vip

Step 3: Setup Webhook

Webhooks are crucial for receiving payment notifications.

Create Webhook in Tebex

  1. Dashboard → SettingsWebhooks
  2. Click "Add Webhook"
  3. Configure:
    • URL: https://yourdomain.com/api/store/webhook/{providerId}
    • Secret: Generate a secure random string

You'll get the providerId after creating the provider in your admin panel.

Select Events

Choose these events:

  • payment.completed - Payment successful
  • payment.refund - Refund issued
  • payment.chargeback - Chargeback received

Save Webhook Secret

Copy the webhook secret, you'll need it in the next step.


Step 4: Configure Provider in Admin Panel

Add Tebex Provider

  1. Login to your Admin Panel
  2. Navigate to Store → Settings
  3. Click "Add Provider"
  4. Select "Tebex" as provider type

Enter Credentials

Fill in the form:

FieldValueExample
NameProvider nameTebex Store
Public KeyYour Tebex tokent-xxxxxxxxxx
Webhook SecretFrom Step 3whsec_xxxxxx
ActiveEnable provider✅ Checked

Save Configuration

  1. Click "Save"
  2. Copy the Provider ID (you'll need this for webhook URL)

Update Webhook URL

  1. Go back to Tebex Dashboard → Webhooks
  2. Edit your webhook URL with the actual Provider ID:
    https://yourdomain.com/api/store/webhook/07baa137-3833-4534-832c-0c920961f82f

Step 5: Test the Integration

Test in Admin Panel

  1. Store → Packages (should show your Tebex products)
  2. Verify all products are visible
  3. Check categories are loaded

Test Checkout Flow

  1. Go to your shop page
  2. Add a product to basket
  3. Click "Checkout"
  4. You should be redirected to Tebex checkout

Complete Test Payment

  1. Use Tebex test cards (in test mode):

    • Card: 4242 4242 4242 4242
    • Date: Any future date
    • CVC: Any 3 digits
  2. Complete payment

  3. Check backend logs for webhook

Verify Transaction

  1. Admin Panel → Store → Transactions
  2. Your test transaction should appear
  3. Status should be "Completed"

Webhook Verification

Your backend automatically verifies webhooks using HMAC-SHA256.

How It Works

// Backend verifies each webhook
const signature = headers['x-signature'];
const isValid = verifySignature(payload, signature, webhookSecret);

if (!isValid) {
  return 403; // Forbidden
}

IP Whitelisting

Tebex webhooks come from these IPs:

  • 18.209.80.3
  • 54.87.231.232

If using Cloudflare, set SKIP_WEBHOOK_IP_CHECK=true in your .env file.


Troubleshooting

Products Not Loading

Problem: Shop page shows "No products found"

Solutions:

  1. Verify API token is correct
  2. Check products are published in Tebex
  3. Ensure products have a price set
  4. Check backend logs for API errors

Webhook Not Working

Problem: Payments successful but not recorded

Solutions:

  1. Verify webhook URL is correct (includes provider ID)
  2. Check webhook secret matches
  3. Review backend logs: /api/store/webhook/{providerId}
  4. Test webhook in Tebex Dashboard → Webhooks → Send Test

Invalid Signature Error

Problem: Webhook returns "Invalid signature"

Solutions:

  1. Verify webhook secret in admin panel
  2. Ensure secret matches Tebex webhook configuration
  3. Check raw body is preserved (required for signature verification)

Cloudflare Issues

Problem: Webhook IP validation fails

Solution:

# Add to backend .env
SKIP_WEBHOOK_IP_CHECK=true

Production Checklist

Before going live:

  • All products configured in Tebex
  • Prices are correct
  • Webhook URL updated with real provider ID
  • Webhook secret configured
  • Test purchase completed successfully
  • Transaction appears in admin panel
  • SSL/HTTPS enabled on your domain
  • Backend logs show successful webhooks

API Reference

Tebex Headless API Endpoints

Your backend uses these endpoints:

EndpointPurpose
/categoriesList all categories
/packagesList all products
/basketsCreate/manage baskets
/baskets/{id}/authGet checkout URL
/baskets/{id}/packagesAdd products to basket

Webhook Payload Example

{
  "id": "webhook-id",
  "type": "payment.completed",
  "date": "2024-11-05T12:00:00Z",
  "subject": {
    "transaction_id": "tbx-xxxxxx",
    "status": "Complete",
    "price": {
      "amount": 9.99,
      "currency": "USD"
    },
    "customer": {
      "email": "[email protected]",
      "username": "player123"
    },
    "products": [
      {
        "id": 12345,
        "name": "VIP Rank",
        "quantity": 1
      }
    ]
  }
}

Environment Variables

Add these to your backend .env:

# Cloudflare users (optional)
SKIP_WEBHOOK_IP_CHECK=true

# For production
NODE_ENV=production

Best Practices

Security

Do:

  • Keep webhook secret secure
  • Use HTTPS in production
  • Verify webhook signatures
  • Validate IP addresses (unless using Cloudflare)

Don't:

  • Commit secrets to git
  • Use HTTP in production
  • Skip signature verification
  • Disable security checks without reason

Product Management

Do:

  • Use clear product names
  • Add detailed descriptions
  • Upload high-quality images
  • Organize products in categories
  • Set appropriate prices

Don't:

  • Use confusing names
  • Leave descriptions empty
  • Forget to set prices
  • Mix unrelated products

Testing

Do:

  • Test in Tebex sandbox first
  • Complete full checkout flow
  • Verify webhook delivery
  • Check transaction records

Don't:

  • Test with real money initially
  • Skip webhook testing
  • Forget to check logs

Support Resources


Next Steps

After successful integration:

  1. ✅ Configure your products
  2. ✅ Test thoroughly
  3. ✅ Set up transaction monitoring
  4. ✅ Configure email notifications
  5. ✅ Review analytics regularly

Congratulations! Your Tebex integration is complete. You can now accept payments from players worldwide! 🎉


Additional Features

Coupons & Gift Cards

Tebex supports discount codes:

// Apply coupon
await basket.applyCoupon('SUMMER2024');

// Apply gift card
await basket.applyGiftCard('GIFT-XXXX-XXXX');

Subscription Products

Enable recurring payments in Tebex Dashboard:

  1. Edit product → "Subscription" tab
  2. Set renewal period (monthly, yearly)
  3. Save changes

Multi-Currency

Tebex automatically handles currency conversion:

  • Customer sees price in their local currency
  • You receive payment in your preferred currency
  • Exchange rates are updated automatically

Migration from Other Providers

Switching from another provider?

  1. Export existing customer data
  2. Recreate products in Tebex
  3. Configure webhooks
  4. Run parallel for testing period
  5. Switch completely when confident

Need help? Check our FAQ or Contact Support.