StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

What will happen if an existing subscriber redeem the offer code which is only eligible to new and expired subscribers?
I am working on an iOS app. I have created an annual offer code which is only eligible to new users and expired subscribers. May I know what will happen if an existing subscriber tries to redeem the offer using the offer code url? Then they would finish the whole process through the App Store. There are no ways for my app to block it. Would Apple not allow them to do this? If yes, would the existing subscribers have to cancel their subscription in order to redeem this annual offer code? If yes, will they then immediately see the offer? Or will they have to wait until their entitlement expires? Thanks.
1
0
423
Mar ’24
In-App Purchase error Invalid status code
On March 8, multiple users reported invalid status codes when using our app to make payments. By night, it was back to normal. Has anyone encountered the same problem? Error Domain=SKErrorDomain Code=0 "发生未知错误" UserInfo={NSLocalizedDescription=发生未知错误, NSUnderlyingError=0x283f71740 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f71d10 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSLocalizedDescription=Authentication Failed, NSMultipleUnderlyingErrorsKey=( "Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedFailureReason=The response has an invalid status code, AMSURL=https://auth.itunes.apple.com/auth/v1/native, AMSStatusCode=403, NSLocalizedDescription=Invalid Status Code}", "Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedFailureReason=The response has an invalid status code, AMSURL=https://auth.itunes.apple.com/auth/v1/native, AMSStatusCode=403, NSLocalizedDescription=Invalid Status Code}"), AMSURL=https://p42-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?guid=00008120-001E64823A0BC01E, AMSStatusCode=200, AMSServerPayload={ "cancel-purchase-batch" = 1; customerMessage = "使用 Apple ID 登录"; dialog = { cancelButtonString = "取消"; defaultButton = Buy; explanation = "输入 %%appleId%% 的密码以授权此交易。"; initialCheckboxValue = 1; kind = authorization; "m-allowed" = 0; message = "使用 Apple ID 登录"; okButtonAction = {.........
0
0
510
Mar ’24
How to set a price for in-app purchases so I get a specific amount after taxes and fees?
Hello, My app was just approved and it is a marketplace app for self-guided tours. The tours are digital products and hence we use in-app purchases. We are allowing people to buy worldwide because it is a travel-related product but I’m struggling to figure out how to set the price. The tour creators have a price in mind and we have a commission. We are able to calculate what price to set in US keeping in mind the 15% Apple fee and tax. However, once I set a price on the App Store in USD, there is a large variation in the amount I will be paid from other countries and currencies as each country levies its own tax. Managing 100+ countries manually is not feasible. Any workarounds or ways in which I can tell the App Store what I want to be paid after taxes so that prices are adjusted in each country accordingly???
2
0
691
Mar ’24
StoreKit2 - How to get actual price paid for subscription via Transaction?
My app listens for transactions using: for await result in Transaction.updates { // check verification and process Transaction } The result coming from these updates has a jwsRepresentation field, which when decoded server-side reveals the price the user paid, discounted in the case of a custom offer code. How can I get this value without a server roundtrip? Transaction does not have price field, and the subscription product's price does not seem to include custom offer code pricing.
2
0
525
Mar ’24
SKProducts api Error while connecting api.sandbox.apple.com/v1/catalog/us/in-apps
{NSLocalizedDescription=Reached max retry count, AMSURL=https://amp-api.sandbox.apple.com/v1/catalog/us/in-apps?extend=hostedContent&filter%5BappBundleId%5D=com.dazn.staging&filter%5BofferName%5D=BR.AP.HO.01.STAG,BR.MP.HO.01.STAG,BR.NFL.APPLE.SPP.HO.01.STAG&l=en-US&omit%5Bresource%5D=autos&platform=iphone&with=adHocOffers, AMSStatusCode=401, NSLocalizedFailureReason=Task reached max retry count (0 / 0);}
0
0
324
Mar ’24
Consumable Product Refund Abuse
Hello, We are a mobile game company, We have encountered an issue concerning the refunds of consumable products purchased through our app. The issue arises when some Apple users request refunds after purchasing these products, and Apple approves these refund requests even if our users have already consumed it. This situation leads to financial losses and creates an unfair experience among users. We are using App Store Server Notifications V2. So how can we prevent Refunding if user used already our product
2
1
1.1k
Mar ’24
Is there a way for developers to unsubscribe a specific user?
Our service has an IOS and Android app and a backend server. I have a question about handling refunds for simultaneous payments on Android and IOS. Is there any way to cancel and refund the IOS subscription payment in the backend when Google is paid first and IOS is paid almost simultaneously? For Android, unlike IOS IAP, the backend server can confirm the purchase with a purchase confirmation (ack), so even if IOS is paid first at almost the same time, it is possible to cancel it by checking the payment data in the backend and not sending an ack to Google's server if the IOS payment is already made.
0
0
437
Mar ’24
Problems with IAP in old app
My company did an app for a customer 10 years ago. The app has in-app purchases (not subscriptions). It is an Objective-C code base. Over the years we've done minor updates to this app in order to keep it in compliance, but no major overhaul. The app has been pretty reliable in the past, but recently my customer is getting a flood of complaints from users who say their in-app purchases disappear and can't be restored. It's happening too often to just be a case of bad internet connection or similar issue. The only thing that seems to be consistent is that it's never US-based users. Whenever I test this app using sandbox accounts, I cannot reproduce the problems that are being reported. I'm always able to make purchases and restore them after reinstalling the app, or restore them to a different device. The content associated with the purchases always downloads correctly, even if I intentionally interrupt and restore internet access. What can I do to figure this out? Should an IAP based app from 2014 be expected to work correctly today? Are there new legal issues with non-US app stores that we need to be aware of? I realize there isn't a lot to go on here, but I don't have any more information. Thanks, Frank
1
0
511
Mar ’24
Apple Insider Resume Purchase Reporting Errors
Only in sandboxed environment, it was fine before, recently there was an error clicking to resume purchase, showing the error cause as Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred,. NSUnderlyingError=0x303bae790 {Error Domain=ASDServerErrorDomain Code=5002 "An unknown error occurred" UserInfo={NSLocalizedFailureReason=An unknown error occurred}}}
3
0
534
Mar ’24
Resuming purchases for automatic subscriptions will show an error due to "Error Domain=SKErrorDomain Code=0" "An unknown error has occurred".
I also found this problem from this Monday morning, in the sandbox environment, resume the purchase operation, if the product is an in-app purchase non-consumable item, you can get the corresponding historical bill, but if it is an automatic subscription product, it is difficult to receive the historical bill, resulting in the inability to restore the automatic subscription product. You'll need to try a few or even 10 times to restore your purchase before you can get your previous bill. Resuming a purchase shows an error with the error Error Domain=SKErrorDomain Code=0 "An unknown error has occurred". I hope that Apple can check whether there is a related problem with the corresponding sandbox billing server, and I am anxious to wait for this problem to be solved.
0
0
347
Mar ’24
Offer Code Tracking
What does offerCode correlate to in this photo? What does CODE equals in the Offer Code URL? My goal is to track which promo codes generate successful transactions by sending a message with the CUSTOM CODE "Referral123" in the message payload to my database. Can someone please confirm that offerCode equals CODE equals "Referral123"? TIA <3
0
0
376
Mar ’24
which auto_renew_status field I should use to identify user action?
I received a version 1 server notification. auto_renew_status is true and another pending_renewal_info.auto_renew_status is 0. So did the user turn the subscription on or off? What does this mean and which field I should use to identify user action? Could anyone help me with that? The contents are as follows: { "environment": "PROD", "unified_receipt": { "status": 0, "environment": "Production", "latest_receipt_info": [ { "quantity": "1", "product_id": "com.protect.adpatrol.weekly2", "expires_date": "2023-03-19 18:12:56 Etc/GMT", "purchase_date": "2023-03-12 18:12:56 Etc/GMT", "transaction_id": "700001139057782", "expires_date_ms": "1679249576000", "is_trial_period": "false", "expires_date_pst": "2023-03-19 11:12:56 America/Los_Angeles", "purchase_date_ms": "1678644776000", "purchase_date_pst": "2023-03-12 11:12:56 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-02-28 06:18:59 Etc/GMT", "web_order_line_item_id": "700000519235393", "original_transaction_id": "700001128802427", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1677565139000", "original_purchase_date_pst": "2023-02-27 22:18:59 America/Los_Angeles", "subscription_group_identifier": "20900376" }, { "quantity": "1", "product_id": "com.protect.adpatrol.weekly2", "expires_date": "2023-03-03 06:18:57 Etc/GMT", "purchase_date": "2023-02-28 06:18:57 Etc/GMT", "transaction_id": "700001128802427", "expires_date_ms": "1677824337000", "is_trial_period": "true", "expires_date_pst": "2023-03-02 22:18:57 America/Los_Angeles", "purchase_date_ms": "1677565137000", "purchase_date_pst": "2023-02-27 22:18:57 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-02-28 06:18:59 Etc/GMT", "web_order_line_item_id": "700000519235392", "original_transaction_id": "700001128802427", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1677565139000", "original_purchase_date_pst": "2023-02-27 22:18:59 America/Los_Angeles", "subscription_group_identifier": "20900376" } ], "pending_renewal_info": [ { "product_id": "com.protect.adpatrol.weekly2", "auto_renew_status": "0", "auto_renew_product_id": "com.protect.adpatrol.weekly2", "original_transaction_id": "700001128802427" } ] }, "auto_renew_status": "true", "notification_type": "DID_CHANGE_RENEWAL_STATUS", "auto_renew_product_id": "com.protect.adpatrol.weekly2", "original_transaction_id": 700001128802427, "auto_renew_status_change_date": "2023-03-12 18:12:58 Etc/GMT", "auto_renew_status_change_date_ms": "1678644778000", "auto_renew_status_change_date_pst": "2023-03-12 11:12:58 America/Los_Angeles" }
1
0
539
Mar ’24
Webhook URL is not working in sandbox environment
Hi, I'm working on in-app purchases, and I've created a webhook to receive data sent by the app store whenever there's user subscription activity (CANCEL, DID_RENEW, DID_CHANGE_RENEWAL_STATUS, EXPIRED). Below is the full path of the webhook URL: Webhook URL: https://api.envelopegenerator.live/api/subscription/subscriptionnotification I've set up the webhook to retrieve the status of user subscriptions, but it's not receiving any calls from the app store.
3
0
650
Mar ’24
Code=4097 "connection to service named com.apple.storekitd"
StoreKit don't work with iOS 17.4. After updating to iOS 17.4 our users can't make any purchases in App. Its very critical bug that affected our App. <SKPaymentQueue: 0x302bb4670>: Error in remote proxy while checking server queue: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} [df94_SK2] Failed in XPC product request products(IDs: ["report"]): Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} Does anyone know what to do?
1
0
930
Mar ’24