appstoreserverlibrary.receipt_utility module

class appstoreserverlibrary.receipt_utility.IndefiniteFormAwareDecoder[source]

Bases: Decoder

class appstoreserverlibrary.receipt_utility.ReceiptUtility[source]

Bases: object

extract_transaction_id_from_app_receipt(app_receipt: str) str | None[source]

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 – The unmodified app receipt

Returns:

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

extract_transaction_id_from_transaction_receipt(transaction_receipt: str) str | None[source]

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. :param transactionReceipt: The unmodified transactionReceipt :return: A transaction id, or null if no transactionId is found in the receipt