Object representing a purchase in the Nami Platform.

public class NamiPurchase : NSObject, Codable {
    public var purchasedSKU : NamiSKU,
    public var expires : Date?
  
    // platform specific
    public var entitlementsGranted: [NamiEntitlement]
    public var transactionIdentifier : StoreID?
    public var transaction : SKPaymentTransaction?
    public var receiptInfo : NamiReceiptIAPWrapper?
    public let skuID : StoreID
}
data class NamiPurchase( 
    val purchaseInitiatedTimestamp: Long = Date().time,
    val expires: Date? = null,
    val purchaseSource: NamiPurchaseSource,
    val skuId: String,
    val transactionIdentifier: String?,
    val purchaseToken: String?
 )
class NamiPurchase {
  final int purchaseInitiatedTimestamp;
  final DateTime? expires;
  final NamiPurchaseSource purchaseSource;
  final String skuId;
  final String? transactionIdentifier;
  final String? localizedDescription;
}

Parameters

Each App Platform provides data in NamiPurchase based upon what is available in the underlying store APIs.

Google Play

  • purchaseInitiatedTimestamp - The date and time when the purchase was initiated
  • expires - (bypass store only) Indicates when this purchase will cease
  • skuId - the Google Play reference ID of the purchased product SKU
  • transactionIdentifier - The purchase order ID record associated to this purchase
  • purchaseToken - The purchase token associated to this purchase

App Store

  • purchasedSKU - a NamiSKU object representing the in-app purchase product SKU the device purchased.
  • expires - date the purchase expires if it is a subscription
  • entitlementGranted - a NamiEntitlement object for the entitlement granted by this purchase.
  • transactionIdentifier - App Store ID for the transaction
  • transaction - the StoreKit transaction object for the purchase
  • receiptInfo - Receipt for the transaction
  • skuID - the App Store reference ID of the purchased product SKU