Error Code 2, also known as SKErrorDomain Code=2 - Cancelled, is a common error that occurs when users cancel the in-app purchase process. Although this error is user-driven, handling it correctly in your app is essential for a smooth user experience. By managing this cancellation gracefully, developers can improve user satisfaction and even encourage users to reattempt purchases.
What Causes SKErrorDomain Code=2?
Error Code 2 is triggered by user action, specifically when the user backs out or cancels the purchase. This error may result from factors like user hesitation, unclear pricing, or unexpected charges. Though not an app fault, it’s essential to handle this response to prevent potential loss of purchase interest and encourage retrying.
Common Scenarios for SKErrorDomain Code=2 - Cancelled
This error frequently arises in the following scenarios:
- User Cancels Due to Unclear Pricing or Additional Fees: Users may abandon the purchase if they see unexpected costs.
- Confusing or Unintuitive Purchase Flow: An overly complex purchase flow can frustrate users, leading them to cancel.
- Testing Cancellations: During testing, developers or testers may intentionally cancel purchases to test cancellation handling.
Step-by-Step Solutions for SKErrorDomain Code=2 - Cancelled
Solution 1: Implement a Cancellation Handler in StoreKit
- Purpose: Detects when the purchase flow is cancelled and provides an appropriate user response.
- Steps:
- In your StoreKit implementation, add a cancellation handler to monitor when a transaction returns a cancelled status.
- Display a message like, “Purchase cancelled. Would you like to try again?”
- Give users an option to retry the purchase process.
- Result: This helps recover user interest and allows them to reattempt the purchase.
Solution 2: Simplify and Streamline the Purchase Flow
- Purpose: Reducing complexity in the purchase flow decreases cancellation likelihood.
- Steps:
- Minimize steps in the purchase process to create a clear and smooth flow.
- Use simple prompts and provide users with transparent purchase details.
- Test the purchase process with a user-focused perspective to remove unnecessary screens or steps.
- Result: A streamlined flow improves user experience and reduces cancellations.
Solution 3: Display Transparent Pricing Information
- Purpose: Helps avoid cancellations by showing users clear pricing information, including any potential additional costs.
- Steps:
- Show the total cost upfront in the initial purchase screen, including all applicable taxes or fees.
- Add clarifications for recurring subscriptions or auto-renewal features.
- Result: Transparent pricing reduces user confusion and increases purchase completion rates.
Solution 4: Use Reminders to Encourage Purchase Re-attempts
- Purpose: Encourages users who have cancelled purchases to revisit the purchase opportunity later.
- Steps:
- For cancelled transactions, consider adding an optional soft reminder for users to complete their purchase later.
- Provide additional context or benefits of the purchase to enhance interest.
- Result: Non-intrusive reminders can help recover lost purchases without disrupting the user experience.
Solution 5: Gather Feedback to Improve the Purchase Experience
- Purpose: Helps developers understand why users cancel purchases and make adjustments to the purchase flow.
- Steps:
- After a cancellation, offer an optional feedback form asking why they chose to exit.
- Analyze feedback to identify common pain points or reasons for cancellation.
- Use insights to optimize the purchase process.
- Result: Understanding cancellation reasons helps refine the purchase experience, ultimately reducing cancellations.
Conclusion
SKErrorDomain Code=2 - Cancelled, is triggered by user actions to exit the purchase process, which may happen due to various reasons. By implementing a cancellation handler, simplifying the purchase flow, displaying clear pricing, sending gentle reminders, and gathering user feedback, developers can improve the purchasing experience and reduce cancellations.
With Nami’s low-code solutions, developers can easily manage and optimize in-app purchases, eliminating the hassle of customizing the purchase flow. Find out more at NamiML.