interface AppleTransaction {
    app_account_token?: string;
    cancellation_date?: string;
    cancellation_date_ms?: string;
    cancellation_reason?: "0" | "1";
    expires_date?: string;
    expires_date_ms?: string;
    expires_date_pst?: string;
    in_app_ownership_type?: "FAMILY_SHARED" | "PURCHASED";
    is_in_intro_offer_period?: "true" | "false";
    is_trial_period?: "true" | "false";
    is_upgraded?: "true" | "false";
    offer_code_ref_name?: string;
    original_purchase_date: string;
    original_purchase_date_ms: string;
    original_purchase_date_pst: string;
    original_transaction_id: string;
    product_id: string;
    promotional_offer_id?: string;
    purchase_date: string;
    purchase_date_ms: string;
    purchase_date_pst: string;
    quantity?: string;
    subscription_group_identifier?: string;
    transaction_id: string;
    web_order_line_item_id: string;
}

Properties

app_account_token?: string

The appAccountToken associated with this transaction.

This field is only present if your app supplied an appAccountToken(_:) when the user made the purchase.

cancellation_date?: string

The time Apple customer support canceled a transaction, in a date-time format similar to the ISO 8601.

This field is only present for refunded transactions.

cancellation_date_ms?: string

The time Apple customer support canceled a transaction, in UNIX epoch time format.

https://developer.apple.com/documentation/appstorereceipts/cancellation_date_ms

cancellation_reason?: "0" | "1"

The reason for a refunded transaction.

When a customer cancels a transaction, the App Store gives them a refund and provides a value for this key.

  • A value of “1” indicates that the customer canceled their transaction due to an actual or perceived issue within your app.
  • A value of “0” indicates that the transaction was canceled for another reason; for example, if the customer made the purchase accidentally.
expires_date?: string

The time a subscription expires or when it will renew, in a date-time format similar to the ISO 8601.

expires_date_ms?: string

The time a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds.

Use this time format for processing dates. https://developer.apple.com/documentation/appstorereceipts/expires_date_ms

expires_date_pst?: string

The time a subscription expires or when it will renew, in the Pacific Time zone.

in_app_ownership_type?: "FAMILY_SHARED" | "PURCHASED"

The relationship of the user with the family-shared purchase to which they have access.

Possible Values:

  • FAMILY_SHARED: The transaction belongs to a family member who benefits from service.
  • PURCHASED: The transaction belongs to the purchaser.
is_in_intro_offer_period?: "true" | "false"

An indicator of whether an auto-renewable subscription is in the introductory price period.

https://developer.apple.com/documentation/appstorereceipts/is_in_intro_offer_period

is_trial_period?: "true" | "false"

An indicator of whether a subscription is in the free trial period.

https://developer.apple.com/documentation/appstorereceipts/is_trial_period

is_upgraded?: "true" | "false"

An indicator that a subscription has been canceled due to an upgrade.

This field is only present for upgrade transactions.

offer_code_ref_name?: string

Reference name of an offer code used by the user to make this transaction.

original_purchase_date: string

The time of the original app purchase, in a date-time format similar to ISO 8601.

original_purchase_date_ms: string

The time of the original app purchase, in UNIX epoch time format, in milliseconds.

Use this time format for processing dates. For an auto-renewable subscription, this value indicates the date of the subscription's initial purchase. The original purchase date applies to all product types and remains the same in all transactions for the same product ID. This value corresponds to the original transaction’s transactionDate property in StoreKit.

original_purchase_date_pst: string

The time of the original app purchase, in the Pacific Time zone.

original_transaction_id: string
product_id: string

The unique identifier of the product purchased.

You provide this value when creating the product in App Store Connect, and it corresponds to the productIdentifier property of the SKPayment object stored in the transaction's payment property.

promotional_offer_id?: string

The identifier of the subscription offer redeemed by the user.

https://developer.apple.com/documentation/appstorereceipts/promotional_offer_id

purchase_date: string

The time the App Store charged the user's account for a purchased or restored product, or the time the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in a date-time format similar to ISO 8601.

purchase_date_ms: string

The time the App Store charged the user's account for a purchase or renewal, in milliseconds since EPOCH.

For consumable, non-consumable, and non-renewing subscription products, the time the App Store charged the user's account for a purchased or restored product.

For auto-renewable subscriptions, the time the App Store charged the user’s account for a subscription purchase or renewal after a lapse.

Use this time format for processing dates.

purchase_date_pst: string

The time the App Store charged the user's account for a purchase or renewal, in the Pacific Time zone.

quantity?: string

The number of consumable products purchased.

This value corresponds to the quantity property of the SKPayment object stored in the transaction's payment property.

The value is usually “1” unless modified with a mutable payment.

The maximum value is 10.

subscription_group_identifier?: string

The identifier of the subscription group to which the subscription belongs.

The value for this field is identical to the subscriptionGroupIdentifier property in SKProduct.

transaction_id: string

A unique identifier for a transaction such as a purchase, restore, or renewal.

https://developer.apple.com/documentation/appstorereceipts/transaction_id

web_order_line_item_id: string

A unique identifier for purchase events across devices, including subscription-renewal events.

This value is the primary key for identifying subscription purchases.