buySkuComplete

For Paywalls-0nly Plans

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 objects
NamiPaywallManager.buySkuComplete(sku: NamiSKU, product: Product, transaction: Transaction) 
                                  
// StoreKit 1 SKProduct & SKPaymentTransaction objects
NamiPaywallManager.buySkuComplete(sku: NamiSKU, product: SKProduct, transaction: SKPaymentTransaction)

// or pass in the individual data elements used by Nami, wrapped in a `NamiPurchaseSuccess` object
let purchaseSuccess = NamiPurchaseSuccess(product: sku, transactionID: transactionId, originalTransactionID: originalTransactionId, originalPurchaseDate: originalPurchaseDate, purchaseDate: purchaseDate, expiresDate: expirationDate, price: price, currencyCode: currency, locale: locale)
NamiPaywallManager.buySkuComplete(purchaseSuccess: 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.

To known when to start the purchase process, see registerBuySkuHandler.

Last updated