# Store Usage Guide The store module processes checkout requests. It charges a payment source and grants purchased items to the player locker, virtual arsenal locker, and virtual garage unlocks. ## Server SQF Module The server addon uses two long-lived module objects: - `StorefrontStore` is the storefront workflow facade. It builds hydrate payloads, validates checkout requests, calls the Rust `store:checkout` command, syncs UI patches, and asks related module stores to save hot state. - `StoreCatalogService` scans configured item and vehicle categories, builds catalog responses, resolves checkout entries, and calculates authoritative prices. Editor-placed store entities are initialized by `fnc_initStore` during store post-init. The initializer matches non-null mission namespace objects whose variable names contain `store` and sets `isStore = true`, following the same pattern used by garage entities. ## Checkout Model `store:checkout` accepts one JSON context. ```json { "requesterUid": "76561198000000000", "requesterName": "Player Name", "orgId": "default", "requesterIsDefaultOrgCeo": false, "paymentMethod": "bank", "items": [ { "classname": "arifle_MX_F", "category": "weapon", "priceValue": 500, "quantity": 1 } ], "vehicles": [ { "classname": "B_Quadbike_01_F", "category": "cars", "priceValue": 1500 } ] } ``` Rules validated by the Rust service: - `requesterUid` is required. - At least one item or vehicle is required. - The checkout total must be greater than zero. - Item categories must be `item`, `attachment`, `weapon`, `magazine`, or `backpack`. - Vehicle categories must be `cars`, `armor`, `helis`, `planes`, `naval`, or `other`. - Payment method must be `cash`, `bank`, `org_funds`, or `credit_line`. - Player locker capacity cannot exceed 25 unique items after checkout. - Organization funds can only be charged by the org owner or the default org CEO flag. ## Command
| Command | Arguments | Returns |
|---|---|---|
store:checkout
|
checkout_json
|
Checkout result JSON. |