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.
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
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.
| Field | Type | Required | Description |
|---|---|---|---|
| account_info.player_id | string | Yes | Player/game ID (min 6 chars). Send "noplayerid" for products that don't need one. |
| selectedPackage.id | number | Yes (unused) | Any positive number. |
| selectedPackage.tag_line | string | Yes | Selects the package — must match exactly. |
| quantity | number | Yes | Positive integer. |
| order_id | string | No | Your own reference, stored with the order. |
| url | string | Recommended | Your 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).
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.
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": [ ]
}
| Status | message | Meaning |
|---|---|---|
| 200 | Your selected stock is not available | Out of stock — automatically refunded. |
| 200 | Insufficient balance | Top up your wallet and retry. |
| 200 | Package not found | tag_line didn't match any package. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Only reseller can buy this product | Reseller-only product, account not approved. |
| 422 | validation message | A required field is missing/invalid. |
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.
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"
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"]
}
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.
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" }
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.