App Store Server Notifications

RSS for tag

Monitor subscription events in real time with server notifications from the App Store using App Store Server Notifications.

App Store Server Notifications Documentation

Posts under App Store Server Notifications tag

95 Posts
Sort by:
Post not yet marked as solved
1 Replies
234 Views
I want to understand how to handle CANCEL notification type, I noticed that I get 3 CANCEL notifications one after the other, it sounds like the user gets a refund for 3 different transactions, am I wrong? When I look at the receipt I see also the cancellation date ms field in 3 latest transactions in the latest receipt info, does it mean the user gets 3 refunds for 3 transactions? (the cancellation date is the same cancellation date for all the 3 transactions) This is what I got, as you see I got the cancellation date is the same, does it mean a full refund for every transaction in the following?: "cancellation_date_ms": 1650188985000, "cancellation_reason": "0", "expires_date_ms": 1650732253000, "in_app_ownership_type": 2, "original_purchase_date_ms": 1640606326000, "product_id": "com.neocortext.doublicatapp.subscription.weekly.new", "purchase_date_ms": 1650127453000, "quantity": 1, "subscription_group_identifier": "20843276", "transaction_id": "170001301196587", "original_transaction_id": "170001205648289", "web_order_line_item_id": "170000572783810" }, { "cancellation_date_ms": 1650188985000, "cancellation_reason": "0", "expires_date_ms": 1650127453000, "in_app_ownership_type": 2, "original_purchase_date_ms": 1640606326000, "product_id": "com.neocortext.doublicatapp.subscription.weekly.new", "purchase_date_ms": 1649522653000, "quantity": 1, "subscription_group_identifier": "20843276", "transaction_id": "170001295106872", "original_transaction_id": "170001205648289", "web_order_line_item_id": "170000569655974" }, { "cancellation_date_ms": 1650188985000, "cancellation_reason": "0", "expires_date_ms": 1649522653000, "in_app_ownership_type": 2, "original_purchase_date_ms": 1640606326000, "product_id": "com.neocortext.doublicatapp.subscription.weekly.new", "purchase_date_ms": 1648917853000, "quantity": 1, "subscription_group_identifier": "20843276", "transaction_id": "170001289230515", "original_transaction_id": "170001205648289", "web_order_line_item_id": "170000544361015" },
Posted
by
Post not yet marked as solved
0 Replies
174 Views
Hi, I am trying to figure out the following statement in Apple documentation: If a subscription expires due to a cancellation or billing issue, the days of paid service stop accumulating. If the subscription is renewed within 60 days, the days of paid service resume from the recovery date. Let's say the user subscribes to product X in subscription group X, then the expiry date is exceeded. After 10 days, the user subscribes to product Y in subscription group X, does the days of paid service continue accumulating? or the days of paid service will be reset to 0?
Posted
by
Post not yet marked as solved
0 Replies
143 Views
Currently, I work with CKSubcription and remote notifications. I have a question concerns application(_:didReceiveRemoteNotification:fetchCompletionHandler:) method. In Apple's documentations we can read: As soon as you finish processing the notification, you must call the block in the handler parameter or your app will be terminated. Your app has up to 30 seconds of wall-clock time to process the notification and call the specified completion handler block. In practice, you should call the handler block as soon as you are done processing the notification. Source: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application The method works correctly. My app "wakes up" when got a notification (to observe that, I use option + command + escape). Do I correctly undrestand? - when I call hadler block, should app close immediately? My app closes after 30 second, even if I put only completionHandler(...) in this method. I asked beacuse in the documentation we can read. Your app has UP to 30 seconds Thank you in advance.
Posted
by
Post not yet marked as solved
1 Replies
237 Views
Is there any real example of app store signed transaction or signed notification? I can find decoded form for transaction info or notification payload but not real signed example. There are some decoded examples - https://qonversion.io/blog/apples-2021-updates-to-managing-in-app-purchases-from-the-server but I want some real token with header alg and x5c. I would like test my backend implementation during development. My goal is receive App Store Server Notifications v2 and update my data.
Posted
by
Post not yet marked as solved
1 Replies
223 Views
Hi, I am trying to figure out the following statement in Apple documentation: If a subscription expires due to a cancellation or billing issue, the days of paid service stop accumulating. If the subscription is renewed within 60 days, the days of paid service resume from the recovery date. Let's say the user received a Refund and after 10 days subscribes to the same auto-renewable product, will the days of paid service stop accumulating? After receiving a DID_CHANGE_RENEWAL_STATUS notification with auto_renew_status = 0 and the expiry date is exceeded (means that the subscription is churned) and then after 10 days the user subscribes to the same auto-renewable product, will the days of paid service stop accumulating? If for those cases the days of paid service continue accumulating, will it be also applied for subscribing to another product from the same subscription group? Thanks!!!
Posted
by
Post not yet marked as solved
1 Replies
201 Views
We are moving to apple server notifications V2. But i don't understand how to determine what type of intro offer now. We have offerType field with value 1 that means that user in intro offer. But what type of intro offer used? In V1 we can do it with fields isTrialPeriod and isIntroOfferPeriod. But in V2 i can't find anything like this.
Posted
by
Post not yet marked as solved
0 Replies
187 Views
I am learning about swiftui. I want my app to be able to send and receive a small amount of data to another app on another device. That device will include andriod as well as Apple. Since I am new to SwiftUI and iphone app development, I am not sure what to use to accomplish this. I thought that notifications would work well because the client app doesn't need to be in a run state or even in the foreground. However I decided I want to work with cross-platforms. I looked into Firebase but still have a lot of research to do. What can I use to send and receive data in a cross-platforms?
Posted
by
Post marked as solved
2 Replies
362 Views
Hello, My aps-environment entitlement is set to development in my app.entitlements file. However when I build my application as an archive (to generate an .ipa file), the aps-environment entitlement is automatically modified to production by Xcode because it uses a Distribution provisioning profile. I read in APS Environment Entitlement documentation that this default behaviour can be changed : But I didn't find a way to do it. Is it possible to change (force) this aps-environment to development even for a distribution build ? Indeed I don't want it to be production as the .ipa is for test purpose only (it is not the Store build). Thank you very much for your help,
Posted
by
Post not yet marked as solved
0 Replies
190 Views
This time, when I transferred the app to another company (AppTransfer), the push notification did not fly after that. It doesn't go away even after restarting the app, and it seems that no new tokens have been issued. (I don't know if this is due to Firebase or Apple) The AuthKey seems to be correct because the device that newly installed the app has received the notification. Firebase is used for push notifications, and the replacement of the AuthKey of the new company account has been completed. Firebase is returning a "Not Registered" response, probably an APNs response "Unregistered". So, the question is, (1) Will all tokens become invalid after transferring the app? (2) Will tokens that have become Unregistered be revived? Is there anything we can do after replacing the certificate? (3) If this event is not due to AppTransfer, I would like some other advice that we should investigate. Thank you for reading this far.
Posted
by
Post not yet marked as solved
0 Replies
204 Views
We are planning to ban users who repeat suspected refund abuse. For judging the refund is abuse or not, we think the cancellation_reason property in ServerNotification helpful. https://developer.apple.com/documentation/appstoreservernotifications/unified_receipt/latest_receipt_info cancellation_reason: The reason for a refunded or revoked transaction. A value of “1” indicates that the customer canceled their transaction due to an actual or perceived issue within your app. A value of “0” indicates that the transaction was canceled for another reason; for example, if the customer made the purchase accidentally. Possible values: 1, 0 We're thinking to judge the user who refunds many times with cancellation_reason = 0 as suspicious of abuse, and ban. Question: Is it OK to use cancellation_reason for such judgement? How is the property determined? Does it only rely on User's report? Or does the Apple Support make a judgement? Can you provide a general exsample when cancellation_reason is 0? (We want reply from person inside Apple). About Identify Refund Abuse: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/handling_refund_notifications#3591293
Posted
by
Post marked as solved
1 Replies
326 Views
We are developing the system which receives the App Store Server Notifications. https://developer.apple.com/documentation/appstoreservernotifications We needs the way to test this system with producing the Notification, especially about REFUND notification type. Is there any way? Maybe there is no choice but to actually refund by requesting from reportaproblem.apple.com? https://support.apple.com/en-us/HT204084 I think this request is manually handled by Apple support operator and take a long time. So, we would be happy if there is a simple way to produce REFUND server notification for test.
Posted
by
Post marked as solved
1 Replies
253 Views
Question about data format of response body v1 on “Server Notification” (not storekit). https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv1 We’d like to specify the refunded product or purchase record in our database when receiving the REFUND notification. We are guessingproduct_id and original_transaction_id in the most-recent latest_receipt_info are the keys for specify that, and we can find most-recent latest_receipt_info by checking the purchase_date. But we haven’t found official information from apple about that and we can't sure about our guess. We just found infomation about storekit, but not for server notification. https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/handling_refund_notifications Does anyone know the official information or actual utilization experience? What are the rest of the latest_receipt_info array? Why it is designed as array?
Posted
by
Post not yet marked as solved
3 Replies
454 Views
Hello, we are currently testing non-renewing subscriptions purchase in new sandbox environment. We would like to receive server notifications but for v2 we only receive notification for auto-renewing subscriptions. Are notifications for other types of purchases also availible ?
Posted
by
Post not yet marked as solved
0 Replies
336 Views
I have been testing server to server notifications but I am not sure of getting the following notifications on sandbox. I have enabled the grace period on my app store connect account but how to fall the billing to be failed to renew and test grace period concept. Can any one help me on the actions to be performed for getting following notifications on Sandbox? 1, DID_CHANGE_RENEWAL_STATUS -> AUTO_RENEW_ENABLED, AUTO_RENEW_DISABLED 2, EXPIRED -> BILLING_RETRY 3, GRACE_PERIOD_EXPIRED 4, DID_FAIL_TO_RENEW -> GRACE_PERIOD 5, DID_RECOVER 6, REVOKE
Posted
by
Post not yet marked as solved
0 Replies
196 Views
I set out app sandbox v2 server notification url ,it is https, but it cannot receive any notification after user subscribed or renewed our product. How can I ensure that notification is sended, or test the notification is working. Please help me , thanks
Posted
by
Post not yet marked as solved
1 Replies
355 Views
Hi, We have auto renewable in app purchases in our application. As per the documentation we have configured Production & Sandbox URLs to receive V2 notifications. Also, created multiple sandbox test accounts to see if notifications can be received? Unfortunately not receiving any of the notifications as mentioned in the documentation to the configured URLs. If any one resolved this issue already, please comment. My feedback ticket is FB9933934, please help me! Thanks.
Posted
by
Post not yet marked as solved
0 Replies
256 Views
sandbox env, after a sub product auto stop autorenew, customer renewed a subscription interactively by using our app’s interface. I am using Apple's server-to-server notification. our server receive event as follows: DID_CHANGE_RENEWAL_STATUS autorenewstatus =1; INTERACTIVE_RENEWAL;DID_CHANGE_RENEWAL_STATUS autorenewstatus =0. i am confused about why autorenewstatus=0 comes after INTERACTIVE_RENEWAL event automatically.
Posted
by
Post not yet marked as solved
2 Replies
543 Views
Hello All, Our app implements in app purchase as follows, The App is free to download and sign up, some features are available if monthly subscription is valid. We have implemented server side validation (app side validation is not present) so app will perform the in app purchase and forward the receipt, received from App Store, to the server. This functionality worked so far but recently we noticed that the App Store is sending invalid/expired receipt to the app, which in turn gets forwarded to the server. Upon checking the receipt data, server finds out the receipt is already expired and so server disables the paid features. We are trying to figure out process to enable user to resubscribe to the paid feature through app. Not sure if we missed something but the document we found so far, mentions to block the features or provide grace period to the users but we were not able to locate any document which explains process to enable users to resubscribes. Any pointer will be helpful. Validating Receipts: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/validating_receipts_with_the_app_store Please let me know if you need any additional help. Thanks in advance.
Posted
by