> ## 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.

# Get Transaction History

> Get transaction history for a player. Up to 50 Events can be returned at once (or 250 with response compression enabled). You can use continuation tokens to paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds.

Allowed entity token types: title, master_player_account, title_player_account



## OpenAPI

````yaml post /Inventory/GetTransactionHistory
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Economy API
  description: >-
    API methods for managing the catalog. Inventory manages in-game assets for
    any given entity. API methods for managing the versioned catalogs.
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Catalog
    description: |-
      Catalog Management APIs. In general for Catalog APIs, 
                          Read APIs are limited to 100 requests in 60 seconds 
                          for Player Entities while Title Entities are limited to 10000 requests
                          in 10 seconds. For Write APIs, Player Entities are limited to 10 requests 
                          in 30 seconds and Title Entities are limited to 1000 requests in 10 seconds.
  - name: Inventory
    description: |-
      Player Inventory Management APIs. Inventory operations work on an 
                          eventually consistent system against a cache of the Catalog. It can take a few moments for 
                          changes to propagate. In general for Inventory APIs, Read APIs are limited to 100 requests 
                          in 60 seconds for Player Entities while Title Entities are limited to 10000 requests
                          in 10 seconds. For Write APIs, Player Entities are limited to 30 requests 
                          in 90 seconds and Title Entities are limited to 1000 requests in 10 seconds.
  - name: VersionedCatalog
    description: ''
