Products
General product catalog including Steam, gift cards, and more.
1. Get All Productsโ
Get all available products with variants.
Endpoint: GET /api/products
Response:
{
"status": "success",
"message": "Products retrieved",
"data": [
{
"id": 1,
"name": "Steam Wallet",
"description": "Steam wallet codes",
"image_product": "https://example.com/image.jpg",
"category_id": 5,
"is_active": true,
"requires_input": false,
"variants": [
{
"id": 10,
"name": "Steam Wallet 10 USD",
"price": 1425.00,
"is_available": true,
"input_fields": []
}
]
}
]
}
2. Get Product Variantsโ
Get variants for a specific product.
Endpoint: GET /api/products/{productId}/variants
Response:
{
"status": "success",
"message": "Variants retrieved",
"data": [
{
"id": 10,
"name": "Steam Wallet 10 USD",
"price": 1425.00,
"is_available": true,
"input_fields": []
}
]
}
3. Purchase Productโ
Purchase a product variant.
Endpoint: POST /api/products/purchase/{variantId}
Basic Request (no inputs required):
{
"quantity": 1
}
With Product Inputs (if required):
{
"quantity": 1,
"account_email": "user@example.com",
"account_password": "password123"
}
Response:
{
"status": "success",
"message": "Purchase successful",
"data": {
"order_ids": ["1234567890123456789"],
"count": 1
}
}
Important: Save the order_ids to retrieve keys later.
4. Retrieve Order Keysโ
Single Orderโ
Endpoint: GET /api/products/order/{orderId}
Response:
{
"status": "success",
"message": "Order details retrieved",
"data": {
"order_id": "1234567890123456789",
"product_name": "Steam Wallet",
"variant_name": "Steam Wallet 10 USD",
"status": "completed",
"key": "ABC123-DEF456-GHI789",
"has_key": true,
"price": 1425.00,
"created_at": "2024-01-15T10:30:00.000000Z"
}
}
Multiple Ordersโ
Endpoint: POST /api/products/orders/retrieve
Request:
{
"order_ids": [
"1234567890123456789",
"1234567890123456790"
]
}
Response: Array of order details (same format as single order)
Status Values:
completed: Order fulfilled, key availableprocessing: Order being processedpending: Order pendingfailed: Order failed
Note: If has_key is false, poll the endpoint until the key becomes available.
Example Workflowโ
# 1. Get all products
curl -X GET "https://gateway.wasmou.net/api/products" \
-H "X-Api-Key: your_api_key"
# 2. Get variants for product 1
curl -X GET "https://gateway.wasmou.net/api/products/1/variants" \
-H "X-Api-Key: your_api_key"
# 3. Purchase variant 10
curl -X POST "https://gateway.wasmou.net/api/products/purchase/10" \
-H "X-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"quantity": 1}'
# 4. Retrieve order key
curl -X GET "https://gateway.wasmou.net/api/products/order/1234567890123456789" \
-H "X-Api-Key: your_api_key"
# 5. Retrieve multiple orders
curl -X POST "https://gateway.wasmou.net/api/products/orders/retrieve" \
-H "X-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"order_ids": ["1234567890123456789", "1234567890123456790"]}'
Input Fieldsโ
Some products require additional inputs (e.g., game account credentials). Check the input_fields array in the variant response to see what inputs are required.
Example input fields:
account_email: Email addressaccount_password: Passwordaccount_username: Usernameserver: Server/region selection
Best Practicesโ
- Check product availability before purchasing (
is_availablefield) - Save the
order_idsfrom purchase response - Poll order endpoint if
has_keyis false - Store keys securely for your users
- Handle failed orders appropriately (balance is refunded automatically)