Skip to content

Store API Integration

serdarakay edited this page Jun 17, 2025 · 2 revisions

🎮 Construct 2 Store API Integration

This guide explains how to use the GameDistribution Store API in a Construct 2 project using the Execute JavaScript action.


✅ Prerequisites

  1. Use the "Execute JavaScript" action in Construct 2 to interact with the Store API.
    Example:

    gdsdk.executeStoreAction({ action: 'ui.open' });

📦 Available Actions

Description JavaScript Code
Open Store UI gdsdk.executeStoreAction({ action: 'ui.open' });
Close Store UI gdsdk.executeStoreAction({ action: 'ui.close' });
Get Virtual Items await gdsdk.executeStoreAction({ action: 'api.items' });
Buy a Product await gdsdk.executeStoreAction({ action: 'api.buyProduct', payload: { sku: 'ss-enhance-shield-5', quantity: 1 } });
Inventory Items await gdsdk.executeStoreAction({ action: 'api.inventoryItems' });

More actions are available in the full documentation (see link below).


🧪 Example Game & Screenshot


📚 Full Store API Docs

➡️ View the full HTML5 SDK Store API Documentation


Clone this wiki locally