Wasmou API Documentation

Explore and test our API endpoints

Authentication

All API requests require authentication using an API key. Your API key should be included in the X-API-KEY header of each request.

Keep your API key secure. Do not share it in public repositories or client-side code.

For testing purposes, your API key will be securely stored in your browser's session storage.

GET /api/products
More Details

Description

Returns a list of all active products with their available variants, including pricing information.

Response Format

{
    "status": "success",
    "data": [
        {
            "id": "integer",
            "name": "string",
            "type": "string (manual|automatic)",
            "variants": [
                {
                    "name": "string",
                    "reseller_buy_price": "float",
                    "sell_price": "float",
                    "is_available": "boolean"
                }
            ]
        }
    ]
}

Authentication

Requires API key in X-API-KEY header

Code Examples

curl -X GET "https://api.wasmou.net/api/products" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
GET /api/products/{id}

Get details of a specific product

More Details

Description

Retrieves detailed information about a specific product by its ID, including variants and pricing.

Parameters

id - Product ID (required)

Authentication

Requires API key in X-API-KEY header

Error Responses

  • 404 Product not found
  • 404 Product is not active

Response Format

{
    "status": "success",
    "data": {
        "id": "integer",
        "name": "string",
        "type": "string (manual|automatic)",
        "variants": [
            {
                "id": "integer",
                "name": "string",
                "reseller_buy_price": "float",
                "sell_price": "float",
                "is_available": "boolean"
            }
        ]
    }
}

Code Examples

curl -X GET "https://api.wasmou.net/api/products/123" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
POST /api/products/{product_id}/{variant_id}/purchase

Purchase a product variant

More Details

Description

Purchase a specific product variant. Supports both manual and automatic delivery types.

Parameters

product_id - Product ID (required)

variant_id - Variant ID (required)

quantity - Number of items to purchase (required, min: 1)

Authentication

Requires API key in X-API-KEY header

Error Responses

  • 400 Insufficient balance
  • 400 Insufficient quantity available
  • 404 Product or variant not found
  • 500 Internal server error

Response Format

{
    "status": "success",
    "message": "Purchase successful",
    "data": {
        "purchased_items": [
            {
                "id": "integer",
                "order_url": "string",
                "status": "string"
            }
        ]
    }
}

Code Examples

curl -X POST "https://api.wasmou.net/api/products/123/456/purchase" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d '{"quantity": 1}'
GET /api/purchase-history

Get your purchase history

More Details

Description

Retrieves a list of all purchases made by the authenticated user.

Notes

For manual orders, the key will only be included in the response if the order status is 'completed' or 'delivered'. For orders with status 'pending' or 'canceled', the key will be null.

Response Format

{
    "status": "success",
    "data": [
        {
            "id": "integer",
            "product_name": "string",
            "variant_name": "string",
            "key": "string|null", // null for manual orders with status other than 'completed' or 'delivered'
            "price": "float",
            "type": "string (manual|regular)",
            "status": "string (completed|delivered|pending|canceled)",
            "created_at": "datetime"
        }
    ]
}

Authentication

Requires API key in X-API-KEY header

Code Examples

curl -X GET "https://api.wasmou.net/api/purchase-history" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
GET /api/orders/{order_id}

Get details of a specific order

More Details

Description

Retrieves detailed information about a specific order by its ID.

Notes

For manual orders, the key will only be included in the response if the order status is 'completed' or 'delivered'. For orders with status 'pending' or 'canceled', the key field will not be included, but notes will still be available.

Parameters

order_id - Order ID (required)

Response Format

{
    "status": "success",
    "data": {
        "id": "integer",
        "product_name": "string",
        "variant_name": "string",
        "price": "float",
        "key": "string|null", // Only included for automatic orders or manual orders with status 'completed' or 'delivered'
        "type": "string (manual|automatic)",
        "status": "string (completed|delivered|pending|canceled)",
        "created_at": "datetime",
        "notes": "string|null" // Only for manual orders
    }
}

Authentication

Requires API key in X-API-KEY header

Error Responses

  • 404 Invalid order ID
  • 404 Order not found
  • 403 Unauthorized - Not your order

Code Examples

curl -X GET "https://api.wasmou.net/api/orders/123" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"

Free Fire Top-up API

The Free Fire API allows you to programmatically check player IDs, get available plans, and process top-ups for Free Fire game diamonds.

GET /api/freefire/plans

Get all available Free Fire diamond plans.

Response Format

