Home / API docs

API docs

Version v1 · for resellers and developers

Use the API to place orders, look up orders and fetch codes from your own code. The order amount is deducted straight from your account balance, so there's no need to pay for each order.

  1. Sign up, in Member Center Top up your balance.
  2. In Member Center → API Create a key to get your AppID and Secret, and we recommend also setting an IP whitelist.
  3. Follow the signing method below to call the API.
API endpointhttps://vynqlo.com/api/open/v1
Data formatRequests and responses are JSON, UTF-8 encoded
Amount unitIn CNY (yuan), up to 2 decimal places
Rate limitMax 10 requests per second per key; beyond that you'll get 429

Signing method

Include these 4 request headers with every request:

Request headersDescription
X-App-IdYour AppID
X-TimestampCurrent Unix timestamp (seconds); must be within 300 seconds of the server time
X-NonceRandom string, 16–32 characters; the same value can't be reused within 10 minutes
X-SignSignature; see below for how to compute it

Join the 5 items below with newline characters \n to get the string to sign:

timestamp\nnonce\nHTTP method (uppercase)\nrequest path (including query string)\nraw request body (empty string for GET requests)

Then use Secret Run HMAC-SHA256 and convert the result to lowercase hex. That is the X-Sign。

Python example

import hmac, hashlib, json, time, secrets, requests APP_ID = "vq_xxxxxxxxxxxxxxxx" SECRET = "your Secret" BASE = "https://vynqlo.com/api/open/v1" def call(method, path, body=None): raw = json.dumps(body, ensure_ascii=False, separators=(",", ":")) if body else "" ts, nonce = str(int(time.time())), secrets.token_hex(8) msg = "\n".join([ts, nonce, method, "/api/open/v1" + path, raw]) sign = hmac.new(SECRET.encode(), msg.encode(), hashlib.sha256).hexdigest() headers = {"X-App-Id": APP_ID, "X-Timestamp": ts, "X-Nonce": nonce, "X-Sign": sign, "Content-Type": "application/json"} return requests.request(method, BASE + path, headers=headers, data=raw.encode() or None).json() print(call("GET", "/balance"))

Product list

GET /products — returns every orderable product, your wholesale price and stock.

{ "code": 0, "data": [ { "sku": "apple.us.25", "name": "Apple gift card · US $25", "delivery": "code", // code = gift card code / link = pay by checkout link / username = direct top-up by username "price": 189.00, "stock": 167, // null for link-payment and username top-up items, meaning unlimited "fields": [] // extra fields required when ordering, see "Create order" } ] }

Check balance

GET /balance

{ "code": 0, "data": { "balance": 2380.50 } }

Create order

POST /orders — if your balance is enough, it's charged right away and processing starts.

ParameterRequiredDescription
skuYesSKU, see the "SKU list" at the end
quantityNoQuantity, default 1. Up to 10 per order for gift card items, 1 for everything else
out_trade_noYesYour own system's order number, 6–64 letters or digits. Resubmitting the same number returns the existing order and won't charge you twice
account_emailRequired for top-up by linkCustomer's account email
checkout_urlRequired for top-up by linkOfficial checkout link
usernameRequired for direct top-up by usernamee.g. Telegram username @name

Example request:

{ "sku": "chatgpt.plus.1m", "out_trade_no": "A20261119001",
  "account_email": "user@example.com",
  "checkout_url": "https://chatgpt.com/checkout/..." }

Example response:

{
  "code": 0,
  "data": {
    "order_no": "VQ2611190001",
    "out_trade_no": "A20261119001",
    "status": "processing",
    "amount": 169.00,
    "balance": 2211.50
  }
}

Look up order

GET /orders/{order_no}, or GET /orders?out_trade_no=your_order_no

{
  "code": 0,
  "data": {
    "order_no": "VQ2611190002",
    "out_trade_no": "A20261119002",
    "sku": "apple.us.25",
    "quantity": 2,
    "amount": 378.00,
    "status": "delivered",
    "cards": ["XXXX-XXXX-XXXX-XXXX", "YYYY-YYYY-YYYY-YYYY"],
    "created_at": 1795060000,
    "finished_at": 1795060003,
    "remark": ""
  }
}
statusMeaning
processingCharged, processing (link-payment and direct top-up orders usually take 5–30 minutes)
deliveredYour code has been issued. See it in cards in
completedTop-up or direct recharge completed
failedFailed, the amount has been returned to your balance. See the reason in remark

Callback notifications

After you set a callback URL in the Member Center, when an order changes to delivered、completed or failed we will POST order data to this address, with the same content as what data is the same.

  • Notifications also include X-App-Id、X-Timestamp、X-Nonce、X-Sign, signed the same way. Please verify the signature before processing.
  • On success, return HTTP 200 and the text success. Otherwise we retry after 1, 5, 15 and 60 minutes, up to 4 times.
  • You may receive several notifications for the same order; please order_no duplicates.

Error codes

codeDescription
0Success
1001Invalid signature, or missing request headers
1002Timestamp out of allowed range
1003Nonce reused
1004IP is not on the whitelist
2001SKU doesn't exist or has been removed
2002Out of stock
2003Missing required fields, or wrong field format
3001Insufficient balance
4001Order not found
429Too many requests

Error response format:{ "code": 3001, "message": "Insufficient balance" }

SKU list

Prices are current wholesale prices; see /products the API response prevails.

SKUProductsDeliveryPrice