@apple/app-store-server-library
    Preparing search index...

    Class ReceiptUtility

    Index

    Constructors

    Methods

    • Extracts a transaction id from an encoded App Receipt. Throws if the receipt does not match the expected format. NO validation is performed on the receipt, and any data returned should only be used to call the App Store Server API.

      Parameters

      • appReceipt: string

        The unmodified app receipt

      Returns string | null

      A transaction id from the array of in-app purchases, null if the receipt contains no in-app purchases

    • Extracts a transaction id from an encoded transactional receipt. Throws if the receipt does not match the expected format. NO validation is performed on the receipt, and any data returned should only be used to call the App Store Server API.

      Parameters

      • transactionReceipt: string

        The unmodified transactionReceipt

      Returns string | null

      A transaction id, or null if no transactionId is found in the receipt