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

getTopupsProducts

Last Updated 11th May, 2025

The getTopupsProducts query returns a list of all available top-up products. It requires API key authentication and responds with basic product information (name, productId, price).


๐Ÿ”— Endpoint

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


๐Ÿ” Query Structure

query {
  getTopupsProducts {
    name
    productId
    price
  }
}

๐Ÿ“ฅ Headers

Header
Required
Description

apikey

โœ… Yes

API key of the user


โœ… Successful Response

{
  "data": {
    "getTopupsProducts": [
      {
        "name": "Free Fire 110 Diamonds",
        "productId": "abc123",
        "price": 1.66
      },
      {
        "name": "PUBG UC 60",
        "productId": "def456",
        "price": 0.99
      }
    ]
  }
}

๐Ÿšซ Error Responses

Message
Reason

API key required in headers

Missing apikey in headers

Invalid API key

The key provided does not match a user


๐Ÿงช Code Examples

Python

import requests

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

query = """
query {
  getTopupsProducts {
    name
    productId
    price
  }
}
"""

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

JavaScript

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

const query = `
query {
  getTopupsProducts {
    name
    productId
    price
  }
}`;

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));
PreviousgetUserOrdersNextgetTopupProduct

Last updated 23 days ago