vscgames
  • Welcome
  • Getting Started
    • CreateAPIKey
    • CreateMerchantKey
  • Products
  • Mutations
    • buyVoucher
    • FreeFireTopupOrder
    • DeltaForceTopupOrder
    • FreeFireMerchantTopup
    • DeltaForceMerchantTopupOrder
  • Queries
    • getProductsByCategory
    • getProductById
    • getOrderById
    • getUserOrders
    • getTopupsProducts
    • getTopupProduct
    • getPlayerDetails
    • getTopupOrder
    • getUserTopupOrders
  • REST API
    • COMING soon
  • CONTACT
    • Support
Powered by GitBook
On this page
  1. Mutations

DeltaForceTopupOrder

Last Updated 11th May, 2025

PreviousFreeFireTopupOrderNextFreeFireMerchantTopup

Last updated 23 days ago

The DeltaForceTopupOrder mutation lets your app users directly top up Delta Force credits via the VSC Games API. It deducts user balance, sends a top-up request to Lootbar, and logs the transaction.

🔗 Endpoint URL: Method: POST Content-Type: application/json

📎 Mutation Structure

mutation DeltaForceTopupOrder($productId: String!, $playerID: String!) {
  DeltaForceTopupOrder(productId: $productId, playerID: $playerID) {
    code
    message
    orderId
    productId
    playerID
    name
    amount
    adminorderId
    status
  }
}

📅 Parameters

Name
Type
Required
Description

productId

String

Yes

ID of the product to be purchased

playerID

String

Yes

Game player ID to receive top-up

✅ Successful Response

{
  "data": {
    "DeltaForceTopupOrder": {
      "code": 200,
      "message": "Delta Force top-up placed successfully",
      "orderId": "ORD123456",
      "productId": "abc123",
      "playerID": "905382718",
      "name": "Delta Force Pack 1",
      "amount": 1.44,
      "status": "Pending"
    }
  }
}

🚫 Error Codes

Code
Message
Meaning

401

API key required

Missing API key

403

Invalid API key

API key not found or revoked

404

Top-up product not found

Product ID is invalid

402

Insufficient balance

User has insufficient funds

503

Topup API server error

Internal operation failed to process

500

An error occurred...

Internal server error

🔪 Code Examples Python

import requests

url = "https://api.vscgames.com/graphql"
headers = {"Content-Type": "application/json", "apikey": "YOUR_API_KEY"}

query = """
mutation DeltaForceTopupOrder($productId: String!, $playerID: String!) {
  DeltaForceTopupOrder(productId: $productId, playerID: $playerID) {
    code
    message
    orderId
    productId
    playerID
    name
    amount
    status
  }
}
"""

variables = {
  "productId": "abc123",
  "playerID": "905382718"
}

response = requests.post(url, json={"query": query, "variables": variables}, headers=headers)
print(response.json())

JavaScript

const fetch = require("node-fetch");

const query = `
mutation DeltaForceTopupOrder($productId: String!, $playerID: String!) {
  DeltaForceTopupOrder(productId: $productId, playerID: $playerID) {
    code
    message
    orderId
    productId
    playerID
    name
    amount
    status
  }
}`;

const variables = {
  productId: "abc123",
  playerID: "905382718"
};

fetch("https://api.vscgames.com/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "apikey": "YOUR_API_KEY"
  },
  body: JSON.stringify({ query, variables })
})
  .then(res => res.json())
  .then(data => console.log(data));
https://api.vscgames.com/graphql