irMarket Buyer API

Buy digital products programmatically and resell them in your own shop or bot. Base URL: https://api.irmarket.store

Prefer interactive testing? Open the Swagger UI — click Authorize, paste your anb_… key, and try every endpoint live.

Authentication

Every request needs your API key — either the X-API-Key header (recommended) or a ?key= query parameter. Keys are issued by the administrator. Your purchases are paid from your wallet balance; top up inside the Telegram bot (USDT or Rial). A key may be limited to certain product lanes (accounts, OTP numbers, SMM, games) and to a daily spend cap — /api/buyer/me reports lanes, daily_cap_usd and spent_today_usd.

curl -H "X-API-Key: anb_..." https://api.irmarket.store/api/buyer/balance

Endpoints

EndpointDescription
GET/api/buyer/productsProduct list with your prices and live stock
GET/api/buyer/products/{id}One product — same fields as the list, use it for stock checks
GET/api/buyer/balanceYour wallet balance (USD)
GET/api/buyer/meKey info + discount
POST/api/buyer/purchaseBuy a product; returns the delivered accounts
GET/api/buyer/orders/{id}Re-fetch an order's status and accounts
POST/api/buyer/orders/{id}/reissueOTP: swap a number that got no SMS (free, twice per order)
POST/api/buyer/orders/{id}/cancelOTP: refund a number before the SMS · SMM: stop a cancellable order
POST/api/buyer/orders/{id}/refillSMM: ask the panel to refill a dropped order
POST/api/buyer/webhookRegister a callback URL for order updates

Checking one product

To check a single product's stock or price, call /api/buyer/products/{id} instead of downloading the whole list — it returns the same object the list carries, in milliseconds. A product the list would not show answers 404.

curl -H "X-API-Key: anb_..." https://api.irmarket.store/api/buyer/products/364

Your prices

Every product in /api/buyer/products carries both the public price and yours, so you can show your customers what they save without hard-coding a rate:

{
  "id": 364,
  "name": "Gemini AI Pro 18 Month",
  "retail_usd": 12.00,            // public price
  "price_usd": 9.00,              // what YOU pay
  "discount_percent": 25.0,       // the rate applied to this product
  "savings_usd": 3.00,
  "effective_discount_percent": 25.0
}

Most products use your blanket rate (/api/buyer/mediscount_percent), but individual products can be set to a rate of their own — special_rate_products on /me tells you how many are. Always price from price_usd rather than applying your blanket rate yourself: a product rate, a promotion window, or our cost floor can all make the real number differ.

Webhooks

Instead of polling /orders/{id}, register a URL and we POST the order snapshot to it on every state change as JSON with "event": "order.updated" and a "reason": delivered, failed, otp.number_issued, otp.number_reissued, otp.code_received, otp.refunded, smm.started, smm.completed, smm.partial, smm.canceled, supplier.pending. Every request is signed: the X-Signature header is HMAC-SHA256(secret, body) — the secret is returned once when you register. Re-registering rotates the secret; answer with any 2xx status.

curl -X POST https://api.irmarket.store/api/buyer/webhook \
  -H "X-API-Key: anb_..." -H "Content-Type: application/json" \
  -d '{"url": "https://your-shop.com/callback"}'

Purchase

curl -X POST https://api.irmarket.store/api/buyer/purchase \
  -H "X-API-Key: anb_..." -H "Content-Type: application/json" \
  -d '{"product_id": 42, "quantity": 1, "idempotency_key": "my-shop-order-1001"}'

Response:

{
  "success": true,
  "order_id": 5130,
  "status": "delivered",
  "quantity": 1,
  "total_usd": 4.51,
  "accounts": ["[email protected] : Passw0rd  (verify: [email protected])"],
  "refunded": false
}

Always send an idempotency_key (your own order id, max 64 chars). If your request times out, repeat it with the same key — you'll get the original order back instead of being charged twice. Products flagged requires_email need a customer_email field in the body.

OTP numbers (SMS verification)

An OTP product sells one phone number that listens for one SMS. The number is issued the moment you purchase and the order stays processing until the code arrives, so read phone from the purchase response — do not wait for delivered:

{
  "order_id": 25753,
  "status": "processing",
  "phone": "+6287713094391",
  "otp_status": "waiting_sms",        // waiting_sms | code_received | refunded
  "expires_at": "2026-09-16T12:04:34+00:00",
  "sms_codes": []
}

Send the SMS to that number, then poll /api/buyer/orders/{id} (every 5–10 s) or wait for the webhook. When the code lands, otp_status becomes code_received and sms_codes holds it. If nothing arrives before expires_at the order is refunded automatically.

ActionCall
No SMS after 60 s? Get another number on the same order (free, at most twice)POST /api/buyer/orders/{id}/reissue
Give the number back and get refunded nowPOST /api/buyer/orders/{id}/cancel

Both answer 409 when they cannot act; the detail starts with the reason: too_soon, limit, has_code (the SMS just arrived — fetch the order), busy, no_number, not_pending, not_cancellable.

SMM services (followers, views, members)

An SMM service is quoted per 1000 units but ordered in raw units. Check pricing_unit on every product before you multiply anything:

FieldMeaning
pricing_unit"unit" for ordinary products, "per_1000" for SMM
price_per_1000_usdSet only when pricing_unit is per_1000
min_qty / max_qtyThe panel's own bounds — often a minimum of 100
requires_linkSend link: the channel/post the order delivers to
requires_commentsSend comments, one per line (the panel counts them)
refillThe panel accepts POST /api/buyer/orders/{id}/refill for this service (once per order per 24 h); the order then carries refill.status
cancelA running order can be stopped with POST /api/buyer/orders/{id}/cancel; the undelivered part is refunded when the panel confirms
required_inputsExtra keys for extras — e.g. ["smm_hashtag"] for a Mentions Hashtag service. Multi-value ones take one per line
curl -X POST https://api.irmarket.store/api/buyer/purchase \
  -H "X-API-Key: anb_..." -H "Content-Type: application/json" \
  -d '{"product_id": 1949, "quantity": 5000,
       "link": "https://t.me/mychannel",
       "idempotency_key": "my-shop-order-1002"}'

5000 units at price_per_1000_usd of $0.18 costs $0.90 — quantity ÷ 1000 × price.

SMM orders fill over minutes to hours, so they come back processing. Poll /api/buyer/orders/{id} for progress:

{
  "order_id": 11702,
  "status": "processing",
  "quantity": 5000,
  "start_count": 1240,
  "remains": 3100,
  "progress_percent": 38
}

A partially filled order is settled automatically: the delivered portion stands and the undelivered remainder is refunded to your wallet.

Order statuses

StatusMeaning
deliveredDone — accounts holds the credentials
processingStill fulfilling — poll /api/buyer/orders/{id}
failedCould not fulfil — if refunded is true the money is back in your wallet
cancelledNever charged

Errors

HTTPMeaning
401Missing/invalid/revoked API key
402Insufficient wallet balance, or the key's daily spend cap is reached (daily_cap)
403This key is not allowed to buy that product lane (lane_disabled)
404Unknown or unavailable product/order
409Not enough stock for the requested quantity; on re-issue/cancel/refill, the reason code in detail
400Quantity outside min_qty/max_qty, or a missing link/comments/customer_email, or an extras key named in required_inputs
429Rate limit (120 requests/minute unless your key has its own)

Questions or a new key → contact the shop admin on Telegram.