Products, Delivery Types & Purchases
Browsing Products & Checking Prices
Always read product availability and current pricing directly from:
GET /api/v1/catalog/products(supportslimit,cursor,categoryId,search)GET /api/v1/catalog/products/{productId}
Only products in ACTIVE status appear in catalog endpoints. Requesting a missing, draft, or archived product ID returns 409 Conflict (PRODUCT_UNAVAILABLE).
Stock Representation
availableUnits: nullindicates unlimited delivery stock (e.g., reusable unlimited license keys, static digital files, course/link/text products).availableUnits: integer(0,1,25, ...) shows exact sellable units remaining. Attempting to buy more than available stock fails atomically with409 Conflict(OUT_OF_STOCK), charging$0.
Delivery Types
| Delivery Type | Item Payload Structure | Access Method |
|---|---|---|
LICENSE_KEY | { "type": "LICENSE_KEY", "key": "..." } (one OrderItem per unit) | Synchronous JSON in POST /api/v1/purchases and GET /api/v1/orders/{orderId} |
ACCOUNT | { "type": "ACCOUNT", "account": "..." } (one OrderItem per unit) | Synchronous JSON payload |
FILE | File metadata reference | Binary stream via GET /api/v1/orders/{orderId}/items/{itemId}/file |
LINK / TEXT / COURSE / MANUAL | Payload URL/text/instructions | Synchronous JSON payload + resolved instructions |
Purchasing & Idempotency
POST /api/v1/purchases uses strict schema validation (additionalProperties: false). Passing any unaccepted field (such as a client-chosen price) immediately returns 400 VALIDATION_ERROR.
Required idempotencyKey Behavior
Every purchase requires an idempotencyKey (8–128 characters, e.g., UUID v4 or your internal order ID):
- First attempt: Debits balance atomically, consumes inventory, sets order status to
DELIVERED, and responds201 Created("created": true). - Safe retry with same
idempotencyKey& same owning user: Returns200 OK("created": false) with the previously fulfilledorderwithout charging balance a second time or tripping purchase velocity guards. - Collision with another user's
idempotencyKey: Rejected with403 FORBIDDEN("That order belongs to another account"). Never reuse predictable sequential IDs like"order-001"across tenants; include a UUID or your platform-unique order identifier.
Checking Order Status
Orders execute synchronously inside one transaction (PENDING -> DELIVERED). To reconcile timed-out HTTP requests or fetch deliverables later, poll idempotently with GET /api/v1/orders/{orderId} or retry POST /api/v1/purchases with the exact same idempotencyKey.
Metered API Actions (POST /api/v1/actions)
Non-order paid platform actions use server-defined fixed prices:
BULK_CATALOG_EXPORT:0.500000USDTSTOCK_RESERVATION_PING:0.100000USDT
Idempotency for /api/v1/actions is automatically namespaced per user (userId:idempotencyKey), and uses the same 402 balance checks, spend caps, and ledger recording (referenceType: "API_ACTION").