This method is for customers who have implemented their own in-app purchases or subscription code directly with the App Store, Google Play, etc. or who are using another third-party for subscription or purchase management.
Your Nami account needs to be on a Paywalls only plan to use this interface. Contact support@nami.ml for details.
// StoreKit 2 Product & Transaction objectsNamiPaywallManager.buySkuComplete(sku: NamiSKU, product: Product, transaction: Transaction)// StoreKit 1 SKProduct & SKPaymentTransaction objectsNamiPaywallManager.buySkuComplete(sku: NamiSKU, product: SKProduct, transaction: SKPaymentTransaction)// or pass in the individual data elements used by Nami, wrapped in a `NamiPurchaseSuccess` objectlet purchaseSuccess = NamiPurchaseSuccess(product: sku, transactionID: transactionId, originalTransactionID: originalTransactionId, originalPurchaseDate: originalPurchaseDate, purchaseDate: purchaseDate, expiresDate: expirationDate, price: price, currencyCode: currency, locale: locale)
NamiPaywallManager.buySkuComplete(purchaseSuccess: purchaseSuccess)
// paywall, and skuRefId were passed to you via NamiPurchaseManager.registerBuySkuHandler// purchase is the purchase object from Google Play BillingNamiPaywallManager.buySkuComplete(paywallActivity, purchase, sku)// or provided a NamiPurchaseSuccess.Google or NamiPurchaseSuccess.Amazon object NamiPaywallManager.buySkuComplete(paywallActivity, purchaseSuccess)
Once your billing implementation has successfully processed a user's purchase, let the Nami SDK know by calling NamiPaywallManager.buySkuComplete. Once invoked, the paywall view will be closed.