{"openapi":"3.1.0","info":{"title":"ReSellCodes API","version":"1.0.0","description":"Programmatic access to your ReSellCodes reseller account.\n\nAuthenticate every request with your personal API key as a Bearer token. You can only ever read your own data.\n\nAll monetary amounts are strings with 4 decimal places, in USD.","contact":{"name":"Support","url":"https://t.me/supportresellcodes"}},"servers":[{"url":"/api/v1","description":"This host"},{"url":"https://resell.codes/api/v1","description":"Production"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Account","description":"Your account profile and balance."},{"name":"Transactions","description":"Your balance transaction history."},{"name":"Orders","description":"Track orders across all product types."},{"name":"Steam","description":"Steam top-ups and exchange rates."},{"name":"Telegram","description":"Telegram Stars and Premium."},{"name":"Manual services","description":"Manually-fulfilled services with a provider chat."},{"name":"Steam Gifts","description":"Gift Steam games/editions to a friend invite."},{"name":"Gift cards","description":"Buy gift-card codes (1–100)."},{"name":"Game keys","description":"Buy game key codes (1–100)."},{"name":"Game top-ups","description":"In-game top-ups delivered straight to the player's account."}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"Get your account","description":"Returns the authenticated account: balance, lifetime totals and rate limits.","operationId":"getMe","responses":{"200":{"description":"The account object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/transactions":{"get":{"tags":["Transactions"],"summary":"List your transactions","description":"Cursor-paginated list of your balance transactions, newest first. Use `next_cursor` from a response as the `cursor` of the next request.","operationId":"listTransactions","parameters":[{"name":"limit","in":"query","description":"How many to return (1–100).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"A transaction number. Returns transactions older than it (for the next page).","required":false,"schema":{"type":"integer","minimum":1}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["CREDIT","DEBIT"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["DEPOSIT","ORDER","ADJUSTMENT"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["PENDING","COMPLETED","CANCELLED"]}}],"responses":{"200":{"description":"A page of transactions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/transactions/{number}":{"get":{"tags":["Transactions"],"summary":"Get a transaction","description":"Fetch one of your transactions by its number. A number you do not own returns 404.","operationId":"getTransaction","parameters":[{"name":"number","in":"path","required":true,"description":"The transaction number.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"The transaction object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/orders":{"get":{"tags":["Orders"],"summary":"List your orders","description":"Cursor-paginated list of your orders, newest first.","operationId":"listOrders","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"An order number; returns orders older than it.","required":false,"schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["CREATED","PROCESSING","COMPLETED","FAILED","REFUND"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["STEAM_TOPUP","TELEGRAM_STARS","TELEGRAM_PREMIUM","MANUAL_SERVICE","STEAM_GIFT","GIFT_CARD","GAME_KEY","GAME_TOPUP"]}}],"responses":{"200":{"description":"A page of orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/orders/{number}":{"get":{"tags":["Orders"],"summary":"Get an order","description":"One of your orders by number, including its status history.","operationId":"getOrder","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"The order object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-topup/check-login":{"post":{"tags":["Steam"],"summary":"Check a Steam login","description":"Whether a Steam login can receive a wallet top-up.","operationId":"checkSteamLogin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["steam_login"],"properties":{"steam_login":{"type":"string","example":"ricardomoe3y"}}}}}},"responses":{"200":{"description":"Check result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SteamLoginCheck"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-topup/order":{"post":{"tags":["Steam"],"summary":"Create a Steam top-up","description":"Place a Steam wallet top-up. Your balance is charged immediately (face value minus your discount). Minimum 0.15 USD.","operationId":"createSteamTopup","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSteamTopup"}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-topup/rates":{"get":{"tags":["Steam"],"summary":"Steam top-up rates","description":"Current USD→RUB/UAH/KZT rates and the minimum top-up.","operationId":"getSteamRates","responses":{"200":{"description":"Current rates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SteamRates"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/telegram/stars":{"get":{"tags":["Telegram"],"summary":"Stars pricing","description":"Current price per star and min/max quantity.","operationId":"getStarsPricing","responses":{"200":{"description":"Stars pricing.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"telegram_stars_pricing"},"price_per_star":{"type":"string","example":"0.0152627"},"min":{"type":"integer","example":50},"max":{"type":"integer","example":10000},"updated_at":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/telegram/stars/buy":{"post":{"tags":["Telegram"],"summary":"Buy Telegram Stars","description":"Send Stars to a Telegram username. Charges your balance immediately (50–10000).","operationId":"buyStars","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["telegram_username","quantity"],"properties":{"telegram_username":{"type":"string","example":"durov"},"quantity":{"type":"integer","minimum":50,"maximum":10000,"example":50}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/telegram/premium":{"get":{"tags":["Telegram"],"summary":"Premium pricing","description":"Premium plans (months + USD price).","operationId":"getPremiumPricing","responses":{"200":{"description":"Premium pricing.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"telegram_premium_pricing"},"plans":{"type":"array","items":{"type":"object","properties":{"months":{"type":"integer","example":3},"price_usd":{"type":"string","example":"12.1977"}}}},"updated_at":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/telegram/premium/buy":{"post":{"tags":["Telegram"],"summary":"Buy Telegram Premium","description":"Gift Premium to a Telegram username. Charges your balance immediately.","operationId":"buyPremium","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["telegram_username","months"],"properties":{"telegram_username":{"type":"string","example":"durov"},"months":{"type":"integer","enum":[3,6,12],"example":3}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/manual-services":{"get":{"tags":["Manual services"],"summary":"List manual services","description":"Available manual-fulfillment services (e.g. Roblox Robux via login).","operationId":"listManualServices","responses":{"200":{"description":"Services.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"roblox"},"name":{"type":"string"},"kind":{"type":"string","example":"replenishment"},"chat":{"type":"boolean"},"info":{"type":["string","null"]},"image":{"type":["string","null"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/manual-services/{id}/offers":{"get":{"tags":["Manual services"],"summary":"Service offers + input fields","description":"Offers (prices already include your markup) and the buyer fields required to order.","operationId":"manualServiceOffers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Offers.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"manual_offers"},"service_id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":["string","null"]},"chat":{"type":"boolean"},"info":{"type":["string","null"]},"fields":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}}},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price_usd":{"type":"string"},"delivery_minutes":{"type":["integer","null"]},"note":{"type":["string","null"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/manual-services/order":{"post":{"tags":["Manual services"],"summary":"Create a manual-service order","description":"Charges your balance immediately. `fields` must include every field from GET /manual-services/{id}/offers.","operationId":"createManualOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["service_id","product_id"],"properties":{"service_id":{"type":"string","example":"roblox"},"product_id":{"type":"string","example":"62148018"},"fields":{"type":"object","additionalProperties":{"type":"string"},"example":{"username":"myacct","password":"••••"}}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/orders/{number}/chat":{"get":{"tags":["Manual services"],"summary":"Get order chat","description":"Chat thread for a manual-service order.","operationId":"getOrderChat","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Chat state + messages.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"chat"},"chat_frozen":{"type":"boolean"},"chat_opened":{"type":"boolean"},"chat_read_only":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"tags":["Manual services"],"summary":"Send a chat message","description":"Send text and/or an image to the order chat (multipart/form-data).","operationId":"sendOrderChat","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"body":{"type":"string"},"image":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"The sent message.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-gifts/games":{"get":{"tags":["Steam Gifts"],"summary":"List games","description":"Top games (the full catalog is ~173k). Cached ~10 min.","operationId":"listSteamGiftGames","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"Games.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"app_id":{"type":"integer","example":730},"name":{"type":"string"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-gifts/games/{appid}":{"get":{"tags":["Steam Gifts"],"summary":"Game offers + regions","description":"Editions with per-region prices (already include your markup). Fetched on demand, cached ~30 min.","operationId":"steamGiftGameOffers","parameters":[{"name":"appid","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Offers.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"steam_gift_offers"},"app_id":{"type":"integer"},"offers":{"type":"array","items":{"type":"object","properties":{"sub_id":{"type":"integer"},"name":{"type":"string"},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"price_usd":{"type":"string"}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/steam-gifts/order":{"post":{"tags":["Steam Gifts"],"summary":"Order a Steam gift","description":"Charges your balance immediately; the gift is sent to the Steam friend invite URL.","operationId":"createSteamGiftOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["app_id","sub_id","region","invite_url"],"properties":{"app_id":{"type":"integer","example":730},"sub_id":{"type":"integer","example":54029},"region":{"type":"string","example":"RU"},"invite_url":{"type":"string","example":"https://s.team/p/xxxxx"},"app_name":{"type":"string","example":"Counter-Strike 2"}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/gift-cards/categories":{"get":{"tags":["Gift cards"],"summary":"List categories","description":"Visible gift-card categories (search by name or id).","operationId":"listGiftCardCategories","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":600,"default":200}}],"responses":{"200":{"description":"Categories.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"total":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"category_id":{"type":"string","example":"roblox_ru"},"name":{"type":"string"},"image":{"type":["string","null"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/gift-cards/categories/{id}/cards":{"get":{"tags":["Gift cards"],"summary":"Category cards","description":"Cards (positions) with prices already including your markup. Hidden items are excluded.","operationId":"giftCardCards","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cards.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"gift_card_offers"},"category_id":{"type":"string"},"name":{"type":"string"},"image":{"type":["string","null"]},"offers":{"type":"array","items":{"type":"object","properties":{"card_id":{"type":"string","example":"199_robux"},"name":{"type":"string"},"price_usd":{"type":"string"},"stock":{"type":"integer"},"min_quantity":{"type":"integer"},"max_quantity":{"type":"integer"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/gift-cards/order":{"post":{"tags":["Gift cards"],"summary":"Buy gift-card codes","description":"Charges your balance immediately. Codes are delivered on the order once it completes (see `codes` on GET /orders/{number}).","operationId":"createGiftCardOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["category_id","card_id","quantity"],"properties":{"category_id":{"type":"string","example":"roblox_ru"},"card_id":{"type":"string","example":"199_robux"},"quantity":{"type":"integer","minimum":1,"maximum":100,"example":2}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/gift-cards/brands":{"get":{"tags":["Gift cards"],"summary":"Categories grouped by brand","description":"Categories grouped into brands with per-region subcategories (e.g. App Store & iTunes → CA, AT, …).","operationId":"giftCardBrands","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Brands.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"total":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string","example":"App Store & iTunes"},"subcategories":{"type":"array","items":{"type":"object","properties":{"category_id":{"type":"string"},"region":{"type":["string","null"],"example":"CA"},"image":{"type":["string","null"]}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/game-keys":{"get":{"tags":["Game keys"],"summary":"List games","description":"Visible game-key catalog. Filter by `q` (name/id), `region` (GLOBAL, CIS, …) or `platform` (steam, xbox, ea, rockstar).","operationId":"listGameKeys","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string","example":"GLOBAL"}},{"name":"platform","in":"query","required":false,"schema":{"type":"string","example":"steam"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":200}}],"responses":{"200":{"description":"Games.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"total":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"game_id":{"type":"string","example":"7_days_to_die_global"},"name":{"type":"string"},"region":{"type":"string","example":"GLOBAL"},"platform":{"type":"string","example":"Steam"},"region_restriction":{"type":"boolean","description":"When true, check GET /game-keys/{game_id}/region-restriction."},"image":{"type":["string","null"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/game-keys/{gameId}/keys":{"get":{"tags":["Game keys"],"summary":"Game key offers","description":"Key offers with prices already including your markup. Hidden items are excluded.","operationId":"gameKeyOffers","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Offers.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"game_key_offers"},"game_id":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"platform":{"type":"string"},"region_restriction":{"type":"boolean"},"image":{"type":["string","null"]},"keys":{"type":"array","items":{"type":"object","properties":{"key_id":{"type":"string"},"name":{"type":"string"},"price_usd":{"type":"string"},"stock":{"type":"integer"},"min_quantity":{"type":"integer"},"max_quantity":{"type":"integer"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/game-keys/{gameId}/region-restriction":{"get":{"tags":["Game keys"],"summary":"Region restriction","description":"Per-country availability for a region-restricted game (see the `region_restriction` flag in the catalog).","operationId":"gameKeyRegionRestriction","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Country lists.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"region_restriction"},"game_id":{"type":"string"},"region":{"type":"string","example":"CIS"},"has_availability":{"type":"boolean"},"available":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"AM"},"name":{"type":"string","example":"Armenia"}}}},"unavailable":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/game-keys/order":{"post":{"tags":["Game keys"],"summary":"Buy game keys","description":"Charges your balance immediately. Key codes are delivered on the order once it completes (see `keys` on GET /orders/{number}).","operationId":"createGameKeyOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["game_id","key_id","quantity"],"properties":{"game_id":{"type":"string","example":"7_days_to_die_global"},"key_id":{"type":"string","example":"7_days_to_die"},"quantity":{"type":"integer","minimum":1,"maximum":100,"example":1}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/top-ups/categories":{"get":{"tags":["Game top-ups"],"summary":"List categories","description":"Visible top-up categories (games). Filter by `q` (name/id).","operationId":"listTopupCategories","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":600,"default":200}}],"responses":{"200":{"description":"Categories.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"total":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"category_id":{"type":"string","example":"pubg_mobile_auto"},"name":{"type":"string","example":"PUBG Mobile (Auto)"},"note":{"type":["string","null"]},"image":{"type":["string","null"]}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/top-ups/categories/{id}/offers":{"get":{"tags":["Game top-ups"],"summary":"Category offers & fields","description":"Offers with prices already including your markup, plus the buyer input `fields` required by POST /top-ups/order. Hidden items are excluded.","operationId":"topupOffers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Offers.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"top_up_offers"},"category_id":{"type":"string"},"name":{"type":"string"},"note":{"type":["string","null"]},"image":{"type":["string","null"]},"fields":{"type":"array","description":"Buyer inputs to collect; keys go into the order's `fields`.","items":{"type":"object","properties":{"key":{"type":"string","example":"player_id"},"label":{"type":"string","example":"Player ID"},"type":{"type":"string","example":"text"}}}},"offers":{"type":"array","items":{"type":"object","properties":{"offer_id":{"type":"string","example":"60_uc"},"name":{"type":"string","example":"60 UC"},"price_usd":{"type":"string","example":"0.9161"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/top-ups/brands":{"get":{"tags":["Game top-ups"],"summary":"Categories grouped by brand","description":"Categories grouped into brands with per-region subcategories. Regions default to GLOBAL when the supplier does not specify one.","operationId":"topupBrands","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Brands.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","example":"list"},"total":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string","example":"PUBG Mobile"},"subcategories":{"type":"array","items":{"type":"object","properties":{"category_id":{"type":"string"},"name":{"type":"string","example":"PUBG Mobile (Auto)"},"region":{"type":"string","example":"GLOBAL"},"variant":{"type":["string","null"],"example":"Auto","description":"Delivery mode when the supplier offers variants (Auto, Fast, Manual, …)."},"image":{"type":["string","null"]}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/top-ups/order":{"post":{"tags":["Game top-ups"],"summary":"Buy a top-up","description":"Charges your balance immediately; delivery goes straight to the player's account. `fields` keys must match the category's fields. Poll GET /orders/{number} until `completed`.","operationId":"createTopupOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["category_id","offer_id","fields"],"properties":{"category_id":{"type":"string","example":"pubg_mobile_auto"},"offer_id":{"type":"string","example":"60_uc"},"fields":{"type":"object","additionalProperties":{"type":"string"},"example":{"player_id":"5123456789"}}}}}}},"responses":{"200":{"description":"The created order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"Your API key from the dashboard, sent as `Authorization: Bearer <key>`."}},"schemas":{"Account":{"type":"object","properties":{"object":{"type":"string","example":"account"},"nickname":{"type":"string"},"email":{"type":"string","format":"email"},"status":{"type":"string","enum":["ACTIVE","BLOCKED"]},"balance_usd":{"type":"string","example":"150.0000"},"total_orders":{"type":"integer","example":12},"total_spent_usd":{"type":"string","example":"1840.5000"},"created_at":{"type":"string","format":"date-time"}}},"Transaction":{"type":"object","properties":{"object":{"type":"string","example":"transaction"},"number":{"type":"integer","example":1024},"direction":{"type":"string","enum":["CREDIT","DEBIT"]},"type":{"type":"string","enum":["DEPOSIT","ORDER","ADJUSTMENT"]},"status":{"type":"string","enum":["PENDING","COMPLETED","CANCELLED"]},"amount_usd":{"type":"string","example":"50.0000"},"balance_after":{"type":"string","example":"150.0000"},"note":{"type":["string","null"],"example":"USDT · TRC-20"},"created_at":{"type":"string","format":"date-time"}}},"TransactionList":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"limit":{"type":"integer","example":20},"has_more":{"type":"boolean","example":true},"next_cursor":{"type":["integer","null"],"example":1004,"description":"Pass as `cursor` to fetch the next page; null on the last page."}}},"Order":{"type":"object","properties":{"object":{"type":"string","example":"order"},"number":{"type":"integer","example":12},"type":{"type":"string","example":"steam_topup"},"status":{"type":"string","enum":["created","processing","completed","failed","refund"]},"steam_login":{"type":["string","null"],"example":"ricardomoe3y","description":"Steam orders only."},"currency":{"type":"string","enum":["USD","RUB","UAH","KZT"],"description":"Steam orders only."},"amount":{"type":"string","example":"10","description":"Steam orders: amount in the chosen currency."},"amount_usd":{"type":"string","example":"10.0000","description":"Steam orders only."},"telegram_username":{"type":["string","null"],"example":"durov","description":"Telegram orders only."},"stars":{"type":["integer","null"],"example":50,"description":"Telegram Stars orders only."},"months":{"type":["integer","null"],"example":3,"description":"Telegram Premium orders only."},"service_id":{"type":["string","null"],"example":"roblox","description":"Manual service orders only."},"service_name":{"type":["string","null"],"description":"Manual service orders only."},"product_id":{"type":["string","null"],"description":"Manual service orders only."},"product_name":{"type":["string","null"],"description":"Manual service orders only."},"manual_kind":{"type":["string","null"],"example":"replenishment","description":"transfer | replenishment."},"chat_required":{"type":["boolean","null"],"description":"Manual service orders only."},"deadline_at":{"type":["string","null"],"format":"date-time","description":"Manual service orders only."},"app_id":{"type":["integer","null"],"example":730,"description":"Steam gift orders only."},"app_name":{"type":["string","null"],"example":"Counter-Strike 2","description":"Steam gift orders only."},"sub_id":{"type":["integer","null"],"example":54029,"description":"Steam gift orders only."},"offer_name":{"type":["string","null"],"description":"Steam gift orders only."},"region":{"type":["string","null"],"example":"RU","description":"Steam gift orders only."},"invite_url":{"type":["string","null"],"description":"Steam gift orders only."},"category_id":{"type":["string","null"],"example":"roblox_ru","description":"Gift card orders only."},"category_name":{"type":["string","null"],"description":"Gift card orders only."},"card_id":{"type":["string","null"],"example":"199_robux","description":"Gift card orders only."},"card_name":{"type":["string","null"],"description":"Gift card orders only."},"quantity":{"type":["integer","null"],"example":2,"description":"Gift card orders only."},"codes":{"type":"array","items":{"type":"string"},"description":"Gift card codes — delivered once the order is completed."},"charged_usd":{"type":"string","example":"9.7000","description":"Taken from your balance."},"status_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"status_history":{"type":"array","description":"Only present when fetching a single order.","items":{"type":"object","properties":{"status":{"type":"string"},"reason":{"type":["string","null"]},"at":{"type":"string","format":"date-time"}}}}}},"OrderList":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"limit":{"type":"integer","example":20},"has_more":{"type":"boolean"},"next_cursor":{"type":["integer","null"]}}},"CreateSteamTopup":{"type":"object","required":["steam_login","currency","amount"],"properties":{"steam_login":{"type":"string","example":"ricardomoe3y"},"currency":{"type":"string","enum":["USD","RUB","UAH","KZT"],"default":"USD"},"amount":{"type":"string","example":"10","description":"Amount in the chosen currency (USD ≤2 decimals)."}}},"SteamLoginCheck":{"type":"object","properties":{"object":{"type":"string","example":"steam_login_check"},"steam_login":{"type":"string","example":"ricardomoe3y"},"can_refill":{"type":"boolean","example":true}}},"SteamRates":{"type":"object","properties":{"object":{"type":"string","example":"steam_rates"},"base":{"type":"string","example":"USD"},"rates":{"type":"object","properties":{"USD":{"type":"number","example":1},"RUB":{"type":"number","example":78.12},"UAH":{"type":"number","example":44.87},"KZT":{"type":"number","example":474.84}}},"min_topup_usd":{"type":"string","example":"0.15"},"updated_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["unauthorized","forbidden","not_found","rate_limited","invalid_request","server_error"]},"message":{"type":"string"}}}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Account suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidRequest":{"description":"A query parameter was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded. See `Retry-After` and the `X-RateLimit-*` headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}