v1 · JSON over HTTPS
Reseller API
Sell our catalog in your own shop, bot or app. List products with live prices and stock, place orders that are paid from your ProfileStock balance, and receive the account data by API or webhook, usually within seconds.
Base URL: https://profilestock.store/api/v1
Getting access
API keys are issued by our support team, not from the dashboard. Create an account, top up your balance, then contact support and ask for API access. You receive two values:
- API key (
psk_…): authenticates your requests. Keep it on your server only. - Webhook signing secret (
whsec_…): lets you check that webhooks really come from us.
Prices through the API are the same as on the website. Orders are paid from your balance; top up on the website.
Authentication
Send the key in the Authorization header of every request:
curl https://profilestock.store/api/v1/balance \ -H "Authorization: Bearer psk_your_key"
If a key leaks, ask support to revoke it; a revoked key stops working at once.
Errors and limits
Errors use HTTP status codes and a JSON body with a stable code:
{ "error": { "code": "insufficient_balance", "message": "Your balance is too low for this order.", "balance": "1.20", "required": "3.60" } }- 401 unauthorizedauth
- Missing, invalid or revoked key.
- 402 insufficient_balanceorders
- Balance below the order total; includes balance and required.
- 404 …_not_foundany
- Unknown product, SKU or order.
- 409 out_of_stockorders
- The SKU sold out.
- 422 invalid_…any
- A field failed validation; the message says which.
- 429 rate_limitedany
- More than 120 requests per minute per key.
Money is a decimal string in USD, for example "3.60". Times are ISO 8601 in UTC.
Balance
GET/api/v1/balance
{ "balance": "25.40", "currency": "USD" }Catalog
GET/api/v1/platforms
Platforms with the number of in-stock products.
{ "data": [ { "platform": "facebook", "name": "Facebook", "in_stock_products": 203 } ] }GET/api/v1/products
- platformstring
- Filter by platform key from /platforms, e.g. facebook, google, instagram.
- qstring
- Search in titles.
- in_stock1
- Only products with stock.
- page, per_pageinteger
- Pagination; per_page up to 100 (default 50).
{
"data": [
{ "id": 342, "title": "Facebook Hong Kong | Fresh 14 days+ | 2FA",
"platform": "facebook", "price_from": "0.60", "currency": "USD",
"stock": 7106, "sku_count": 1, "image": "https://…", "url": "https://profilestock.store/p/…" }
],
"meta": { "page": 1, "per_page": 50, "total": 203, "pages": 5, "note": "stock: -1 means unlimited" }
}GET/api/v1/products/{id}
Full product with its SKUs (variants). Buy a SKU, not a product.
{
"data": {
"id": 342, "title": "…", "platform": "facebook", "category": "…",
"description_html": "<p>Format: login:password:2fa …</p>",
"skus": [
{ "sku_id": 9001, "name": "Standard", "price": "0.60", "currency": "USD",
"stock": 7106, "min_quantity": 1, "max_quantity": 1000 }
]
}
}Orders
POST/api/v1/orders
Buys a SKU and pays from your balance. Stock and price are checked live before the sale.
- sku_idinteger, required
- From /products/{id}.
- quantityinteger
- Default 1; within min_quantity and max_quantity.
- external_idstring
- Your own reference, up to 100 of A–Z a–z 0–9 . _ : -. Sending the same external_id again returns the existing order instead of buying twice; use it for safe retries.
- callback_urlhttps URL
- Webhook URL for this order; overrides the URL set on your key.
curl -X POST https://profilestock.store/api/v1/orders \
-H "Authorization: Bearer psk_your_key" \
-H "Content-Type: application/json" \
-d '{"sku_id": 9001, "quantity": 2, "external_id": "my-order-1001"}'Answer 201. Many products are delivered at once, so delivery may already be filled:
{
"data": {
"order_no": "PS251115K7Q2MD", "external_id": "my-order-1001",
"status": "delivered", "product_id": 342, "sku_id": 9001, "title": "…",
"quantity": 2, "unit_price": "0.60", "total": "1.20", "refunded": "0.00", "currency": "USD",
"created_at": "2026-11-15T10:20:31Z", "delivered_at": "2026-11-15T10:20:33Z",
"delivery": { "format": "text", "content": "login1:pass1:…\nlogin2:pass2:…", "lines": ["login1:pass1:…", "login2:pass2:…"] }
}
}GET/api/v1/orders/{order_no}
One order with its delivery once available. Poll every 10–30 seconds while the status is processing, or use webhooks.
GET/api/v1/orders
Your orders, newest first, without delivery data. Query: page, per_page, or external_id to find one order by your reference.
Order statuses
- processinginterim
- Paid; the accounts are being prepared.
- deliveredfinal
- Data is in delivery.
- refundedfinal
- Could not be fulfilled; the full amount is back on your balance.
- partially_refundedfinal
- Part of the quantity was delivered, the rest refunded to your balance.
- canceledfinal
- Canceled before payment.
Webhooks
When an API order reaches a final status we POST an event to your webhook URL: the order's callback_url, or else the URL set on your key (ask support to set or change it). The body carries the order without account data; fetch GET /orders/{order_no} to read the delivery.
- order.deliveredevent
- The order is delivered.
- order.partially_refundedevent
- Part refunded to your balance.
- order.refundedevent
- Fully refunded to your balance.
- order.canceledevent
- Canceled.
- pingevent
- Test event from POST /api/v1/webhooks/test.
POST https://your-server.com/webhook
Content-Type: application/json
ProfileStock-Event: order.delivered
ProfileStock-Signature: t=1763202033,v1=5f2c…
{ "id": "evt_8K2M…", "event": "order.delivered", "created_at": "2026-11-15T10:20:33Z",
"data": { "order": { "order_no": "PS251115K7Q2MD", "external_id": "my-order-1001", "status": "delivered", … } } }Answer and retries
Answer with any 2xx status within 8 seconds. Otherwise we retry after 1 min, 5 min, 15 min, 1 h, 3 h, 6 h and 12 h. Events can arrive more than once: use the event id to ignore repeats.
Verify the signature
v1 is the hex HMAC-SHA256 of t + "." + raw body with your webhook signing secret. Compare in constant time and reject events whose t is more than 5 minutes old.
// Node.js (Express): use the raw body, not the parsed JSON
const crypto = require('crypto')
app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('ProfileStock-Signature') || ''
const t = (header.match(/t=(\d+)/) || [])[1]
const v1 = (header.match(/v1=([a-f0-9]+)/) || [])[1] || ''
const expected = crypto.createHmac('sha256', process.env.PS_WEBHOOK_SECRET)
.update(t + '.' + req.body).digest('hex')
const ok = v1.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected)) &&
Math.abs(Date.now() / 1000 - Number(t)) < 300
if (!ok) return res.status(400).end()
const event = JSON.parse(req.body)
// handle event.event and event.data.order …
res.sendStatus(200)
})<?php // PHP
$raw = file_get_contents('php://input');
preg_match('/t=(\d+),v1=([a-f0-9]+)/', $_SERVER['HTTP_PROFILESTOCK_SIGNATURE'] ?? '', $m);
$expected = hash_hmac('sha256', $m[1] . '.' . $raw, getenv('PS_WEBHOOK_SECRET'));
if (!$m || !hash_equals($expected, $m[2]) || abs(time() - (int)$m[1]) > 300) { http_response_code(400); exit; }
$event = json_decode($raw, true);
http_response_code(200);# Python (Flask)
import hmac, hashlib, time, re
@app.post('/webhook')
def webhook():
raw = request.get_data()
m = re.match(r't=(\d+),v1=([a-f0-9]+)', request.headers.get('ProfileStock-Signature', ''))
expected = hmac.new(SECRET.encode(), m.group(1).encode() + b'.' + raw, hashlib.sha256).hexdigest() if m else ''
if not m or not hmac.compare_digest(expected, m.group(2)) or abs(time.time() - int(m.group(1))) > 300:
return '', 400
event = request.get_json()
return '', 200POST/api/v1/webhooks/test
Sends a signed ping event to your key's webhook URL, or to url from the JSON body, and reports what your server answered.
{ "delivered": true, "status": 200 }