docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IEconomyPurchasesApi

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    Namespace: Unity.Services.Apis.Economy
    Assembly: solution.dll
    Syntax
    public interface IEconomyPurchasesApi : IApiAccessor

    Methods

    MakeVirtualPurchase(string, string, PlayerPurchaseVirtualRequest, string, string, string, CancellationToken)

    Make virtual purchase

    Declaration
    ApiOperation<PlayerPurchaseVirtualResponse> MakeVirtualPurchase(string projectId, string playerId, PlayerPurchaseVirtualRequest playerPurchaseVirtualRequest, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    PlayerPurchaseVirtualRequest playerPurchaseVirtualRequest
    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<PlayerPurchaseVirtualResponse>

    The operation

    RedeemAppleAppStorePurchase(string, string, PlayerPurchaseAppleappstoreRequest, string, string, string, CancellationToken)

    Redeem Apple App Store purchase

    Declaration
    ApiOperation<PlayerPurchaseAppleappstoreResponse> RedeemAppleAppStorePurchase(string projectId, string playerId, PlayerPurchaseAppleappstoreRequest playerPurchaseAppleappstoreRequest, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    PlayerPurchaseAppleappstoreRequest playerPurchaseAppleappstoreRequest
    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<PlayerPurchaseAppleappstoreResponse>

    The operation

    RedeemGooglePlayPurchase(string, string, PlayerPurchaseGoogleplaystoreRequest, string, string, string, CancellationToken)

    Redeem Google Play purchase

    Declaration
    ApiOperation<PlayerPurchaseGoogleplaystoreResponse> RedeemGooglePlayPurchase(string projectId, string playerId, PlayerPurchaseGoogleplaystoreRequest playerPurchaseGoogleplaystoreRequest, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    PlayerPurchaseGoogleplaystoreRequest playerPurchaseGoogleplaystoreRequest
    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<PlayerPurchaseGoogleplaystoreResponse>

    The operation

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)