Subscriptions

RSS for tag

Give users access to content, services, or premium features in your app on an ongoing basis with subscriptions, a type of in-app purchase.

Subscriptions Documentation

Posts under Subscriptions tag

360 Posts
Sort by:
Post not yet marked as solved
8 Replies
5.5k Views
Hi, Sometimes I get tons of errors 21104 and 21107 in a row when I try to validate new subscriptions and renew existing subscriptions from our server side by using the endpoint verifyReceipt: POST https://buy.itunes.apple.com/verifyReceipt https://developer.apple.com/documentation/appstorereceipts/verifyreceipt The response of this endpoint doesn't give any extra information: { 		"environment": "Production", 		"status": 21107, 		"is_retryable": true } I noticed that those subscriptions are renewed on the second try after waiting a bit (in a different hour/day). The documentation only indicates that the status codes 21100-21199 are internal data access errors but it doesn't specify each one: https://developer.apple.com/documentation/appstorereceipts/status I understand that it's an error on the Apple side so there is nothing I can do but if someone could give us more information about those errors (21104 and 21107).
Posted
by
Post not yet marked as solved
2 Replies
2.7k Views
As far as I know, an app should use an In-app purchase to unlock premium content, features, or levels, etc. Apple won't allow making payments via third-party payment gateways or even providing a link to do payment other than in-app purchase is against the guidelines. Today I found an app in AppStore where they use a third-party payment gateway to unlock their premium content. Attaching the screenshot Here they are asking for credit card details and entering the card details completes their payments process (Worth mentioning they have cool UX for this!). I am wondering how did they manage to get into the store? or did apple update the policies? or is it a new feature? I am clueless. Any help is greatly appreciated.
Post not yet marked as solved
3 Replies
3.1k Views
In the latest Product object we are unable to get the price locale of the current product. Even though the display price string available with currency symbol, we need to display discount price of current product by comparing with other products. Earlier in SKProduct we had price locale property to achieve this.But in latest Product object we are missing this. Is there a way to get the price locale of the current storefront?. There is a countryCode property in Storefront enum. But there is no option to create locale using country code.
Posted
by
Post not yet marked as solved
5 Replies
3.3k Views
It seems that subscription status gives different results with XCode testing and Sandbox testing. I am using StoreKit2 to implement an IAP of an autorenewable subscription. I want to determine whether the subscription has been cancelled, so that the UI reflects that the subscription will stop after the expiry date and not be renewed. the 'willAutoRenew' property of the subscription status renewalInfo seems to do exactly what is required, and works fine in XCode testing. My setup is very similar to the StoreKit demo associated with the WWDC21 session available here: https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api/ To demonstrate its use, add: print(renewalInfo.willAutoRenew) after line 79 of the SubscriptionsView in the demo project. When you run the app, and purchase a Standard Navigation assistance subscription, the console shows 'true'. If you then cancel the subscription in XCode (Debug:StoreKit:Manage Transactions), the console will show 'false' as expected So far so good. My problem is that when I move to Sandbox testing, and cancel the subscription in another way (eg using the .manageSubscriptionsSheet view modifier, or in Settings:App Store:Sandbox Account), the willAutoRenew property remains true, even though the subscription is in fact cancelled (ie it disappears after the expiry date) Does anyone know a workaround to determine cancellation status?
Posted
by
Post not yet marked as solved
17 Replies
13k Views
I'm using TestFlight to test an app with payment/subscription functionality. I created sandbox accounts in AppStore Connect accordingly to be able to test the subscriptions. I'm logged in with the sandbox account. When I try to subscribe in the App the wrong account (this is my actual real AppleID) is used for the subscription although it is recognized that this is just a sandbox subscription. I tried: logging off/on into the sandbox account creating a totally new sandbox account trying to trigger the payment with no logged in sandbox account The result is always: in the payment popup it is stated that the purchase account will be my original AppleID and not a sandbox account. How can I switch the accounts? Is this a bug at Apple's side somehow?
Posted
by
Post not yet marked as solved
3 Replies
3.0k Views
I am looking at using the v2 in-app subscriptions server-side notifications. I have got this working by decoding and validating the token using the x5c and alg properties in the header. However, I don't know how to validate that this certificate was issued by Apple. The docs don't really seem to say anything about this. Does anyone know how I do this? At the moment, my code is a bit pointless as the jwt could have been signed by anyone. The only other thing I can think of is to ignore the JWT altogether and just use the API to query every time which seems to defeat the object.
Posted
by
Post not yet marked as solved
1 Replies
1.7k Views
When I subscribe for a trial period in Apple products like: Apple Music Apple TV Apple News etc. If I want to cancel my subscription via App Store I see a message: If you cancel, you will immediately lose access to Apple Music and the remainder of your free trial. Нou cannot reactivate this trial At the same time for 3d party developers when a user clicks Cancel Free Trial alert says: If you end your trial now, you will still have access to it until some date So my question is how can I replicate the same logic for my app. I've googled a lot but didn't find anything. I believe it should be possible to do since Apple apps are just like any other app distributed via App Store. If not - it looks like unfair competition because users will more likely postpone trial cancellation for Apple products and forget about this which will result in charging their money.
Posted
by
Post not yet marked as solved
3 Replies
1.4k Views
Hi -- We have auto-renewable subscriptions available in-app. About a year and a half ago, we introduced a price change to these products, and we opted to keep the original prices for existing subscriptions. Today, while testing the subscription in the sandbox, we noticed that while the products are returned with the updated price (this correct price is displayed in the app), the App Store purchase flow shows the old price. I am using a brand new sandbox test user. When I open the Settings -> App Store -> Sandbox User -> Manage page, it lists our subscriptions with the old price. We are trying to understand where the discrepancy comes from. Is the sandbox subscription data cached somewhere? Can we clear this data? Can we force it to be refreshed from the production subscription prices? Is this an issue on sandbox only, or will it affect our production app? I am running iOS 14.4.2 on an iPhone 8 Plus.
Posted
by
Post not yet marked as solved
3 Replies
697 Views
I cannot believe I am not able to find any clear information on this, but how can I test introductory offers without affecting the real users? My case is the following: I have an in-app subscription plan that is cleared for sale (active). Now I want to provide introductory offer for it. In the official document it does not say how I can test the whole flow (including the introductory offer). Since my plan is already active, if I set the intro offer with a start date the current date, then it will affect my real users. But if I set the intro offer to start from the future, then the system Apple dialog that shows the price actually shows (and buys) the regular price.
Posted
by
Post marked as solved
3 Replies
2.2k Views
I've created 2 auto-renewing products, one with a cheaper price and one with a more expensive price. I show the cheaper product for legacy users (users who have been on the app for a long time). The problem here is that when a user goes to the App Store and manages their subscription there, they are able to see the cheaper option and subscribe to it. Is there a way I can hide the cheaper product from being purchased through the App Store and only allow them to be purchased from my app? I saw the Cleared For Sale option on the product but when I tried unchecking the box, it made it sound like after users' subscription ends, they will no longer continue auto-subscribing to the cheaper option. Or am I misunderstanding Cleared For Sale?
Posted
by
Post marked as solved
2 Replies
939 Views
I want to track subscriptions of multiple applications and need to choose unique key. Can transactionId from app1 match somehow transactionId from app2? If yes, then Is it possible situation: app1 and app2 have products with same productId (e.g. "com.subscription") and have transactions with same transactionId? So should I use key (appAppleId, productId, transactionId)? (It would be more convinient to use transactionId, but I am not sure about uniqueness)
Posted
by
Post not yet marked as solved
2 Replies
1.2k Views
Hello, At https://developer.apple.com/documentation/storekit/skpaymentqueue/3566726-presentcoderedemptionsheet Apple describes a way to enables users to redeem subscription offer codes. Unfortunately according to https://help.apple.com/app-store-connect/#/dev6a098e4b1 this only seems to relate to auto-renewable subscriptions. Is that right? Is there also a way to offer codes for non-renewing subscriptions? Thank you so much!
Posted
by
Post marked as solved
4 Replies
2.5k Views
Hey folks, due to Apple limitations, we have to remove one of our apps from the App Store listing. We have a new app created and already available, but now Apple flags both as spam. We were unable to smoothly transfer the older app (again - Apple limitations) therefore we created a clone one and depreciated the older one. Apple asked to do the "Archiving" (archive) for the older app. The older app is still available for sales. It also has thousands of customers, who use auto-renewal subscriptions (monthly, 6 months, yearly). So, what we want to achieve is to hide the old app from new sales/new users, but leave it available for currently active users who have auto-renewal subscriptions. We're contacting Apple reps, however, no clear answer has been provided yet. It seems we should do the removal of the old app from sale as defined in this article: https://help.apple.com/app-store-connect/#/dev7013b314c ? But the unclear part is if users, who bought their auto-renewed subscription via the app will continue recurring or not (when we remove app from sales). It's important mentioning that removal from sales is not the same as complete app removal or other types of removing things (e.g. https://help.apple.com/app-store-connect/#/dev360aba524). We are not completely removing the app, but removing it from sales for new users with the idea that current users should be able to still auto-renew. I've been looking for answers in the forum, however these tickets seems to be still open: https://developer.apple.com/forums/thread/24095 https://developer.apple.com/forums/thread/77346 https://developer.apple.com/forums/thread/672314 https://developer.apple.com/forums/thread/656485?answerId=626011022#626011022 https://developer.apple.com/forums/thread/123548?answerId=385413022#385413022 Appreciate any help here. Cheers.
Posted
by
Post marked as solved
2 Replies
2.6k Views
Hello, I am implementing StoreKit2. My app uses Transaction.currentEntitlements to load the user's purchased subscriptions after the app is launched, how the transactions are loaded? (from the AppStore/Internet or from the local receipt) currentEntitlements doesn't throw any exception, and I'm not sure how to handle the offline case.
Posted
by
Post not yet marked as solved
30 Replies
6.8k Views
Hello, we are facing an issue, that the Code Redemption Sheet is not continuing correctly. Sometimes its just disabling the "Redeem" button and nothing happens for a while. After a while the button gets enabled again and you can press the button again. Sometimes its working then, sometimes not. Furthermore after the button action works and the payment method was chosen, the same issue can happen again. Its doing nothing for a while and you have to start again. The app has the target SDK iOS 14 and uses SwiftUI. We just display the Code Redemption Sheet by using this snippet: SKPaymentQueue.default().presentCodeRedemptionSheet() The screenshot show the "stuck" behavior. The button is disabled and nothing is happening for a while. The code itself is fine and it is working. Best regards, Sebastian
Posted
by
Post not yet marked as solved
4 Replies
1.7k Views
I would like to programmatically keep track of offer codes that have been used. I just configured a Test Offer Code (Reference name), which contains 500 codes (Offer Codes) to buy a 1-month subscription for 0,49€. I was able to redeem the code and everything works, but I was expecting to receive the used code. Instead I received the Reference name in the payload from the App Store Server Notification in the field offer_code_ref_name="Test Offer Code". (expected was sth like offer_code_ref_name="JFFDS61SBJDBJ5BXJS4BX") I would be able to identify the Reference name by the code, if it was provided, because I have the following table in my app's backend: reference_name | code | url | expires_at | used | reserved Test Offer Code | xadz | zzz | 31-07-2022 | t | f Test Offer Code | asdf | *** | 31-07-2022 | f | f The used code doesn't seem to be included in the latest receipt. How can I obtain it? Can I somehow call App Store Connect API? Thanks
Posted
by
Post not yet marked as solved
4 Replies
744 Views
Hi, I am creating an app which provides in-app purchases to users, currently I am in testing phase of the purchase functionality and facing an issue regarding refunds. On upgrading a product that I am subscribed to (all products are auto-renewable subscriptions), I am receiving the UPGRADE notification type but I haven't yet received a REFUND notification type as the documentation suggests. I am using app store server-to-server Notifications 2.0+ with node.js as backend, I am receiving all the types of notifications just not the REFUND notification type.
Posted
by
Post marked as solved
2 Replies
750 Views
Hi, I have been submitting a promotion offer with signature generated from server with a Product id to Apple. But I see SKPaymentTransaction failed with nil error and unable to find the root cause. Here is the error what I am seeing -  <SKPaymentQueue: 0x2825baa50>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3903 "Unable to Purchase" UserInfo={NSLocalizedDescription=Unable to Purchase} Also, everytime I submit the product with the subscription offer an alert is displayed as "Unable to Purchase - Contact the developer for more information. [Environment: Sandbox]". Is there a better way to identify the root cause. Thank you!
Posted
by
Post not yet marked as solved
1 Replies
496 Views
Hello, I have a flutter app. I want to let some users to have a free subscription forever, but at the moment everyone is getting charged after free trial. Is it possible to achieve it in ios?
Posted
by