Auto-delivery

Generate license keys or grant tokens when purchase webhooks fire — deliver via payload injection, customer email, or your connected bot.

Overview

When a request hits a webhook proxy with an active auto-delivery rule, NEX can generate a unique API key or grant token, set an expiry, and deliver it through one or more channels before the webhook is forwarded.

Purchase trigger

Set trigger to Purchase / payment event. NEX runs the rule only when a JSON field (default event) matches values like purchase, order.completed, or payment.succeeded.

{
  "event": "purchase",
  "userId": "123456789",
  "email": "[email protected]",
  "discordUserId": "987654321",
  "product": "VIP Pass"
}

Examples

Your server POSTs a purchase payload; NEX generates a time-limited API key, emails it to the buyer, and injects it into the forwarded JSON.

  1. Dashboard → Auto-Delivery → Setup
  2. Trigger: purchase · field event · value purchase
  3. Key type: API key · duration: 30 days
  4. Channels: email + payload · email field: email

Project files

  • ServerScriptService/
    • NexPurchaseWebhook.server.lua
NexPurchaseWebhook.server.lua
local HttpService = game:GetService("HttpService")
local WEBHOOK_URL = "https://nexrbx.com/api/webhooks/p/YOUR_PUBLIC_ID"

local function notifyPurchase(player, productName)
  local payload = {
    event = "purchase",
    userId = tostring(player.UserId),
    email = "[email protected]",
    product = productName,
  }
  pcall(function()
    HttpService:PostAsync(WEBHOOK_URL, HttpService:JSONEncode(payload), Enum.HttpContentType.ApplicationJson)
  end)
end

Delivery channels

API keys vs grant tokens

API keys (nex_dev_…) — verify via API keys or script licenses. Grant tokens (nex_grant_…) — one-time redeem below.

License products on purchase

When key type is API key, optionally select a License product. NEX creates both the API key and a license entitlement with HWID binding, device limits, leak alerts, and update channel access.

  1. Create a product under Licenses → Create product
  2. Auto-Delivery → API key mode → pick the product
  3. Set recipient field to userId to bind Roblox buyers

Pair with a storefront adapter on the webhook proxy so Gumroad, Sellix, and similar payloads normalize automatically.

Redeem endpoint

POST https://developer.nexrbx.com/api/developer/auto-delivery/redeem

{ "token": "nex_grant_…" }

Invalid, expired, or already-redeemed tokens return { "valid": false }.

Testing with replay

From Webhooks → Statistics → Recent events, click Replay to resend a stored payload without a live purchase.