Marketplace API

Sell Resellers Marketplace products on your own website

One API for every store on the marketplace. Top up a wallet, call the API, and get the logins back in the same response.

1

Create an API account

Sign up as a reseller (separate from a seller account).

2

Top up your wallet

With Flutterwave or Paystack. Purchases are paid from it.

3

Request a key

Say what it’s for. It works once the admin approves it.

4

Call the API

List products, then POST an order to get the logins.

Basics

Base URL: https://www.resellersmarketplace.store/api/v1

Send your key in a header: Authorization: Bearer sk_live_…

Prices are in naira. Every response has "ok": true or "ok": false with an error code and message. Limit: 120 requests a minute per key.

Endpoints

MethodPathWhat it does
GET/productsEvery product in every live store. Filters: q, category, store (slug), in_stock=1, page.
GET/products/{id}One product, with stock and public previews.
GET/categoriesCategories, with how many products each has.
GET/balanceYour wallet balance.
POST/ordersBuy: {"product_id": "…", "quantity": 1}. Paid from your wallet; returns the logins.
GET/ordersYour purchases, newest first, with logins (100 per page).
GET/orders/{id}One purchase, with its login.

List products

curl https://www.resellersmarketplace.store/api/v1/products?in_stock=1 \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
{
  "ok": true,
  "page": 1, "per_page": 100, "total": 1,
  "products": [{
    "id": "clx…",
    "title": "Instagram 5K fashion page",
    "platform": "Instagram",
    "category": { "id": "clc…", "name": "Instagram" },
    "store": { "name": "Divine Logs", "slug": "divine-logs" },
    "price": 15000, "currency": "NGN", "stock": 12
  }]
}

Buy

curl -X POST https://www.resellersmarketplace.store/api/v1/orders \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "clx…", "quantity": 1}'
{
  "ok": true,
  "order": {
    "ids": ["cly…"], "product": "Instagram 5K fashion page",
    "store": "Divine Logs", "quantity": 1,
    "unit_price": 15000, "total": 15000, "currency": "NGN",
    "items": [{ "order_id": "cly…", "login": "page_one",
                "password": "••••", "details": "2FA: …" }]
  },
  "balance": 35000
}

JavaScript example

const API = 'https://www.resellersmarketplace.store/api/v1';
const headers = { Authorization: 'Bearer ' + process.env.MARKETPLACE_API_KEY, 'Content-Type': 'application/json' };

// Never call the API from the browser: keep your key on your server.
const { products } = await fetch(API + '/products?in_stock=1', { headers }).then((r) => r.json());

const res = await fetch(API + '/orders', {
  method: 'POST', headers,
  body: JSON.stringify({ product_id: products[0].id, quantity: 1 }),
}).then((r) => r.json());

if (!res.ok) throw new Error(res.error.message);
console.log(res.order.items); // [{ login, password, details }]

Errors

StatusCodeMeaning
401missing_key / invalid_keyNo key, or the key is wrong or revoked.
403key_pendingThe admin hasn’t approved this key yet.
402insufficient_balanceTop up your wallet.
400out_of_stockNot enough logs left for that quantity.
404not_foundThe product or order doesn’t exist or isn’t for sale.
429rate_limitedMore than 120 requests a minute.

If an order fails, you are not charged. Each login is sold once and never to anyone else.