Skip to content

POST /api/v1/buy

POST https://su-persim.uz/api/v1/buy

Purchases an account from the store. The price is deducted from your wallet balance and an account is reserved for you.

Field Type Required Description
country_id integer yes The country id from GET /stock.
account_type string yes Either "ready" (ready-to-use logged-in account) or "session" (session file you download and log in yourself).

To make purchases safe against retries, pass an Idempotency-Key header. If a request with the same key (for the same user) has already succeeded, the original order is returned and your balance is not charged again.

POST /api/v1/buy — ready account
import requests
resp = requests.post(
"https://su-persim.uz/api/v1/buy",
headers={
"X-API-Key": "supersim_YOUR_API_KEY",
"Idempotency-Key": "order-abc-123",
},
json={"country_id": 1, "account_type": "ready"},
)
data = resp.json()
print(data["order_id"])
print(data["phone_number"])
print(data["password_2fa"])
{
"order_id": 42,
"phone_number": "+393791700000",
"country_name": "Italy",
"account_type": "ready",
"price": 1.5,
"password_2fa": "7z6yxsr",
"message": "Account purchased successfully. Use /api/v1/otp/{order_id} to fetch login code."
}

For session orders the phone number and password are returned, and the actual session files are available for download:

POST /api/v1/buy — session + download
import requests
# 1. Buy
buy = requests.post(
"https://su-persim.uz/api/v1/buy",
headers={"X-API-Key": "supersim_YOUR_API_KEY"},
json={"country_id": 2, "account_type": "session"},
).json()
order_id = buy["order_id"]
# 2. Download the session ZIP
files = requests.get(
f"https://su-persim.uz/api/v1/orders/{order_id}/download",
headers={"X-API-Key": "supersim_YOUR_API_KEY"},
)
open(f"order_{order_id}.zip", "wb").write(files.content)
  1. Buy

    POST /buy reserves the account and returns order_id.

  2. Get the OTP

    For ready accounts, GET /api/v1/otp/{order_id} returns the Telegram login code. With a webhook configured, the code is pushed to you automatically.

  3. Log in & finalize

    Log in to Telegram with phone_number + password_2fa + OTP, then call POST /api/v1/logout/{order_id}. The order status becomes completed.

HTTP code Scenario
400 Invalid account_type or insufficient balance.
404 Country not found/inactive, or no stock available.
422 Validation error (e.g. missing country_id).
429 Rate limit exceeded.

If you believe a purchased account is broken, run POST /api/v1/orders/{order_id}/validate and contact support with the order_id.