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

# Get player by ID

> Retrieves an existing player by ID. Returns player information including profile data and in-game currency balances.



## OpenAPI

````yaml /egress-openapi.json get /api/v1/player
openapi: 3.0.0
info:
  title: Stash Web Shop API
  description: >-
    Server-side APIs for Stash web shop integration. This API set includes
    catalog management, purchase processing, and user management endpoints
    designed for server-to-server communication between game backends and Stash
    services.
  version: '1.0'
  contact:
    name: API Support
    url: https://docs.stash.gg/
    email: help@stash.gg
servers: []
security: []
tags:
  - name: Catalog
    description: Product catalog endpoints
  - name: Purchase
    description: Purchase processing endpoints
  - name: Players
    description: Player management endpoints
paths:
  /api/v1/player:
    get:
      tags:
        - Players
      summary: Get player by ID
      description: >-
        Retrieves an existing player by ID. Returns player information including
        profile data and in-game currency balances.
      operationId: GetPlayer
      parameters:
        - name: playerId
          description: The player ID to retrieve
          in: query
          required: true
          schema:
            type: string
        - name: shopId
          description: >-
            The originating Stash shop identifier (mirrors the shopId sent in
            webhooks)
          in: query
          required: false
          schema:
            type: string
        - name: environment
          description: Payment environment for the request
          in: query
          required: false
          schema:
            type: string
            enum:
              - PAYMENT_ENVIRONMENT_UNSPECIFIED
              - PAYMENT_ENVIRONMENT_TEST
              - PAYMENT_ENVIRONMENT_PRODUCTION
            default: PAYMENT_ENVIRONMENT_UNSPECIFIED
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.user.v1.GetPlayerResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
components:
  schemas:
    server.egress.shop.user.v1.GetPlayerResponse:
      type: object
      properties:
        player:
          $ref: >-
            #/components/schemas/server.egress.shop.user.v1.GetPlayerResponse.Player
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
    server.egress.shop.user.v1.GetPlayerResponse.Player:
      type: object
      properties:
        playerId:
          type: string
          description: Unique identifier for the player
        name:
          type: string
          description: Player name
        avatarUrl:
          type: string
          description: URL to player avatar image
        language:
          type: string
          description: >-
            Player language preference using ISO 639-1 code (e.g., 'en', 'es',
            'fr', 'de')
        inGameLevel:
          type: integer
          format: int64
          description: >-
            Player's in-game level, such as a power level. The web shop can show
            it on the player's profile. Must be positive; omit it when the game
            has no level, and the web shop then shows none
        inGameCurrency:
          type: string
          format: uint64
          description: >-
            DEPRECATED: use wallet instead. Amount of in-game currency the
            player owns, a non-negative 64-bit integer (default 0). Send it as a
            JSON integer or as a decimal string; use a string for values above
            9007199254740991, which many JSON parsers cannot represent exactly.
            Holds a single currency only. Ignored for currency balances whenever
            wallet has at least one entry. A negative, fractional or non-numeric
            value fails the whole player lookup, as it does for every numeric
            field of the player
        region:
          type: string
          description: Player's region as an ISO 3166-1 alpha-2 country code (e.g., 'BR')
        currency:
          type: string
          description: >-
            Player's preferred real-money currency as an ISO 4217 code (e.g.,
            'BRL'). This is not the in-game currency balance
        wallet:
          type: array
          items:
            $ref: '#/components/schemas/server.egress.shop.user.v1.UserBonusWallet'
          description: >-
            Balances the player owns, one entry per in-game currency, keyed by
            the reward type id configured in Stash Studio. Send at most 100
            entries; only the first 100 are read. Replaces in_game_currency and
            takes precedence over it whenever this list has at least one entry,
            even if every entry is ignored
          maxItems: 100
      description: Represents a player in the system
      title: Player
      required:
        - playerId
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    server.egress.shop.user.v1.UserBonusWallet:
      type: object
      properties:
        bonusId:
          type: string
          description: >-
            Id of the reward type configured in Stash Studio that this balance
            belongs to. Matched exactly and case-sensitively
        bonusType:
          $ref: '#/components/schemas/server.egress.shop.user.v1.WalletBonusType'
        balance:
          type: string
          format: uint64
          description: >-
            Amount the player owns, a non-negative 64-bit integer. Required; an
            entry without it is ignored. Send it as a JSON integer or as a
            decimal string; use a string for values above 9007199254740991,
            which many JSON parsers cannot represent exactly. 0 is a real
            balance. A negative, fractional or non-numeric value fails the whole
            player lookup, as it does for every numeric field of the player
      description: >-
        One balance the player owns, for the reward type configured in Stash
        Studio with the same id
      title: User Bonus Wallet
      required:
        - bonusId
        - bonusType
        - balance
    server.egress.shop.user.v1.WalletBonusType:
      type: string
      enum:
        - WALLET_BONUS_TYPE_UNSPECIFIED
        - WALLET_BONUS_TYPE_IN_GAME_CURRENCY
      default: WALLET_BONUS_TYPE_UNSPECIFIED
      description: >-
        Kind of balance a wallet entry reports. Only
        WALLET_BONUS_TYPE_IN_GAME_CURRENCY is read today; entries of any other
        type are ignored
      title: >-
        - WALLET_BONUS_TYPE_UNSPECIFIED: Default unknown type; an entry with
        this type is ignored
         - WALLET_BONUS_TYPE_IN_GAME_CURRENCY: A balance of an in-game currency configured as a reward type in Stash Studio
  securitySchemes:
    hmac:
      type: apiKey
      description: >-
        Versioned HMAC-SHA256 signature for server-to-server communication
        between game backends and Stash services. Recommended over the
        deprecated legacyHmac scheme for the best security. Header format:
        v1;{shopId};{unixMillisTimestamp};{base64Signature}
        (semicolon-delimited). {base64Signature} is the base64-encoded
        HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} signed
        with your Egress API key, where {requestBody} is the compact request
        JSON. The timestamp must be within 5 minutes of Stash server time. Your
        shopId is your immutable shop identifier; it and your Egress API key are
        available in Stash Studio under Project Settings > API Secrets.
      name: x-stash-hmac-signature
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.