Skip to main content

Free Fire

Diamond top-up services for Free Fire.

1. Get Plansโ€‹

Get available Free Fire diamond packages.

Endpoint: GET /api/freefire/plans

Response:

{
"status": "success",
"message": "Plans retrieved",
"data": [
{
"plan_id": "FF100",
"plan_name": "100 Diamonds",
"price": 1000.00
},
{
"plan_id": "FF500",
"plan_name": "500 Diamonds",
"price": 4500.00
}
]
}

Code Examplesโ€‹

curl -X GET "https://gateway.wasmou.net/api/freefire/plans" \
-H "X-Api-Key: your_api_key_here"

2. Check Playerโ€‹

Verify a player ID before placing an order. Required before placing an order.

Endpoint: POST /api/freefire/check-player

Request:

Parameters:

  • player_id (string, required): The Free Fire player ID to verify
{
"player_id": "1234567890"
}

Response:

{
"status": "success",
"player_name": "PlayerName123",
"region": "NA"
}

Code Examplesโ€‹

curl -X POST "https://gateway.wasmou.net/api/freefire/check-player" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"player_id": "1234567890"}'

3. Place Orderโ€‹

Purchase diamonds for a player.

โš ๏ธ Important: You MUST validate the player ID using the "Check Player" endpoint (section 2) before placing an order. Orders will be rejected if the player ID is invalid or cannot be verified.

Endpoint: POST /api/freefire/order

Request:

Parameters:

  • plan_id (string, required): The plan ID from the plans endpoint
  • player_id (string, required): The Free Fire player ID (must be validated first using Check Player endpoint)
{
"plan_id": "FF100",
"player_id": "1234567890"
}

Response:

Success Response:

{
"status": "success",
"message": "Order placed successfully",
"data": {
"trx_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending"
}
}

Error Response (Invalid Player ID):

{
"status": "error",
"message": "Invalid player ID. Please verify your player ID and try again.",
"data": null
}

Error Response (Player Validation Failed):

{
"status": "error",
"message": "Unable to retrieve player information. Please verify your player ID and try again.",
"data": null
}

Important:

  • Save the trx_id to check order status later
  • If the order fails with an error about invalid player ID, use the "Check Player" endpoint first to verify the player ID is valid

Code Examplesโ€‹

curl -X POST "https://gateway.wasmou.net/api/freefire/order" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"plan_id": "FF100", "player_id": "1234567890"}'

4. Check Order Statusโ€‹

Check the status of a placed order.

Endpoint: GET /api/freefire/status/{trxId}

Response:

{
"status": "success",
"message": "Order status retrieved",
"data": {
"trx_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "success",
"plan_name": "100 Diamonds",
"player_id": "1234567890",
"amount": 1000.00,
"created_at": "2024-01-15T10:30:00.000000Z"
}
}

Status Values: pending, success, failed

Code Examplesโ€‹

curl -X GET "https://gateway.wasmou.net/api/freefire/status/550e8400-e29b-41d4-a716-446655440000" \
-H "X-Api-Key: your_api_key_here"

Complete Workflow Exampleโ€‹

async function completeFreeFireWorkflow() {
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://gateway.wasmou.net';

// 1. Get plans
const plansResponse = await fetch(`${BASE_URL}/api/freefire/plans`, {
headers: { 'X-Api-Key': API_KEY }
});
const plans = await plansResponse.json();
console.log('Available plans:', plans);

// 2. Check player
const playerId = '1234567890';
const checkResponse = await fetch(`${BASE_URL}/api/freefire/check-player`, {
method: 'POST',
headers: {
'X-Api-Key': API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ player_id: playerId })
});
const playerInfo = await checkResponse.json();
console.log('Player info:', playerInfo);

// 3. Place order
const orderResponse = await fetch(`${BASE_URL}/api/freefire/order`, {
method: 'POST',
headers: {
'X-Api-Key': API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
plan_id: 'FF100',
player_id: playerId
})
});
const order = await orderResponse.json();
console.log('Order placed:', order);
const trxId = order.data.trx_id;

// 4. Check status (poll every 5 seconds)
const checkStatus = async () => {
const statusResponse = await fetch(`${BASE_URL}/api/freefire/status/${trxId}`, {
headers: { 'X-Api-Key': API_KEY }
});
const status = await statusResponse.json();
console.log('Order status:', status);

if (status.data.status === 'pending') {
setTimeout(checkStatus, 5000); // Poll again in 5 seconds
}
};

checkStatus();
}

completeFreeFireWorkflow();

Best Practicesโ€‹

  • REQUIRED: Always validate player ID using check-player endpoint before ordering. Orders will fail if player ID is not validated first
  • Save the trx_id from order response
  • Poll status endpoint every 5-10 seconds until status is final
  • Stop polling when status is success or failed
  • Handle errors gracefully and implement retry logic for network issues
  • If order fails with "Invalid player ID" error, validate the player ID again using check-player endpoint

Try It Liveโ€‹

Test Free Fire endpoints directly in your browser using our Live Testing tool.