getUserTopupOrders

Last Updated 11th May, 2025

The getUserTopupOrders query retrieves a list of all top-up orders associated with the authenticated user. Each order includes basic transaction details.


🔗 Endpoint

URL: https://api.vscgames.com/graphql Method: POST Content-Type: application/json


🔍 Query Structure

query {
  getUserTopupOrders {
    orderId
    playerID
    player_name
    productId
    name
    amount
    status
    timestamp
  }
}

📥 Headers

Header
Required
Description

apikey

✅ Yes

API key of the user


✅ Successful Response

{
  "data": {
    "getUserTopupOrders": [
      {
        "orderId": "ORD123456",
        "playerID": "2265245647",
        "player_name": "JJ_MUCH",
        "productId": "abc123",
        "name": "Free Fire 110 Diamonds",
        "amount": 1.66,
        "status": "successful",
        "timestamp": "2025-05-11T15:30:00Z"
      },
      {
        "orderId": "ORD123457",
        "playerID": "7841257943",
        "player_name": "AZAZEL",
        "productId": "def456",
        "name": "PUBG UC 60",
        "amount": 0.99,
        "status": "pending",
        "timestamp": "2025-05-11T16:00:00Z"
      }
    ]
  }
}

🚫 Error Responses

Message
Reason

API key required

Missing apikey header

Invalid API key

No user found with the API key


🧪 Code Examples

Python

import requests

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

query = """
query {
  getUserTopupOrders {
    orderId
    playerID
    player_name
    productId
    name
    amount
    status
    timestamp
  }
}
"""

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

JavaScript

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

const query = `
query {
  getUserTopupOrders {
    orderId
    playerID
    player_name
    productId
    name
    amount
    status
    timestamp
  }
}`;

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

Last updated