The official API by GenzShop for partners selling products automatically on their own website, app or bot.
GET /products.php.GET /balance.php.POST /purchase.php.deliveredAccounts and deliver it to the customer..php (e.g. /products.php). Missing .php returns an HTML 404 page instead of JSON.HTTPS_REQUIRED).replay: true and does not charge again.OUT_OF_STOCK error.errorCode to know how to handle it.Base URL:
https://genzshop.vn/api/partner/v1
Every request must include the auth header (recommended: X-API-Key):
X-API-Key: YOUR_API_KEY
Or use the Bearer standard (equivalent):
Authorization: Bearer YOUR_API_KEY
/products.php
Get the list of products currently on sale, with reseller pricing and stock.
curl "https://genzshop.vn/api/partner/v1/products.php" \ -H "X-API-Key: YOUR_API_KEY"
Response (abbreviated):
{
"success": true,
"walletCurrency": "VND",
"products": [
{
"product_id": "CUR-0001",
"name": "Cursor Pro 1 tháng",
"description": "Tài khoản Cursor Pro dùng 1 tháng",
"type": "cursor",
"walletCurrency": "VND",
"walletPricing": 120000,
"walletPricingText": "120.000 VND",
"available": 38
}
]
}
Use product_id (the SKU) to purchase. If a product is temporarily out of stock, the purchase call returns an OUT_OF_STOCK error.
/balance.php
View the current wallet balance of the account linked to the API key.
curl "https://genzshop.vn/api/partner/v1/balance.php" \ -H "X-API-Key: YOUR_API_KEY"
{
"success": true,
"walletCurrency": "VND",
"balance": 5000000,
"balanceText": "5.000.000 VND"
}
/purchase.php
Buy and receive accounts instantly. Charges the wallet balance and returns accounts in deliveredAccounts.
curl -X POST "https://genzshop.vn/api/partner/v1/purchase.php" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_id": "CUR-0001",
"quantity": 1,
"idempotency_key": "don-khach-0001"
}'
Body parameters:
| Parameter | Type | Description |
|---|---|---|
product_id | string | Product SKU, e.g. CUR-0001 (required) |
quantity | integer | Quantity 1..1000 (required) |
idempotency_key | string | 8..128 chars [A-Za-z0-9._:-] (required) |
customer_email | string | Your customer email for reconciliation (optional) |
Success response:
{
"success": true,
"walletCurrency": "VND",
"orderCode": "GZ260724CUR3F9A2B",
"productType": "cursor",
"quantity": 1,
"amount": 120000,
"amountText": "120.000 VND",
"balance": 4880000,
"balanceText": "4.880.000 VND",
"deliveredAccounts": [
{
"productItemId": "1024",
"user": "[email protected]",
"password": "example-password",
"verifyEmail": "[email protected]"
}
]
}
If you resubmit with an already-used idempotency_key, the response keeps the original order and adds "replay": true — no second charge.
All errors return JSON in a fixed shape (HTTP status ≥ 400):
{
"success": false,
"errorCode": "INSUFFICIENT_BALANCE",
"detail": "Số dư ví không đủ. Cần 120.000 VND, số dư hiện tại 50.000 VND."
}
| HTTP | errorCode | Meaning |
|---|---|---|
| 400 | INVALID_BODY | Body is not valid JSON |
| 401 | MISSING_API_KEY | Missing X-API-Key header (or Authorization: Bearer) |
| 401 | INVALID_API_KEY | Key is wrong or has been revoked |
| 402 | INSUFFICIENT_BALANCE | Insufficient wallet balance |
| 403 | HTTPS_REQUIRED | Called over HTTP in production — HTTPS is required |
| 403 | IP_NOT_ALLOWED | IP is not in the key allowlist |
| 404 | PRODUCT_NOT_FOUND | Product not found |
| 405 | METHOD_NOT_ALLOWED | Wrong HTTP method for the endpoint |
| 409 | PRODUCT_INACTIVE | Product is not currently on sale |
| 409 | OUT_OF_STOCK | Not enough stock |
| 422 | INVALID_PRODUCT_ID | Missing or invalid product_id |
| 422 | INVALID_QUANTITY | Quantity out of range 1..1000 |
| 422 | INVALID_IDEMPOTENCY_KEY | Invalid idempotency_key format |
| 422 | INVALID_CUSTOMER_EMAIL | Invalid customer_email |
| 429 | RATE_LIMITED | Calling too fast (by IP or by key), try again later |
| 500 | INTERNAL_ERROR | System error, no charge made |
When RATE_LIMITED is hit on the per-key limit, the response includes Retry-After, X-RateLimit-Limit and X-RateLimit-Remaining headers — wait the seconds in Retry-After before retrying.