Seller API v1

Connect your own tooling to your Buy It HERE shop — products, stock, orders, balance, webhooks.

Authentication

Generate an API key in your shop dashboard (API section). Send it on every request:

Authorization: Bearer here_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Base URL: https://buyithere.xyz/api/v1 · Responses are JSON.

GET /api/v1/me — your shop info + balance
POST /api/v1/me/api-key — rotate your API key (old one stops working)
GET /api/v1/products — list products with stock counts
POST /api/v1/products — create a product
{ "slug": "my-product", "name": "My Product", "price_usd": 9.99, "kind": "stock", "section": "products", "description": "..." }
PATCH /api/v1/products/:id — update name, price, description, section, active, link_url, delivery_notes
DELETE /api/v1/products/:id — deactivate a product (soft delete)
GET /api/v1/products/:id/stock — list available stock + counts
POST /api/v1/products/:id/stock — add stock (one deliverable per item)
{ "items": ["user1:pass1", "user2:pass2"] }   // or { "text": "user1:pass1\nuser2:pass2" }
DELETE /api/v1/products/:id/stock/:stockId — remove one available item
GET /api/v1/orders?limit=50 — recent orders with fee breakdown
GET /api/v1/balance — wallet balance + recent transactions
GET/POST /api/v1/webhook — view or set your sale webhook URL
{ "url": "https://your-app.com/hook" }

Sale webhooks

When a sale is delivered we POST a signed JSON body to your webhook URL:

{ "event": "order.delivered", "shop_slug": "you", "order_id": "ord_...", "product_name": "My Product",
  "amount_usd": 10.09, "qty": 1, "email_masked": "a***@gmail.com", "pay_method": "USDT_TRON", "delivered_at": "..." }

Verify it with the x-here-signature header: sha256=HMAC_SHA256(rawBody, webhook_secret). Discord webhook URLs get a ready-to-post embed instead.

Example

# List products
curl https://buyithere.xyz/api/v1/products \
  -H "Authorization: Bearer here_yourkey"

# Push 5 keys into stock
curl -X POST https://buyithere.xyz/api/v1/products/prod_abc123/stock \
  -H "Authorization: Bearer here_yourkey" \
  -H "content-type: application/json" \
  -d '{"items": ["k1", "k2", "k3", "k4", "k5"]}'

← Back to Buy It HERE