Skip to content

Store API Integration

serdarakay edited this page Jun 18, 2025 · 1 revision

🧩 Using GameDistribution Store API in Construct 3

You can integrate the GameDistribution Store API directly in your Construct 3 projects using the JavaScript scripting system. This allows you to access virtual items, currencies, cart actions, and inventory management seamlessly.


✅ 1. Enable JavaScript Scripting

To begin, make sure your project has JavaScript scripting enabled.

  1. Open your Construct 3 project.
  2. Go to the Scripts section in the Project panel.
  3. Create a new script file (e.g., store.js).

📷 Script Selection


✍️ 2. Using Store API in Your Script

After adding the script, you can use the GameDistribution Store API just like in a standard HTML5 project.

Here’s an example of fetching store items:

const items = await gdsdk.executeStoreAction({ action: "api.items" });
console.log("Store items:", items);

To purchase a virtual product:

await gdsdk.executeStoreAction({
  action: "api.buyProduct",
  payload: {
    sku: "ss-enhance-shield-5",
    quantity: 1
  }
});

📷 Script Selection


📚 Related Documentation

To see the full list of store API methods and usage patterns, visit the main HTML5 SDK documentation:

🔗 GameDistribution HTML5 SDK - Store API Usage

Clone this wiki locally