# Sellitex > Sellitex is a platform for selling digital products with automatic delivery. This file summarises its public developer documentation: the REST API a store exposes to its own integrations, the webhooks a store can subscribe to, and the two delivery actions that call a merchant's own systems (delivery webhooks and RCON commands). Everything below describes one store. A token, a webhook subscription and a delivery action all belong to a single store, and none of them can reach another store's data. ## Conventions - Base URL: `https://sellitex.com/api/v1`. Every route answers in JSON. - Authentication: send `Authorization: Bearer sk_...` with a token created in the dashboard under Dashboard → API. The token is shown once, when it is created. - Money is an integer in cents: `4990` means 49.90 in the order's currency. - Dates are ISO 8601, in UTC. - Listings are paginated with `page` (1 to 10000, default 1) and `per_page` (1 to 100, default 20). A value outside the range returns 422. The response has `data`, `links` (`first`, `last`, `prev`, `next`) and `meta` (`current_page`, `last_page`, `per_page`, `total`). - Errors answer with an HTTP status and a JSON body with `message`. Validation errors (422) add an `errors` object keyed by field; state refusals (409) and endpoint-specific limits (429) add a stable `code`. - A record that belongs to another store answers 404, the same as one that does not exist. ## Guides - [Introduction](https://docs.sellitex.com): what the API covers and its conventions. - [Authentication](https://docs.sellitex.com/authentication): creating a token, sending it, and what each access level may call. - [Rate limits](https://docs.sellitex.com/rate-limits): limits per token, per store and per IP, and the 429 response. - [Errors](https://docs.sellitex.com/errors): error format and what each status means. - [Webhooks](https://docs.sellitex.com/webhooks): subscribing to store events, payloads, signature verification and retries. - [Delivery webhook](https://docs.sellitex.com/delivery-webhooks): the request a product's delivery action sends to the merchant's endpoint. - [RCON commands](https://docs.sellitex.com/rcon): running a command on a game server as a delivery action. ## API reference - [Orders](https://docs.sellitex.com/api-reference/orders): `GET /orders` (filters `status`, `email`, `customer_id`, `number`, `created_from`, `created_to`), `GET /orders/{id}`. The detail endpoint adds the order lines in `items`. - [Subscriptions](https://docs.sellitex.com/api-reference/subscriptions): `GET /subscriptions` (filter `status`), `GET /subscriptions/{id}`, `POST /subscriptions/{id}/cancel` (ends it when the paid period closes). - [Abandoned carts](https://docs.sellitex.com/api-reference/abandoned-carts): `GET /abandoned-carts` (filters `min_hours`, `type`), `GET /abandoned-carts/{id}`, `POST /abandoned-carts/{id}/notify` (signed-in customers only, once per 24 hours per cart), `DELETE /abandoned-carts/{id}`. - [Products](https://docs.sellitex.com/api-reference/products): `GET /products`, `GET /products/{id}`. - [License keys](https://docs.sellitex.com/api-reference/license-keys): `POST /license-keys/validate` with `key` and, optionally, `hwid` and `product_id`. - [Customers](https://docs.sellitex.com/api-reference/customers): `GET /customers` (filters `email`, `q`), `GET /customers/{id}` (adds `wallet_balance`). Only registered accounts, not guest buyers. Read-only. - [Notifications](https://docs.sellitex.com/api-reference/notifications): `GET /notifications`, `GET /notifications/{id}`, `POST /notifications` with `category`, `title`, `message` and optional `url` (broadcast to every customer, at most 10 per hour per store), `DELETE /notifications/{id}`. - [Reviews](https://docs.sellitex.com/api-reference/reviews): `GET /reviews` (filters `product_id`, `rating`), `GET /reviews/{id}`, `DELETE /reviews/{id}`. - [Tickets](https://docs.sellitex.com/api-reference/tickets): `GET /tickets` (filters `status`, `priority`), `GET /tickets/{id}` (with `messages`), `POST /tickets/{id}/messages` with `body`, `POST /tickets/{id}/close`, `POST /tickets/{id}/reopen`, `PUT /tickets/{id}/priority` with `priority`. - [Blacklist](https://docs.sellitex.com/api-reference/blacklist): `GET /blacklist` (filter `type`), `GET /blacklist/{id}`, `POST /blacklist` with `type` (`email` or `ip`), `value` and optional `reason`, `DELETE /blacklist/{id}`. - [Coupons](https://docs.sellitex.com/api-reference/coupons): `GET /coupons` (filters `code`, `is_active`), `GET /coupons/{id}`, `POST /coupons`, `PUT /coupons/{id}` (send every field; omitting `is_active` keeps it), `DELETE /coupons/{id}` (only if never used). - [Gift cards](https://docs.sellitex.com/api-reference/gift-cards): `GET /gift-cards`, `GET /gift-cards/{id}`, `POST /gift-cards` with `amount`, `quantity` and optional `expires_at`, `POST /gift-cards/{id}/ban`, `POST /gift-cards/{id}/unban`, `POST /gift-cards/redeem` with `code` and `customer_id`. - [Affiliates](https://docs.sellitex.com/api-reference/affiliates): `GET /affiliates` (with commission totals), `GET /affiliates/{id}`, `POST /affiliates`, `PUT /affiliates/{id}`, `DELETE /affiliates/{id}` (only if it never referred an order). Validating a license key and redeeming a gift card always answer 200, even when they reject the key or the card. Read `valid` (license keys) or `redeemed` (gift cards) and `reason` in the body, not the HTTP status. Creating answers 201 with the record, deleting answers 204 with no body. A refusal caused by the record's state answers 409 with a stable `code` in the body (for example `coupon_already_used`, `affiliate_has_conversions`, `guest_cart`). Every change made through the API is recorded in the store's audit log under the token's name. ## Token abilities Each route requires one ability, and a token carries a set of them: - `orders.read` - `products.read` - `customers.read` - `coupons.read` - `license-keys.validate` - `subscriptions.read` - `abandoned-carts.read` - `affiliates.read` - `notifications.read` - `reviews.read` - `tickets.read` - `blacklist.read` - `gift-cards.redeem` - `gift-cards.read` - `gift-cards.write` - `subscriptions.cancel` - `abandoned-carts.write` - `coupons.write` - `affiliates.write` - `notifications.write` - `reviews.write` - `tickets.write` - `blacklist.write` A token without the ability a route requires answers 403. The read-only access level holds every `*.read` ability except `gift-cards.read`, plus `license-keys.validate`; everything else (every write, `gift-cards.read` and `gift-cards.redeem`) needs full access. ## Store webhooks A store subscribes a URL to events under Dashboard → Webhooks. Each delivery is a POST with this JSON body: ```json { "event": "order.paid", "store": "my-store", "data": { "order_id": 123, "number": "A1B2C3D4E5", "status": "paid", "total": 4990, "currency": "BRL", "buyer_email": "buyer@example.com" }, "timestamp": "2026-08-19T14:32:00+00:00" } ``` Events: - `order.created` - `order.paid` - `order.refunded` - `order.cancelled` - `ticket.created` - `ticket.replied` - `review.created` - `product.created` - `product.updated` - `product.deleted` - `X-Sellitex-Idempotency-Key` is the same on every attempt of one delivery. Store it and ignore a delivery already processed. - When the subscription has a secret, `X-Sellitex-Signature` is the hex HMAC-SHA256 of the exact request body, computed with that secret. For 24 hours after a secret rotation, the old secret also signs `X-Sellitex-Signature-Previous`. Compare with a constant-time function. Every signed request also carries `X-Sellitex-Timestamp` (Unix seconds) and `X-Sellitex-Signature-V2`, the hex HMAC-SHA256 of `{timestamp}.{body}` with the same secret (`X-Sellitex-Signature-V2-Previous` during a rotation); check it and reject timestamps older than 5 minutes to refuse replays. - Only a 2xx response counts as delivered. Redirects are not followed. A failed delivery is retried after 5 minutes, then 30 minutes, then 120 minutes, up to 4 attempts in total. ## Delivery webhook A product can have a delivery action of type Webhook. It posts to a connection configured under Dashboard → Connections when the order is paid (`on_paid`), when the purchased access expires (`on_expire`) or when the order is refunded (`on_refund`). The response decides whether the delivery succeeded. ```json { "event": "delivery.granted", "reference": "order:123:item:456:action:78", "quantity": 1, "buyer_fields": { "nickname": "Steve" }, "plan": "vip", "delivery": { "id": 9876, "trigger": "on_paid", "order_item_id": 456 }, "timestamp": "2026-08-19T14:32:00+00:00" } ``` - `event` is the name the merchant gave the action. `plan` in the example comes from the action's extra payload, a JSON object whose keys are merged into the root of the body. - `delivery` and `timestamp` are always set by Sellitex. A later delivery of the same order item has a higher `delivery.id`, which orders a grant and a revocation. - `X-Sellitex-Idempotency-Key` carries the same value as `reference` on every attempt. - `X-Sellitex-Signature` is sent only when the connection has a secret, computed the same way as for store webhooks. There is no `X-Sellitex-Signature-Previous` here. - The endpoint has 15 seconds to answer with a 2xx. Retries follow the same schedule as store webhooks. ## Placeholders The extra payload of a delivery webhook and the command of an RCON action can use these placeholders: - `{{quantity}}`: units bought of the item. - `{{duration}}` and `{{duration_unit}}`: the duration of the purchased variant (`minutes`, `hours`, `days` or `months`). - `{{product}}` and `{{variant}}`: the names of the product and of the purchased variant. - `{{nickname}}`: what the buyer gave at checkout, when the product asks for that field. - `{{discord_id}}`: what the buyer gave at checkout, when the product asks for that field. - `{{player_id}}`: what the buyer gave at checkout, when the product asks for that field. - `{{note}}`: what the buyer gave at checkout, when the product asks for that field. ## RCON commands A delivery action of type RCON command runs a command template (2 to 500 characters) on a game server connection. - Buyer-supplied values are reduced to letters, digits, `_`, `.`, `:` and `-` before they enter the command. - A purchase of several units runs the command once per unit, so the command should not multiply by `{{quantity}}` as well. - A command that already ran cannot be undone. To take something back, add another action with the `on_expire` or `on_refund` trigger and the reverse command. - The whole exchange with the server has to finish in 15 seconds. A failed delivery is retried on the same schedule as webhooks, and a retry of a multi-unit purchase runs the command again from the first unit.