Skip to content Skip to sidebar Skip to footer

Purchase Failed Please Try Again: Skerror Domain Code: 0

In our series of manufactures, my team and I are talking almost in-app purchases implementation for iOS. And this is the fifth article in a serial. Follow the links to read previous articles:

  1. ‍iOS in-app purchases, office 1: configuration and adding to the project.
  2. iOS in-app purchases, part 2: initialization and purchases processing.
  3. iOS in-app purchases, part 3: testing purchases in XCode.
  4. iOS in-app purchases, role four: server-side receipt validation.
  5. iOS in-app purchases: the listing of SKError codes and how to handle them.

In this post, I will accost the SKErrors: what bug they imply and what to practice about them. For each mistake, we will work out three aspects: why information technology occurs, how to handle them, and what bulletin to display in the error notification.

⭐️ Download our guide on in-app techniques which volition make in-app purchases in your app perfect

SKError.Lawmaking.unknown, code 0

What it means. An error occurred for an unknown reason.

How to ready it. No action is needed from the developers' side. This error also comes on a request when trying to go products when using the iOS xiv and to a higher place simulator. In this case, to get a production, use the StoreKit local testing or a real device/emulator with the iOS version below iOS 14.

What message to display. Sorry, the purchase is unavailable for an unknown reason. Please try again later on.

SKError.Code.clientInvalid, code 1

What it means. The user cannot make a purchase. For example, a child tries to buy something when the parental control function on the device is on.

How to fix it. No action is needed from the developers' side.

What message to display. The purchase cannot exist completed. Please, alter your account or device.

SKError.Code.paymentCancelled, lawmaking 2

What it means. The user got to the payment screen, but changed his mind about making a purchase and clicked "cancel".

How to fix it. From a technical indicate of view, no fault occurred and, in this case, cipher needs to be done. From a marketing signal of view, yous tin continue working with such a user, for example, offer him a discount.

What message to brandish. You take ii options here. The easiest ane is not to show anything. Nonetheless, yous can also endeavor winning a user dorsum with a bulletin like this: "You have canceled your purchase. Are you interested in trying a subscription at a discounted price?"

SKError.Code.paymentInvalid, lawmaking iii

What it means. For some reason, the payment failed: the card had expired or there were not enough funds for this purchase.

How to gear up it. No activeness is needed from the developers' side.

What bulletin to brandish. Your purchase was declined. Delight, check the payment details and make sure there are enough funds in your account.

SKError.Code.paymentNotAllowed, code 4

What it means. Probably, this card has some purchase restrictions available: limits are set or the online shopping part is unavailable.

How to fix it. No activeness is needed from the developers' side.

What bulletin to display. The purchase is non bachelor for the selected payment method. Please, make certain your payment method allows you to make online purchases.

SKError.Code.storeProductNotAvailable, lawmaking v

What it ways. The user is trying to purchase a production that is not available for the region in which this store is used.

How to fix information technology. The developer needs to bank check products for their availability in the user'southward shop and region. For this, you tin use SKStorefront.

What message to display. This product is not available in your region. Delight, change the store and attempt again.

SKError.Lawmaking.cloudServicePermissionDenied, code vi

What information technology means. The user didn't requite access to the information of his Cloud service.

How to fix it. No action is needed from the developers' side.

What message to display. To be honest, I have never met such an fault. Really, y'all tin can simply write that the purchase was declined.

SKError.Code.cloudServiceNetworkConnectionFailed, code 7

What it means. The device was non connected to the Internet when making a buy.

How to prepare information technology. No action is needed from the developers' side.

What bulletin to display. The buy cannot be completed because your device is not connected to the Internet. Please, try once more afterward with a stable internet connection.

SKError.Code.cloudServiceRevoked, lawmaking 8

What information technology means. This device doesn't take access to the StoreKit payment service. Commonly, this error occurs in Sandbox.

How to fix it. Create a new Sandbox user or just endeavor repeating the operation.

What message to brandish. Sorry, an error has occurred.

SKError.Code.privacyAcknowledgementRequired, lawmaking 9

What information technology ways. The user didn't take the terms of use in the AppStore. As information technology'southward said in the documentation, "the user has not yet best-selling Apple tree's privacy policy for Apple Music". Only it looks like an mistake, because at that place is no reason to mention Apple tree Music here.

How to prepare it. No action is needed from the developers' side.

What message to brandish. The purchase cannot be completed because you have not accustomed the terms of use of the AppStore. Please, confirm your consent in the settings so render to the buy.

SKError.Code.unauthorizedRequestData, code 10

What it ways. Your app ID doesn't comprise the required entitlement for using StoreKit.

How to fix it. You demand to finish the setup process of in-app purchases for your app.

What message to display. An mistake has occurred. Delight, endeavor once more later.

SKError.Code.invalidOfferIdentifier, code xi

What it ways. The user is trying to buy a product with an incorrect promotional offer.

How to fix it. No action is needed from the developers' side.

What message to brandish. The promotional offer is invalid or expired.

SKError.Code.invalidSignature, code 12

What it means. The signature for the promotional offer for the StoreKit request was generated incorrectly.

How to set up it. Check how the signature is generated and fix the errors. If you use Adapty, download the Subscription Central.

What message to brandish. Sad, an error has occurred when applying the promo code. Please, try once more later.

SKError.Code.missingOfferParams, code xiii

What it means. Parameters of the promotional offer are formed incorrectly.

How to set it. Cheque and correct the parameters of your promotional offer.

What message to display. Sorry, an error has occurred when applying the promo offer. Delight, effort once more later.

SKError.Code.invalidOfferPrice, code fourteen

What information technology means. The user is trying to buy a product with an irrelevant price. Probably, the price displayed in the AppStore is no longer valid.

How to fix it. Set the updated toll for this offer in the AppStore.

What bulletin to display. Deplorable, your purchase cannot be completed. Please, try again afterwards.

Determination

Correct mistake handling improves user experience and tin return at least some of those users who could not pay for the subscription immediately for some reason. These are the nigh common mistakes when implementing purchases in an iOS app:

  • SKError.Code.unknown, an unknown error;
  • SKError.Lawmaking.paymentCancelled, when the user cancels the buy;
  • SKError.Code.paymentInvalid, when the payment can't exist candy.

Actually, error handling and purchase implementation are cumbersome processes. So I would recommend trying Adapty SDK for iOS, which makes implementing in-app purchases easier and provides other benefits, such as subscription analytics, cohort analysis, a/b tests for paywalls, and server-side receipt validation.

montgomeryyourty.blogspot.com

Source: https://adapty.io/blog/ios-in-app-purchases-part-5-list-of-skerror-codes-and-how-to-handle-them

Post a Comment for "Purchase Failed Please Try Again: Skerror Domain Code: 0"