Monetization

Selling keys

Issue keys automatically when your store reports a sale — SellAuth, SellSn or any store that sends signed webhooks.

On this page

How it works

A store webhook is a URL you paste into your store. When someone buys, the store calls it, SantiAuth checks the signature, generates the keys and answers with them — one key per line — so the store can hand them to the buyer as the delivered product.

  1. 1

    Buyer → Store

    Pays for the product

  2. 2

    Store → SantiAuth

    Calls your webhook URL with a signed payload

  3. 3

    SantiAuth

    Verifies the signature

  4. 4

    SantiAuth

    Generates N keys

  5. 5

    SantiAuth → Store

    Responds with the keys, one per line

  6. 6

    Store → Buyer

    Delivers the keys as the product

Supported stores:

StoreSignature headerAlgorithm
SellAuthX-SignatureHMAC-SHA256
SellSnX-Webhook-SignatureHMAC-SHA256
CustomX-Custom-Signature (configurable)HMAC-SHA256 (or SHA1 / SHA512)

Setting up

  1. Open Webhooks → Store webhooks and press New webhook.
  2. Give it a name (e.g. SellAuth main store) and pick the Store.
  3. Copy the Signing secret — it is generated for you — and paste it into your store's webhook / dynamic-delivery settings.
  4. Copy the webhook URL and paste it into the same place in your store. It looks like:
https://api.santiauth.com/api/v1/webhooks/execute/<webhook-id>
  1. Optionally turn on Refund handling.
  2. Press Test webhook — it sends a signed test event through the same pipeline as real deliveries. You should see the generated keys in the response.

Quantity

The number of keys is read from the payload field item.quantity (1 when missing, at most 100 per delivery). A buyer who orders 3 gets 3 keys.

Which keys are issued

Keys are created from your service's provider (or the provider set in provider_id). A webhook made in the dashboard issues Standard, lifetime keys. To change that, update the webhook's action_config through the API — see Update a webhook and the action_config fields:

OptionValues
Duration1–8760 hours, or unlimited
PremiumIssue Premium keys (SA_IsUserPremium = true)
One-timeThe key loads the script only once
Timer on first useDuration starts at the first execution, not at purchase
HWID limit1–100 devices per key
Quantity fieldAnother payload path instead of item.quantity
Providerprovider_id — which provider issues the keys

Custom stores

Pick Custom for any store that can send a signed JSON webhook:

  • The signature is HMAC(secret, raw request body) as hex, sent in X-Custom-Signature — a sha256= style prefix is accepted. The header name and algorithm (SHA1, SHA256, SHA512) can be changed through the API.
  • Conditions (API) let you skip deliveries that aren't sales of this product. Each condition checks a payload field with equals, contains, regex, exists, greater_than or less_than, combined with AND / OR groups. A skipped delivery returns 204 and generates nothing.

Refunds and chargebacks

Turn on Refund handling on a webhook to revoke an order's keys when the store reports a refund or chargeback:

  • Order ID field — JSON path to the order id in the payload (e.g. id or data.uniqid). Every issued key is linked to it.
  • Refund rule — a field, an operator and a value (e.g. event equals refund). Deliveries matching it revoke that order's keys instead of issuing new ones.
  • Ban holders — optionally also ban the Discord account and bound HWID of those keys.

A refund delivery answers 200 with JSON instead of keys:

json
{ "event": "refund", "order_id": "A1B2C3", "reason": "...", "order_found": true, "revoked": 3, "not_found": 0 }

Responses

StatusMeaning
200Keys generated. Body: the keys, one per line. For a refund: the JSON above.
204Webhook disabled or conditions not met — nothing generated.
400Missing or invalid signature, the body isn't JSON, or a refund without an order id.
403The caller's IP is blocked.
404Unknown webhook URL.
409The same delivery is still being processed — the store's retry later gets the first run's keys, never a second set.
413Payload larger than 1 MB.
429Too many requests from one IP (600 per minute). Retry-After says when to retry.
500Key generation failed (for example the service has no provider).

Logs and retries

Delivery logs on each webhook show every request: the sent body, the response and the generated keys. Failed deliveries are retried automatically up to 10 times with exponential backoff (from 30 seconds up to 1 hour between tries).