OG Accounts
TR
$
Kayıt ol
REST API · v2

Reseller API

Order, check your balance and collect deliveries from your own panel, bot or script. One endpoint, four actions, JSON answers.

POSThttps://ogsub.net/api/v2

Getting started

  1. Sign in, open API keys and create a key. It is shown once, so copy it to your server right away.
  2. Optionally lock the key to your server’s IP addresses (up to 20). Requests from any other address are refused.
  3. Send POST requests to the endpoint with your key and an action. Up to 5 keys can be active at once, and any of them can be revoked.

Request format

  • Body: form fields (application/x-www-form-urlencoded) or JSON with Content-Type: application/json.
  • Send the key in the body, never in the URL. Cookies and CSRF tokens are not used.
  • Answers are JSON in English. Amounts are strings with two decimals in Egyptian pounds (EGP), whatever currency the site shows.
  • Orders are paid from your wallet balance, so top up on the site before ordering.

Works with Perfect Panel API v2 clients: same parameter names (key, action, service, link, quantity, order, orders). Differences: every order is one unit (quantity 1), rate is the price of one order rather than per 1000, and there is no refill or cancel.

List services

POSTaction=services

Everything on sale with its current price. Fetch it before ordering: prices and availability change. Only key and action.

Example

curl -X POST https://ogsub.net/api/v2 \
  -d key=ogk_your_api_key \
  -d action=services
Response200 OK
[
    {
        "service": 12,
        "name": "ChatGPT Plus 1 Month",
        "type": "Default",
        "category": "ChatGPT",
        "rate": "350.00",
        "min": 1,
        "max": 1,
        "input": "email",
        "available": true,
        "refill": false,
        "cancel": false
    }
]

Response fields

FieldDescription
serviceService ID to send with add.
nameService name (English).
categoryBrand or category (English).
ratePrice of one order in EGP.
min maxAlways 1: each order is one unit.
inputWhat link must carry when you order: none, email or text.
availablefalse while the service is paused or sold out.
type refill cancelFixed (Default, false, false) for Perfect Panel clients.

Check balance

POSTaction=balance

Your wallet balance. Only key and action.

Example

curl -X POST https://ogsub.net/api/v2 \
  -d key=ogk_your_api_key \
  -d action=balance
Response200 OK
{
    "balance": "1250.00",
    "currency": "EGP"
}

Response fields

FieldDescription
balanceBalance in EGP.
currencyAlways EGP.

Place an order

POSTaction=add

Places one order and takes its price from your balance at once.

Parameters

ParameterRequiredDescription
serviceYesService ID from services.
linkPer serviceWhat the service needs, by its input: email: the account email to activate; text: the details asked for (2–255 characters); none: leave it out.
quantityNoLeave it out or send 1.
Idempotency-KeyRecommended HeaderA unique string per order, up to 64 characters (for example a UUID). Sending the same value again returns the same order instead of placing and charging a second one.

Example

curl -X POST https://ogsub.net/api/v2 \
  -H "Idempotency-Key: 3f9c2a7e-order-1042" \
  -d key=ogk_your_api_key \
  -d action=add \
  -d service=12 \
  --data-urlencode [email protected]
Response200 OK
{
    "order": "OG4K7Q2XNM",
    "charge": "350.00",
    "currency": "EGP"
}

Response fields

FieldDescription
orderOrder ID. Keep it to check the status.
chargeAmount taken from your balance.
currencyAlways EGP.

Coupons are not applied to API orders.

Order status

POSTaction=status

One order with order, or up to 100 with orders. Only your own orders are found.

Parameters

ParameterRequiredDescription
orderYesOne order ID.
ordersNoUp to 100 order IDs, comma-separated (instead of order).

Example

curl -X POST https://ogsub.net/api/v2 \
  -d key=ogk_your_api_key \
  -d action=status \
  -d order=OG4K7Q2XNM
Response200 OK
{
    "status": "Completed",
    "charge": "350.00",
    "currency": "EGP",
    "created": "2026-10-24 18:05:11Z",
    "delivery": "Activated on [email protected]"
}

Response fields

FieldDescription
statusSee the statuses below.
chargeAmount taken from your balance.
createdWhen it was placed, in UTC (YYYY-MM-DD HH:MM:SSZ).
deliveryOnly once Completed: what was delivered (often a login). Treat it as a secret.