paths:
  /Inventory/GetTransactionHistory:
    post:
      tags:
        - Inventory
      summary: Get Transaction History
      description: >-
        Get transaction history for a player. Up to 50 Events can be returned at
        once (or 250 with response compression enabled). You can use
        continuation tokens to paginate through results that return greater than
        the limit. Getting transaction history has a lower RPS limit than
        getting a Player's inventory with Player Entities having a limit of 30
        requests in 300 seconds.


        Allowed entity token types: title, master_player_account,
        title_player_account
      operationId: GetTransactionHistory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTransactionHistoryRequest'
        description: Get transaction history for specified entity and collection.
      responses:
        '200':
          $ref: '#/components/responses/GetTransactionHistoryResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    GetTransactionHistoryRequest:
      description: Get transaction history for specified entity and collection.
      type: object
      properties:
        CollectionId:
          description: >-
            The id of the entity's collection to perform this action on.
            (Default="default")
          type: string
        ContinuationToken:
          description: >-
            An opaque token used to retrieve the next page of items, if any are
            available. Should be null on initial request.
          type: string
        Count:
          description: >-
            Number of items to retrieve. This value is optional. The default
            value is 10. The maximum value is 50, or 250 if response compression
            is enabled.
          type: number
          x-actualtype: int32
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        Entity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The entity to perform this action on.
        Filter:
          description: >-
            An OData filter used to refine the TransactionHistory. Transaction
            properties 'timestamp', 'transactionid', 'apiname' and
            'operationtype' can be used in the filter. Properties
            'transactionid', 'apiname', and 'operationtype' cannot be used
            together in a single request. The 'timestamp' property can be
            combined with 'apiname' or 'operationtype' in a single request. For
            example: "timestamp ge 2023-06-20T23:30Z" or "transactionid eq '10'"
            or "(timestamp ge 2023-06-20T23:30Z) and (apiname eq
            'AddInventoryItems')". By default, a 6 month timespan from the
            current date is used.
          type: string
        OrderBy:
          description: >-
            An OData orderby to order TransactionHistory results. The only
            supported values are 'timestamp asc' or 'timestamp desc'. Default
            orderby is 'timestamp asc'
          type: string
      required:
        - Count
      example:
        Count: 10
        CollectionId: default
    EntityKey:
      description: >-
        Combined entity type and ID structure which uniquely identifies a single
        entity.
      type: object
      properties:
        Id:
          description: Unique ID of the entity.
          type: string
        Type:
          description: >-
            Entity type. See
            https://learn.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
          type: string
      required:
        - Id
    GetTransactionHistoryResponse:
      type: object
      properties:
        ContinuationToken:
          description: >-
            An opaque token used to retrieve the next page of items, if any are
            available. Should be null on initial request.
          type: string
        Transactions:
          description: The requested inventory transactions.
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          x-isclass: true
      example:
        Transactions:
          - TransactionId: '1'
            ItemType: catalogItem
            OperationType: Add
            ApiName: AddInventoryItems
          - TransactionId: '2'
            ItemType: catalogItem
            OperationType: Add
            ApiName: AddInventoryItems
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    Transaction:
      type: object
      properties:
        ApiName:
          description: The API call that caused this transaction.
          type: string
        ClawbackDetails:
          allOf:
            - $ref: '#/components/schemas/TransactionClawbackDetails'
          description: >-
            Additional details about the transaction. Null if it was not a
            clawback operation.
        CustomTags:
          description: The custom tags associated with this transactions.
          type: object
        ItemType:
          description: The type of item that the the operation occurred on.
          type: string
        Operations:
          description: The operations that occurred.
          type: array
          items:
            $ref: '#/components/schemas/TransactionOperation'
          x-isclass: true
        OperationType:
          description: The type of operation that was run.
          type: string
        PurchaseDetails:
          allOf:
            - $ref: '#/components/schemas/TransactionPurchaseDetails'
          description: >-
            Additional details about the transaction. Null if it was not a
            purchase operation.
        RedeemDetails:
          allOf:
            - $ref: '#/components/schemas/TransactionRedeemDetails'
          description: >-
            Additional details about the transaction. Null if it was not a
            redeem operation.
        Timestamp:
          description: The time this transaction occurred in UTC.
          type: string
        TransactionId:
          description: >-
            The id of the transaction. This should be treated like an opaque
            token.
          type: string
        TransferDetails:
          allOf:
            - $ref: '#/components/schemas/TransactionTransferDetails'
          description: >-
            Additional details about the transaction. Null if it was not a
            transfer operation.
      required:
        - Timestamp
    TransactionClawbackDetails:
      type: object
      properties:
        TransactionIdClawedback:
          description: The id of the clawed back operation.
          type: string
    TransactionOperation:
      type: object
      properties:
        Amount:
          description: The amount of items in this transaction.
          type: number
          x-actualtype: int32
        DurationInSeconds:
          description: The duration modified in this transaction.
          type: number
          x-actualtype: double
        ItemFriendlyId:
          description: The friendly id of the items in this transaction.
          type: string
        ItemId:
          description: The item id of the items in this transaction.
          type: string
        ItemType:
          description: The type of item that the operation occurred on.
          type: string
        StackId:
          description: The stack id of the items in this transaction.
          type: string
        Type:
          description: The type of the operation that occurred.
          type: string
    TransactionPurchaseDetails:
      type: object
      properties:
        ItemFriendlyId:
          description: The friendly id of the item that was purchased.
          type: string
        ItemId:
          description: The id of the item that was purchased.
          type: string
        StoreFriendlyId:
          description: The friendly id of the Store the item was purchased from or null.
          type: string
        StoreId:
          description: The id of the Store the item was purchased from or null.
          type: string
    TransactionRedeemDetails:
      type: object
      properties:
        Marketplace:
          description: The marketplace that the offer is being redeemed from.
          type: string
        MarketplaceTransactionId:
          description: The transaction Id returned from the marketplace.
          type: string
        OfferId:
          description: The offer Id of the item being redeemed.
          type: string
    TransactionTransferDetails:
      type: object
      properties:
        GivingCollectionId:
          description: >-
            The collection id the items were transferred from or null if it was
            the current collection.
          type: string
        GivingEntity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: >-
            The entity the items were transferred from or null if it was the
            current entity.
        ReceivingCollectionId:
          description: >-
            The collection id the items were transferred to or null if it was
            the current collection.
          type: string
        ReceivingEntity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: >-
            The entity the items were transferred to or null if it was the
            current entity.
        TransferId:
          description: The id of the transfer that occurred.
          type: string
  responses:
    GetTransactionHistoryResponse:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetTransactionHistoryResponse'
            example:
              code: 200
              status: OK
              data:
                Transactions:
                  - TransactionId: '1'
                    ItemType: catalogItem
                    OperationType: Add
                    ApiName: AddInventoryItems
                  - TransactionId: '2'
                    ItemType: catalogItem
                    OperationType: Add
                    ApiName: AddInventoryItems
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [Get Transaction History](/api-reference/inventory/get-transaction-history.md)
- [Transaction History](/services/playfab/economy-monetization/economy-v2/inventory/transaction-history.md)
- [PFInventoryGetTransactionHistoryRequest](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorygettransactionhistoryrequest.md)
- [PFInventoryGetTransactionHistoryAsync](/services/playfab/api-references/c/pfinventory/functions/pfinventorygettransactionhistoryasync.md)
- [PFInventoryGetTransactionHistoryResponse](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorygettransactionhistoryresponse.md)
