Reseller API Documentation

Place orders programmatically with your reseller account. Your reseller discount is applied automatically and orders are charged to your wallet balance.

You are not an approved reseller yet, so the examples below use placeholders. Apply on your account page to get your API key.

1. Authentication

Every request must include your API key in the Authorization header as a Bearer token. Your account is identified entirely by this key — do not send a user_id field, it is ignored.

Authorization: Bearer YOUR_API_KEY

Base URL

https://api.mnxtopupbd.shop

2. Place an Order

POST /api/resaleorder

{
  "account_info": { "player_id": "123456789" },
  "selectedPackage": { "id": 1, "tag_line": "100" },
  "quantity": 1,
  "order_id": "YOUR-REF-0001",
  "url": "https://your-store.com/webhooks/topup"
}

Only selectedPackage.tag_line is used to find the package. selectedPackage.id must be present and positive but its value is ignored — send any positive number.

FieldTypeRequiredDescription
account_info.player_idstringYesPlayer/game ID (min 6 chars). Send "noplayerid" for products that don't need one.
selectedPackage.idnumberYes (unused)Any positive number.
selectedPackage.tag_linestringYesSelects the package — must match exactly.
quantitynumberYesPositive integer.
order_idstringNoYour own reference, stored with the order.
urlstringRecommendedYour webhook URL for async delivery results.

Billing: charged to your wallet balance first; if your account has a due credit limit set by the admin, the shortfall is drawn from that instead of failing outright (see due_used).

2b. Order Multiple Packages in One Request

Same endpoint — send an items array instead of selectedPackage + quantity to order several packages for the same player in one call.

{
  "account_info": { "player_id": "123456789" },
  "items": [
    { "tag_line": "100", "quantity": 1 },
    { "tag_line": "200", "quantity": 2 }
  ],
  "order_id": "YOUR-REF-0001",
  "url": "https://your-store.com/webhooks/topup"
}

Each item is priced, charged and dispatched independently — one item failing never blocks or double-charges the others.

3. Responses

Success response — 200:

{
  "success": true,
  "message": "Order Placed Successfully",
  "order": {
    "id": 10234,
    "order_id": "YOUR-REF-0001",
    "status": "complete",
    "payment": "complete",
    "package_name": "100 Diamonds",
    "sale_price": 95,
    "qty": 1,
    "content": "ABCD-EFGH-1234",
    "digicode": "ABCD-EFGH-1234",
    "due_used": 0
  },
  "items": [ ]
}
StatusmessageMeaning
200Your selected stock is not availableOut of stock — automatically refunded.
200Insufficient balanceTop up your wallet and retry.
200Package not foundtag_line didn't match any package.
401UnauthorizedMissing or invalid API key.
403Only reseller can buy this productReseller-only product, account not approved.
422validation messageA required field is missing/invalid.

3b. Place a Bulk Order (instant codes)

POST /api/resaleorder/bulk

For code/voucher packages that don't need a player ID. Every delivered code comes back directly in the response — no webhook.

{
  "items": [
    { "tag_line": "100", "quantity": 1 },
    { "tag_line": "200", "quantity": 2 }
  ]
}
{
  "message": "Order Placed Successfully",
  "total": 275,
  "due_used": 0,
  "orders": [
    { "tag_line": "100", "quantity": 1, "order_id": 10234, "price": 95, "line_total": 95, "codes": ["ABCD-1234"] }
  ]
}

All-or-nothing: if any line is invalid, out of stock, or your balance can't cover the total, nothing is charged.

4. Check Order Status

GET /api/resaleorder/status?order_id=YOUR-REF-0001

Look up by either order_id (your own reference, only for orders you placed with one) or id (our platform order id).

curl "https://api.mnxtopupbd.shop/api/resaleorder/status?order_id=YOUR-REF-0001" \
  -H "Authorization: Bearer YOUR_API_KEY"

5. Webhooks (order result callback)

Send a url in your order request and we will POST the result to it once delivered or failed. Respond with HTTP 200 to acknowledge.

POST <your url>
Content-Type: application/json

{
  "orderid": "YOUR-REF-0001",
  "status": "success",
  "content": "ABCD-EFGH-1234",
  "codes": ["ABCD-EFGH-1234"]
}

6. Finding a package's tag_line

Each package has a tag_line (a short label like "100"). Only tag_line is used to look up the package. See the live pricing on the packages page, or ask us for the exact values.

7. Validate a Player UID (optional)

GET /api/checkuid?uid=123456789

Returns the player's username if the UID is valid. No authentication required.

GET https://api.mnxtopupbd.shop/api/checkuid?uid=123456789
// 200 -> { "message": "PlayerUsername" }
// 400 -> { "message": "UID INVALID" }

8. cURL example

curl -X POST "https://api.mnxtopupbd.shop/api/resaleorder" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "account_info": { "player_id": "123456789" }, "selectedPackage": { "id": 1, "tag_line": "100" }, "quantity": 1, "order_id": "YOUR-REF-0001", "url": "https://your-store.com/webhooks/topup" }'

Keep your API key secret. Anyone with your key can place orders that draw from your wallet.