Several orders at once

With orders, every ID maps to its own result. Unknown IDs get {"error": "Incorrect order ID"} and the call still succeeds.

curl -X POST https://ogsub.net/api/v2 \
  -d key=ogk_your_api_key \
  -d action=status \
  -d orders=OG4K7Q2XNM,OG9P3D5WLA
Response200 OK
{
    "OG4K7Q2XNM": {
        "status": "Completed",
        "charge": "350.00",
        "currency": "EGP",
        "created": "2026-10-24 18:05:11Z",
        "delivery": "Activated on [email protected]"
    },
    "OG9P3D5WLA": {
        "error": "Incorrect order ID"
    }
}

Order statuses

StatusMeaning
PendingPaid and waiting to be processed.
In progressBeing prepared.
CompletedDelivered: delivery holds the details.
CanceledNot delivered. The full charge is back in your balance.

Auto-delivered services usually finish within minutes; the team handles the rest. Keep checking status for the orders you are waiting on.

Errors

A failed call answers with an HTTP status outside 2xx and an error message. Check the status code first.

HTTP statusMeaningExample messages
400The request is incomplete or wrong.Unknown actionInvalid serviceQuantity must be 1Missing orderIncorrect order ID
401The key was not accepted.Invalid API keyIP address not allowed for this keyAccount disabled
403Your IP address is blocked by the store.
405The request was not a POST.
422The order cannot be placed now.Insufficient balance.This service is sold out for now.This service is temporarily unavailable.Enter a valid account email.Enter the required order details.Ordering is paused right now. Please check back soon.
429Too many requests. Slow down and retry later.Too many requests
500Server error. Retry later; if it repeats, send the ref value to support.Server error
Response
HTTP/1.1 422 Unprocessable Entity

{
    "error": "Insufficient balance."
}

Limits and retries

  • 60 requests per minute per key and 120 per minute per IP address. Above that the answer is 429.
  • If an add call times out or the connection drops, send it again with the same Idempotency-Key: you get the order that was already placed, never a second charge. Without the header every call is a new order.
  • Check up to 100 orders in one status call instead of one call per order, and wait 30–60 seconds between checks.

Keep the key safe

  • The key spends your balance. Use it only on your server, never in an app, a web page or a public repository.
  • Lock it to your server’s IP addresses when you can.
  • If it leaks, revoke it on the API keys page and create a new one. The old key stops working at once.
  • delivery holds what you bought (often a login). Store it as carefully as a password.

Full client example

Picks the first available service, orders it and waits for the delivery. The same flow in PHP, Python and Node.js: pick yours from the tabs.

<?php
const API = 'https://ogsub.net/api/v2';
const KEY = 'ogk_your_api_key'; // keep it on the server, e.g. in an environment variable

function og_api(array $params, array $headers = []): array
{
    $ch = curl_init(API);
    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query(['key' => KEY] + $params),
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => 30,
    ]);
    $body = curl_exec($ch);
    $code = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
    $data = is_string($body) ? json_decode($body, true) : null;
    if ($code !== 200 || !is_array($data) || isset($data['error'])) {
        throw new RuntimeException('API ' . $code . ': ' . ($data['error'] ?? 'no answer'));
    }
    return $data;
}

// 1. Pick the first available service
$services = og_api(['action' => 'services']);
$service = current(array_filter($services, fn (array $s): bool => $s['available']));
if (!$service) {
    exit("Nothing available right now\n");
}
// "link" carries what the service's input asks for: nothing, the account email, or the details
$link = ['none' => '', 'email' => '[email protected]', 'text' => 'the details the service asks for'][$service['input']];

// 2. Order it. On a timeout, send the same Idempotency-Key again: never a second charge.
$idem = bin2hex(random_bytes(16));
$order = og_api(['action' => 'add', 'service' => $service['service'], 'link' => $link], ['Idempotency-Key: ' . $idem]);

// 3. Wait for the delivery
do {
    sleep(30);
    $status = og_api(['action' => 'status', 'order' => $order['order']]);
} while (in_array($status['status'], ['Pending', 'In progress'], true));

echo $status['status'] === 'Completed' ? $status['delivery'] : "Canceled: the charge is back in your balance\n";