> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Optional services

> Layer optional XBOX and PlayFab services — XUser sign-in, achievements, XGameSave, social, multiplayer, and XStore commerce — into your PC GDK title.

Once your PC GDK title runs, layer in optional XBOX services and Microsoft Azure PlayFab features as your design requires. None of these are required to publish to the Microsoft Store — pick what fits your title.

## Suggested adoption order

1. **Sign-in & identity** — [XUser](/build/core-features/common/user/gamecore-user-models) and [PlayFab sign-in](/services/playfab/identity/player-identity/login).
2. **Achievements & stats** — [XSAPI Achievements](/services/xbox-services/player-data/achievements/index) and [Player stats](#player-stats).
3. **Cloud saves** — [XGameSave](/build/core-features/common/game-save/game-saves-overview).
4. **Social** — [friends and recent players](/services/xbox-services/community/social-manager/live-social-manager-overview) and [Rich presence](#rich-presence).
5. **Multiplayer** — [Lobbies](#lobbies), [Matchmaking](#matchmaking), [Multiplayer](#multiplayer), [Invites](#invites), and [Chat](#chat).
6. **Commerce** — [XStore](/publishing/xstore-commerce/xstore-overview), [In-game purchases](#in-game-purchases), and [DLC](/publishing/game-publishing/concepts/add-ons).
7. **Server-side integrations** — [S2S authentication](#s2s-authentication), [User-generated content](#user-generated-content), and [Live ops](/services/playfab/live-service-management).

## Optional service topics

Each row below maps to a topic covered in the source PC E2E guide. Detailed integration guidance lives in the linked feature docs.

| Topic                                             | Recommended SDK                  | Where it lives                                                                                 |
| ------------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Chat](#chat)                                     | PlayFab Party                    | [PlayFab Party chat](/services/playfab/multiplayer/networking)                                 |
| [In-game purchases](#in-game-purchases)           | XStore (GDK)                     | [XStore deep dive](/publishing/xstore-commerce/xstore-overview)                                |
| [Invites](#invites)                               | PlayFab Lobby + XBOX invites     | [PlayFab Lobby](/services/playfab/multiplayer/lobby)                                           |
| [Leaderboards](#leaderboards)                     | XSAPI title-managed leaderboards | [Leaderboards](/services/xbox-services/player-data/stats-leaderboards/index)                   |
| [Lobbies](#lobbies)                               | PlayFab Lobby                    | [PlayFab Lobby](/services/playfab/multiplayer/lobby)                                           |
| [Matchmaking](#matchmaking)                       | PlayFab Matchmaking / SmartMatch | [PlayFab Matchmaking](/services/playfab/multiplayer/lobby)                                     |
| [Multiplayer](#multiplayer)                       | MPSD + MPM, PlayFab Multiplayer  | [Multiplayer](/services/xbox-services/multiplayer/index)                                       |
| [Networking](#networking)                         | PlayFab Party networking         | [PlayFab networking](/services/playfab/multiplayer/networking)                                 |
| [Player stats](#player-stats)                     | XSAPI Stats Manager              | [Stats](/services/xbox-services/player-data/stats-leaderboards/index)                          |
| [Rich presence](#rich-presence)                   | XSAPI Presence                   | [Rich presence](/services/xbox-services/community/presence/live-presence-overview)             |
| [S2S authentication](#s2s-authentication)         | Entra ID + User Store IDs        | [Service-to-service auth](https://learn.microsoft.com/en-us/store/commerce/service-to-service) |
| [User-generated content](#user-generated-content) | PlayFab Economy v2               | [PlayFab UGC](/services/playfab/economy-monetization/index)                                    |

## Chat

Use **PlayFab Party** for synchronous voice and text chat on PC and XBOX. Key steps:

1. Set up the [PlayFab Party SDK](/services/playfab/multiplayer/networking).
2. Authenticate the player with both XBOX services and PlayFab.
3. Create or join a Party network with `PartyManager::CreateNewNetwork()`.
4. Create a `PartyLocalChatControl` per local user and connect it with `PartyNetwork::ConnectChatControl()`.
5. Choose audio input/output devices via `PartyLocalChatControl::SetAudioInput/Output` and a `PartyAudioDeviceSelectionType`.
6. Configure chat permissions and mute state between chat control pairs.
7. Add text chat via `SendText`, optionally with translation via `SetTextChatOptions`.
8. Add accessibility — speech-to-text transcription and text-to-speech synthesis via Azure Speech Services.
9. Enable audio noise suppression on captured microphone audio.

If you also ship on XBOX, use the [Party XBOX Live Helper Library](/services/playfab/multiplayer/networking) to satisfy XBOX service requirements.

## In-game purchases

Use **XStore** (via `XGameRuntime.h`) for in-game purchase flows on the Microsoft Store:

* Query the store catalog, associated products (add-ons, consumables, durables), and the user's entitlement collection.
* Show the purchase UI via `XStoreShowPurchaseUIAsync`.
* Consume consumables via `XStoreReportConsumableFulfillmentAsync`.
* Refresh licenses with `XStoreQueryProductForCurrentSkuAsync` after entitlement changes.

For PlayFab-driven virtual economies (currencies, inventory, bundles), pair XStore purchases with PlayFab Economy v2.

## Invites

Use **PlayFab Lobby** for invites and joins across PC/XBOX:

1. Integrate the [PlayFab Lobby & Matchmaking SDK](/services/playfab/multiplayer/lobby).
2. Authenticate with XBOX services and PlayFab.
3. Choose lobby ownership: player-owned (`PFMultiplayerCreateAndJoinLobby`), server-owned (`PFMultiplayerCreateAndClaimServerLobby`), or matchmaking-created.
4. Listen for invites via `PFMultiplayerStartListeningForLobbyInvites`.
5. Send invites through the platform's invite UI so the target sees a native XBOX/Store notification.

The lobby doubles as the game session players join after accepting an invite.

## Leaderboards

Use **XSAPI title-managed leaderboards** for social and global leaderboards on XBOX services:

1. Define leaderboards in Partner Center under **XBOX services → Player data**.
2. Emit stat events tied to the leaderboard using the Stats Manager.
3. Query leaderboards via `XblLeaderboardGetLeaderboardAsync` (global) or `XblLeaderboardGetLeaderboardForSocialGroupAsync` (friends).

See [Leaderboards](/services/xbox-services/player-data/stats-leaderboards/index).

## Lobbies

Use **PlayFab Lobby** for shared session state (member list, arbitrary properties, ownership):

* Create, join, find, and leave lobbies with the PlayFab Multiplayer C SDK.
* Store gameplay metadata as lobby properties (game mode, map, ready state).
* Combine with PlayFab Matchmaking to form lobbies from a matched group.
* Combine with PlayFab Party to add networking and voice on top of the lobby membership.

## Matchmaking

Use **PlayFab Matchmaking** for skill/attribute-based matchmaking that produces a shared lobby:

* Define matchmaking queues in the PlayFab Game Manager with rules over player attributes.
* Submit tickets via `PFMatchmakingCreateMatchmakingTicket`.
* On match found, players are placed into a shared lobby you own.

For XBOX Live-only titles, SmartMatch via MPSD is also supported — but PlayFab Matchmaking is the recommended path for new titles.

## Multiplayer

Two supported multiplayer stacks on PC/XBOX:

* **PlayFab Multiplayer** — cross-platform, uses PlayFab Lobby for sessions and PlayFab Party for transport. Recommended for new titles.
* **XBOX services multiplayer** — MPSD sessions + Multiplayer Manager (MPM). Still supported for XBOX-only titles.

Both paths are described in the [Multiplayer overview](/services/xbox-services/multiplayer/index).

## Networking

Use **PlayFab Party** as the network transport for real-time gameplay traffic:

* Send reliable/unreliable messages between connected endpoints.
* Layer voice, text, and gameplay data on the same Party network.
* On XBOX, Party integrates with the platform's network path automatically; on PC it uses UDP with fallback.

## Player stats

Use the **XSAPI Stats Manager** for title-managed player stats:

1. Define stats in Partner Center under **XBOX services → Player data**.
2. Add the stat to the player with `XblStatsManagerSetStatAsNumber` / `SetStatAsString`.
3. Increment or overwrite stats in response to gameplay.
4. Flush pending updates with `XblStatsManagerDoWork` each frame.

Stats power leaderboards and are shown on the player's profile.

## Rich presence

Use **XSAPI Presence** to broadcast what the player is doing:

1. Define presence enumerations and string sets in Partner Center.
2. Update presence with `XblPresenceSetPresenceAsync` when the player transitions to a new state (menu, level, match).
3. Query other players with `XblPresenceGetPresenceAsync` or `XblPresenceGetPresenceForMultipleUsersAsync`.

See [Rich presence](/services/xbox-services/community/presence/live-presence-overview).

## S2S authentication

Use **Microsoft Entra ID + User Store IDs** for service-to-service authentication when your backend needs to call Microsoft Store APIs on behalf of a player:

* Two User Store ID types:
  * `UserCollectionsID` — authenticates with the Microsoft Store **Collections** service (entitlement inventory).
  * `UserPurchaseID` — authenticates with the Microsoft Store **Purchase** service (transaction verification).
* Your service acquires an Entra ID access token and uses it, together with the User Store ID from the game client, to call the Store REST APIs.
* Recommended for new titles; X-token-based authentication is legacy.

## User-generated content

Use **PlayFab Economy v2** for UGC catalogs on top of a first-party or third-party asset pipeline:

1. Authenticate the player with PlayFab.
2. Generate signed upload URLs with `CreateUploadUrls`.
3. Create a draft item with `CreateDraftItem` (`Type:ugc`).
4. Enumerate draft items via `GetEntityDraftItems`.
5. Publish with `PublishDraftItem` — published items appear in the public catalog.
6. Check status with `GetItemPublishStatus`.
7. Query the catalog with `SearchItems` (OData `Filter`, `OrderBy`, `Select`).

Optional review/moderation is handled by Catalog Reviewers in the PlayFab Game Manager.

## Related

* [PC end-to-end overview](/build/gdk-and-engines/overview)
* [XBOX services overview](/services/xbox-services/index)
* [PlayFab overview](/services/playfab/get-started)

## Related API documentation

* [XSAPI overview](/reference/live/xsapi-c/atoc-xsapi-c) — identity, presence, social, achievements, leaderboards
* [XStore API reference](/reference/system/xstore/xstore_members) — Microsoft Store commerce
* [PlayFab overview](/services/playfab/get-started/index) — PlayFab REST + SDK surface


## Related topics

- [PFInventoryRedeemPlayStationStoreInventoryItemsRequest](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventoryredeemplaystationstoreinventoryitemsrequest.md)
- [Certification Optional Submissions](/publishing/game-publishing/concepts/certification/certification-optional-submissions.md)
- [Submit game packages for Optional Certification](/publishing/game-publishing/publishing-processes/managed-creators/publishing-processes-optional-certification.md)
- [Submitting to XBOX certification in Partner Center](/publishing/game-publishing/publishing-processes/managed-creators/publishing-processes-submitting-to-certification.md)
- [Certification step-by-step guide](/publishing/game-publishing/concepts/certification/certification-guide.md)