{
    "status": "success",
    "data": [
        {
            "id": 1,
            "plan_id": "ff_100",
            "item_id": "123456",
            "plan_name": "Free Fire 100 Diamonds",
            "plan_price": 100.00,
            "reseller_price": 95.00
        },
        // ... more plans
    ]
}

Code Examples

curl -X GET "https://api.wasmou.net/api/freefire/plans" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
POST /api/freefire/check-player

Check if a Free Fire player ID exists and get the player name.

Request Parameters

Parameter Type Required Description
player_id string Yes The Free Fire player ID to check

Response Format

{
    "status": "success",
    "data": {
        "player_name": "PlayerName123",
        "region": "Region"
    }
}

Code Examples

                            curl -X POST "https://api.wasmou.net/api/freefire/check-player" \
     -H "X-API-KEY: your_api_key" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{"player_id": "123456789"}'
POST /api/freefire/topup

Process a Free Fire diamond top-up for a player.

Request Parameters

Parameter Type Required Description
player_id string Yes The Free Fire player ID
plan_id string Yes The plan ID from the available plans

Response Format

{
    "status": "success",
    "message": "Top-up order placed successfully",
    "data": {
        "order_id": 123,
        "transaction_id": "uuid-string",
        "player_id": "123456789",
        "player_name": "PlayerName123",
        "plan_name": "Free Fire 100 Diamonds",
        "amount": 100.00,
        "status": "pending",
        "created_at": "2023-01-01 12:00:00"
    }
}

Code Examples

curl -X POST "https://api.wasmou.net/api/freefire/topup" \
     -H "X-API-KEY: your_api_key" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{
         "player_id": "123456789",
         "plan_id": "ff_100"
     }'
GET /api/freefire/orders/{order_id}

Check the status of a Free Fire top-up order.

Response Format

{
    "status": "success",
    "data": {
        "order_id": 123,
        "transaction_id": "uuid-string",
        "player_id": "123456789",
        "player_name": "PlayerName123",
        "plan_name": "Free Fire 100 Diamonds",
        "amount": 100.00,
        "status": "success|pending|failed",
        "created_at": "2023-01-01 12:00:00"
    }
}

Code Examples

curl -X GET "https://api.wasmou.net/api/freefire/orders/123" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
GET /api/freefire/orders

Get the history of all Free Fire top-up orders.

Response Format

{
    "status": "success",
    "data": [
        {
            "order_id": 123,
            "transaction_id": "uuid-string",
            "player_id": "123456789",
            "player_name": "PlayerName123",
            "plan_name": "Free Fire 100 Diamonds",
            "amount": 100.00,
            "status": "success|pending|failed",
            "created_at": "2023-01-01 12:00:00"
        },
        // ... more orders
    ]
}

Code Examples

curl -X GET "https://api.wasmou.net/api/freefire/orders" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
GET /api/account/balance

Get your current account balance

More Details

Description

Retrieves the current balance of the authenticated user's account.

Response Format

{
    "status": "success",
    "data": {
        "balance": "float",
        "currency": "string"
    }
}

Authentication

Requires API key in X-API-KEY header

Code Examples

curl -X GET "https://api.wasmou.net/api/account/balance" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json"
POST /api/variants/check-availability

Check availability of multiple variants at once

More Details

Description

Checks the availability status of multiple product variants in a single request. This is useful for efficiently checking stock levels before making purchase decisions.

Request Format

{
    "variants": [1, 2, 3, 4]  // Array of variant IDs to check
}

Response Format

{
    "status": "success",
    "data": [
        {
            "id": 1,
            "product_id": 123,
            "name": "Variant Name",
            "product_name": "Product Name",
            "is_available": true,
            
        },
        // More variants...
    ]
}

Authentication

Requires API key in X-API-KEY header

Error Responses

  • 422 Validation error - Invalid variant IDs

Code Examples

curl -X POST "https://api.wasmou.net/api/variants/check-availability" \
     -H "X-API-KEY: your_api_key" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d '{"variants": [1, 2, 3, 4]}'

Security Best Practices

API Key Security

  • Never expose your API key in client-side code or public repositories
  • Use environment variables to store your API key in your applications
  • Implement server-side proxies for API requests when building web applications
  • Rotate your API keys periodically

Request Security

  • Always use HTTPS for API requests
  • Implement proper error handling in your applications
  • Validate all input data before sending to the API
  • Implement timeout handling for API requests

Rate Limiting

Our API implements rate limiting to protect against abuse. The current limits are:

  • 60 requests per minute for GET endpoints
  • 30 requests per minute for POST endpoints

If you exceed these limits, you'll receive a 429 Too Many Requests response.