DOCUMENTATION

CrizonShop Partner API

Sell CrizonShop digital goods on your site, bot or Zalo shop. Everything is JSON; test keys start with czs_test_, live keys with czs_live_.

1. Authentication

Send the key in the Authorization header. No cookie, no CSRF. Each key is scoped read/order and limited to 60 reads and 20 orders per minute.

Authorization: Bearer czs_live_...

2. Endpoints

MethodPathPurpose
GET/api/partner/v1/meBalance, level, limits
GET/api/partner/v1/productsPrice list and input schema
POST/api/partner/v1/ordersPlace an order, wait up to 50s
GET/api/partner/v1/orders/{code}Status and delivered goods
GET/api/partner/v1/price-list?token=…&format=csv|jsonRead-only price list link

3. Fetch prices

curl https://crizonshop.com/api/partner/v1/products?limit=20 \
  -H "Authorization: Bearer czs_live_..."

# response
{
  "products": [{
    "plan_id": "cmw...",
    "name": "Adobe Express Premium",
    "plan": "12 Tháng",
    "retail_price": 89000,
    "price": 84600,
    "currency": "VND",
    "level": { "name": "Bậc 1", "discount_percent": 5 },
    "input_schema": [],
    "delivery": { "eta_seconds": 26, "eta_p95_seconds": 40, "success_rate": 0.9 }
  }]
}

The price is already your partner price. The floor is cost ÷ 0.9, rounded up to 100đ; a plan whose floor is above retail stays closed.

4. Place an order

curl https://crizonshop.com/api/partner/v1/orders \
  -H "Authorization: Bearer czs_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": "cmw...",
    "quantity": 1,
    "external_ref": "DH-1042",
    "inputs": { "email": "[email protected]" },
    "wait": 50,
    "max_price": 90000
  }'

# delivered in time
{ "order_code": "API-20261127-AAAAAA", "status": "delivered",
  "total": 84600, "currency": "VND", "balance_after": 915400,
  "items": [{ "plan_id": "cmw...", "quantity": 1, "price": 84600,
    "delivered": { "username": "...", "password": "...", "license_key": null, "note": null } }] }

# not in time
{ "order_code": "API-20261127-BBBBBB", "status": "processing",
  "total": 84600, "currency": "VND", "balance_after": 830800 }
  • external_ref is the idempotency key; resending it returns the first order.
  • max_price protects you if the price rises; an order above it is refused, never charged.
  • An order not ready within wait returns processing; a webhook reports delivery.

5. Webhooks

Set the URL in your API account. Every delivery carries an HMAC-SHA256 signature; verify it before trusting the event.

X-Crizon-Event: order.delivered
X-Crizon-Event-Id: partner-webhook:<partner>:order.delivered:<order>
X-Crizon-Timestamp: 1795776000
X-Crizon-Signature: sha256=<HMAC-SHA256(secret, timestamp + "." + rawBody)>

payload: { "event":"order.delivered", "event_id":"...",
  "data": { "order_code":"API-...", "status":"delivered",
            "total":84600, "currency":"VND", "items":[...] } }

The payload never contains credentials/goods; call GET /orders/{code} for those. Retries 5 times in 24 hours; use event_id to dedupe.

6. Common errors

INSUFFICIENT_BALANCE (402)
Not enough VND in the wallet.
PARTNER_NOT_QUALIFIED (403)
A live key needs 1,000,000đ and accepted terms.
PLAN_NOT_AVAILABLE (422)
Plan closed, no cost or below floor.
PRICE_ABOVE_MAX (409)
Price rose above max_price.
DAILY_SPEND_LIMIT (429)
Daily partner spend cap reached.
PLAN_DAILY_LIMIT (429)
Plan daily order cap reached.

7. PHP sample

<?php
$key = getenv('CRIZON_PARTNER_KEY');
$ch = curl_init('https://crizonshop.com/api/partner/v1/products');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
]);
$json = json_decode(curl_exec($ch), true);
curl_close($ch);
foreach ($json['products'] as $p) {
  echo $p['name'], ' — ', $p['price'], "đ\n";
}