Purchase Product
Programmatically create an order, deduct balance, and instantly receive products.
Endpoint Features
The Purchase Product endpoint acts as checkout. Pass a Product UUID and a desired quantity. The system automatically calculates your VIP rank, verifies balance and stock availability, and fulfills the items securely.
Authentication
Requires Authorization header with a Bearer API token.
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| productId | string | Required. The exact UUID of the item to purchase. |
| quantity | number | Optional. Number of items. Defaults to 1. |
| webhookUrl | string | Optional. A custom URL to securely receive real-time webhook events for this order. Passing this automatically updates your account's default webhook! |
Error Codes
- INVALID_PARAMETERS (400) : The productId was missing or quantity is less than 1.
- PRODUCT_NOT_FOUND (404) : The product is deactivated or invalid.
- INSUFFICIENT_BALANCE (400) : Current wallet balance cannot afford the requested quantity.
- OUT_OF_STOCK (400) : The requested quantity exceeds available inventory numbers.
- PRODUCT_UNAVAILABLE (503) : The server is currently experiencing heavy load. Please try again in a few minutes.
- FULFILLMENT_FAILED (502) : High demand or network timeout caused a temporary assignment failure. Your account has been automatically refunded.
Interactive Testing
Headers:Authorization: (Not Set - Set in Topbar)