Braze React Native SDK - v21.0.0
    Preparing search index...

    Function logPurchase

    • Reports that the current user made an in-app purchase. Useful for tracking and segmenting users.

      Parameters

      • productId: string

        A string identifier for the product purchased, e.g. an SKU. Value is limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation.

      • price: string

        The price paid. Base units depend on the currency. As an example, USD should be reported as Dollars.Cents, whereas JPY should be reported as a whole number of Yen. All provided values will be rounded to two digits with toFixed(2)

      • currencyCode: string

        Currencies should be represented as an ISO 4217 currency code.

      • quantity: number

        The quantity of items purchased expressed as a whole number. Must be at least 1 and at most 100.

      • OptionalpurchaseProperties: object | null

        Hash of properties for this purchase. Keys are limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation. Values can be numeric, boolean, or strings 255 characters or shorter.

      Returns void