-
- All Implemented Interfaces:
-
dev.hyo.openiap.Purchase,dev.hyo.openiap.PurchaseCommon
public final class PurchaseIOS implements PurchaseCommon, Purchase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPurchaseIOS.Companion
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PurchaseIOS(AdvancedCommerceInfoIOS advancedCommerceInfoIOS, String appAccountToken, String appBundleIdIOS, SubscriptionBillingPlanTypeIOS billingPlanTypeIOS, String bundleOriginalTransactionIdIOS, String bundleProductIdIOS, String bundleSubscriptionGroupIdIOS, String bundleTransactionIdIOS, TransactionCommitmentInfoIOS commitmentInfoIOS, String countryCodeIOS, String currencyCodeIOS, String currencySymbolIOS, String currentPlanId, String environmentIOS, Double expirationDateIOS, String id, List<String> ids, Boolean isAutoRenewing, Boolean isUpgradedIOS, PurchaseOfferIOS offerIOS, Double originalTransactionDateIOS, String originalTransactionIdentifierIOS, String ownershipTypeIOS, String previousOriginalTransactionIdIOS, String productId, PurchaseState purchaseState, String purchaseToken, Integer quantity, Integer quantityIOS, String reasonIOS, String reasonStringRepresentationIOS, RenewalInfoIOS renewalInfoIOS, Double revocationDateIOS, String revocationReasonIOS, String revocationTypeIOS, IapStore store, String storefrontCountryCodeIOS, String subscriptionGroupIdIOS, Double transactionDate, String transactionId, String transactionReasonIOS, String webOrderLineItemIdIOS)
-
Method Summary
Modifier and Type Method Description final AdvancedCommerceInfoIOSgetAdvancedCommerceInfoIOS()Advanced Commerce API metadata (iOS 18.4+). final StringgetAppAccountToken()final StringgetAppBundleIdIOS()final SubscriptionBillingPlanTypeIOSgetBillingPlanTypeIOS()iOS 26.4+ billing plan selected for this transaction. final StringgetBundleOriginalTransactionIdIOS()Original transaction identifier for the subscription bundle that produced this transaction (Apple 27+ SDK; back-deployed by StoreKit). final StringgetBundleProductIdIOS()Product identifier of the subscription bundle that produced this transaction. final StringgetBundleSubscriptionGroupIdIOS()Subscription-group identifier of the bundle that produced this transaction. final StringgetBundleTransactionIdIOS()Bundle transaction identifier associated with this component transaction. final TransactionCommitmentInfoIOSgetCommitmentInfoIOS()iOS 26.4+ progress information for monthly subscriptions with a 12-month commitment. final StringgetCountryCodeIOS()final StringgetCurrencyCodeIOS()final StringgetCurrencySymbolIOS()StringgetCurrentPlanId()The current plan identifier. final StringgetEnvironmentIOS()final DoublegetExpirationDateIOS()StringgetId()List<String>getIds()BooleangetIsAutoRenewing()final BooleangetIsUpgradedIOS()final PurchaseOfferIOSgetOfferIOS()final DoublegetOriginalTransactionDateIOS()final StringgetOriginalTransactionIdentifierIOS()final StringgetOwnershipTypeIOS()StoreKit ownership raw value. final StringgetPreviousOriginalTransactionIdIOS()Original transaction identifier replaced when moving between a standalone subscription and a subscription bundle. StringgetProductId()PurchaseStategetPurchaseState()StringgetPurchaseToken()Unified purchase token (iOS JWS, Android purchaseToken) IntegergetQuantity()final IntegergetQuantityIOS()final StringgetReasonIOS()final StringgetReasonStringRepresentationIOS()final RenewalInfoIOSgetRenewalInfoIOS()final DoublegetRevocationDateIOS()final StringgetRevocationReasonIOS()Normalized StoreKit revocation reason, including upgraded_to_bundle. final StringgetRevocationTypeIOS()StoreKit revocation type, including assignment-revocation on Apple 26.4+ when compiled with the Xcode 27 SDK. IapStoregetStore()Store where purchase was made final StringgetStorefrontCountryCodeIOS()final StringgetSubscriptionGroupIdIOS()DoublegetTransactionDate()Unix timestamp in milliseconds since January 1, 1970 UTC. final StringgetTransactionId()final StringgetTransactionReasonIOS()final StringgetWebOrderLineItemIdIOS()Map<String, Object>toJson()-
-
Constructor Detail
-
PurchaseIOS
PurchaseIOS(AdvancedCommerceInfoIOS advancedCommerceInfoIOS, String appAccountToken, String appBundleIdIOS, SubscriptionBillingPlanTypeIOS billingPlanTypeIOS, String bundleOriginalTransactionIdIOS, String bundleProductIdIOS, String bundleSubscriptionGroupIdIOS, String bundleTransactionIdIOS, TransactionCommitmentInfoIOS commitmentInfoIOS, String countryCodeIOS, String currencyCodeIOS, String currencySymbolIOS, String currentPlanId, String environmentIOS, Double expirationDateIOS, String id, List<String> ids, Boolean isAutoRenewing, Boolean isUpgradedIOS, PurchaseOfferIOS offerIOS, Double originalTransactionDateIOS, String originalTransactionIdentifierIOS, String ownershipTypeIOS, String previousOriginalTransactionIdIOS, String productId, PurchaseState purchaseState, String purchaseToken, Integer quantity, Integer quantityIOS, String reasonIOS, String reasonStringRepresentationIOS, RenewalInfoIOS renewalInfoIOS, Double revocationDateIOS, String revocationReasonIOS, String revocationTypeIOS, IapStore store, String storefrontCountryCodeIOS, String subscriptionGroupIdIOS, Double transactionDate, String transactionId, String transactionReasonIOS, String webOrderLineItemIdIOS)
-
-
Method Detail
-
getAdvancedCommerceInfoIOS
final AdvancedCommerceInfoIOS getAdvancedCommerceInfoIOS()
Advanced Commerce API metadata (iOS 18.4+). Present only for transactions that use the Advanced Commerce API. Contains item details, tax information, and refund data for generic SKU purchases.
-
getAppAccountToken
final String getAppAccountToken()
-
getAppBundleIdIOS
final String getAppBundleIdIOS()
-
getBillingPlanTypeIOS
final SubscriptionBillingPlanTypeIOS getBillingPlanTypeIOS()
iOS 26.4+ billing plan selected for this transaction.
-
getBundleOriginalTransactionIdIOS
final String getBundleOriginalTransactionIdIOS()
Original transaction identifier for the subscription bundle that produced this transaction (Apple 27+ SDK; back-deployed by StoreKit).
-
getBundleProductIdIOS
final String getBundleProductIdIOS()
Product identifier of the subscription bundle that produced this transaction.
-
getBundleSubscriptionGroupIdIOS
final String getBundleSubscriptionGroupIdIOS()
Subscription-group identifier of the bundle that produced this transaction.
-
getBundleTransactionIdIOS
final String getBundleTransactionIdIOS()
Bundle transaction identifier associated with this component transaction.
-
getCommitmentInfoIOS
final TransactionCommitmentInfoIOS getCommitmentInfoIOS()
iOS 26.4+ progress information for monthly subscriptions with a 12-month commitment.
-
getCountryCodeIOS
final String getCountryCodeIOS()
-
getCurrencyCodeIOS
final String getCurrencyCodeIOS()
-
getCurrencySymbolIOS
final String getCurrencySymbolIOS()
-
getCurrentPlanId
String getCurrentPlanId()
The current plan identifier. This is:
On Android: the basePlanId (e.g., "premium", "premium-year")
On iOS: the productId (e.g., "com.example.premium_monthly", "com.example.premium_yearly") This provides a unified way to identify which specific plan/tier the user is subscribed to.
-
getEnvironmentIOS
final String getEnvironmentIOS()
-
getExpirationDateIOS
final Double getExpirationDateIOS()
-
getIsAutoRenewing
Boolean getIsAutoRenewing()
-
getIsUpgradedIOS
final Boolean getIsUpgradedIOS()
-
getOfferIOS
final PurchaseOfferIOS getOfferIOS()
-
getOriginalTransactionDateIOS
final Double getOriginalTransactionDateIOS()
-
getOriginalTransactionIdentifierIOS
final String getOriginalTransactionIdentifierIOS()
-
getOwnershipTypeIOS
final String getOwnershipTypeIOS()
StoreKit ownership raw value. Xcode 27 adds the back-deployed assigned value.
-
getPreviousOriginalTransactionIdIOS
final String getPreviousOriginalTransactionIdIOS()
Original transaction identifier replaced when moving between a standalone subscription and a subscription bundle.
-
getProductId
String getProductId()
-
getPurchaseState
PurchaseState getPurchaseState()
-
getPurchaseToken
String getPurchaseToken()
Unified purchase token (iOS JWS, Android purchaseToken)
-
getQuantity
Integer getQuantity()
-
getQuantityIOS
final Integer getQuantityIOS()
-
getReasonIOS
final String getReasonIOS()
-
getReasonStringRepresentationIOS
final String getReasonStringRepresentationIOS()
-
getRenewalInfoIOS
final RenewalInfoIOS getRenewalInfoIOS()
-
getRevocationDateIOS
final Double getRevocationDateIOS()
-
getRevocationReasonIOS
final String getRevocationReasonIOS()
Normalized StoreKit revocation reason, including upgraded_to_bundle.
-
getRevocationTypeIOS
final String getRevocationTypeIOS()
StoreKit revocation type, including assignment-revocation on Apple 26.4+ when compiled with the Xcode 27 SDK.
-
getStorefrontCountryCodeIOS
final String getStorefrontCountryCodeIOS()
-
getSubscriptionGroupIdIOS
final String getSubscriptionGroupIdIOS()
-
getTransactionDate
Double getTransactionDate()
Unix timestamp in milliseconds since January 1, 1970 UTC.
-
getTransactionId
final String getTransactionId()
-
getTransactionReasonIOS
final String getTransactionReasonIOS()
-
getWebOrderLineItemIdIOS
final String getWebOrderLineItemIdIOS()
-
-
-
-