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. Queries

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));
PreviousgetTopupOrderNextCOMING soon

Last updated 23 days ago