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

92 Posts
Sort by:
Post not yet marked as solved
1 Replies
86 Views
Hi All, We are trying server-to-server notifications for in-app purchases. This is the first time we are configuring in-app purchases for the app, so configurations are still for test apps and in-app purchases being tested by sandbox accounts. For server-to-server notification, we configured the url as mentioned in the doc, but still, our server url is not being called after a successful in-app purchase. Could you please help if anything more is required for config?
Posted Last updated
.
Post not yet marked as solved
0 Replies
18 Views
I'm doing some product brainstorming and was wondering if its possible (or still possible) to, from an App Store installed app, do something like notification filter from Messages, Email, Gmail, basically both from other App-Store-downloaded apps and system apps. Is that possible? Example: Am I able to detect a message notification from iMessage and do something in my app ? Thanks in advanced, kev
Posted
by kfieldi6.
Last updated
.
Post not yet marked as solved
1 Replies
402 Views
I try to receive remote notifications in widgets(implemented through WidgetKit), but failed. It known that enable remote notifications should register first by calling UIApplication.shared.registerForRemoteNotifications() but in widget cannot calling shared, it is available in widgets @property(class, nonatomic, readonly) UIApplication *sharedApplication NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead."); and if try to init a UIApplication(by UIApplication()), the app will crash for more than one UIApplication instance.
Posted
by RobinGao.
Last updated
.
Post not yet marked as solved
12 Replies
2.2k Views
When calling the SKPaymentQueue.default().presentCodeRedemptionSheet() method on live appstore app it will present redemption sheet and after entering the promo code in it is displaying 'Cannot connect' screen as seen in attached picture and this is after entering the offer code. instead of showing me code benefits associated with subscription plan it is displaying 'Cannot connect' screen . What could be the reason for this and what solutions can be found to solve the problem? please some one help it is really frustrating. https://i.ibb.co/BChSQgq/IMG-52-EDEB1596-F8-1.jpg
Posted
by Veerat.
Last updated
.
Post not yet marked as solved
1 Replies
172 Views
When I test my iOS subscription purchases in the sandbox environment, sometimes the original_transaction_id returned by receipt verification changes (gets incremented by 1 to be precise) when I receive the corresponding server-to-server notification. Very rarely this would happen in the production environment as well but lately I notice this more often in sandbox. Anybody else experiencing this?
Posted
by crauss77.
Last updated
.
Post not yet marked as solved
2 Replies
848 Views
We have enabled Billing Grace Period in one of our subscription apps. It has been almost a month since we have enabled the feature but we are still not seeing any users in Billing Retry State with grace_period_expires_date fields in the Pending Renewal Info. How long after enabling this feature in App Store Connect should we begin to see users in Billing Retry state with grace period information? Thanks!
Posted Last updated
.
Post not yet marked as solved
1 Replies
179 Views
When testing our integration with Apple Server Notifications, we have noticed a strange scenario. When a Sandbox user first purchases an automatically renewing subscription, our server successfully receives a bunch of DID_RENEW notifications, and then eventually a DID_CHANGE_RENEWAL_STATUS notification with auto_renew_status as false. This lets us know that the subscription has expired. When that Sandbox user purchases the same automatically renewing subscription (via the app, or from within Settings on their phone), the subscription doesn't actually renew. Instead, we only receive: INTERACTIVE_RENEWAL DID_CHANGE_RENEWAL_STATUS with auto_renew_status as true DID_CHANGE_RENEWAL_STATUS with auto_renew_status as false In both instances the IAP purchase Why doesn't the renewal of an expired subscription automatically renew? Is this a bug, a Sandbox issue, or perhaps something else?
Posted
by Leight.
Last updated
.
Post not yet marked as solved
5 Replies
628 Views
We have an App Store Server Notification endpoint. Our app offers an in app subscription. Most notifications have all of the expected fields, but in a small number of cases the decoded signedTransactionInfo and signedRenewalInfo fields are empty. I can't see anything about these fields being optional in the documentation, and without the transaction information I can't get the transaction id of the user, so I can't tell how this notification relates to others for the same original transaction id. Are these notifications expected? Should I be handling them in a special way? Or should I just ignore them? For example, a normal transaction will have the following fields: responseBodyV2DecodedPayload (     [notificationType] => DID_RENEW     [notificationUUID] => …     [version] => 2.0     [signedDate] => 1660947328849     [data] => (             [bundleId] => com.playpokpok.playroom             [bundleVersion] => 9             [environment] => Sandbox             [signedTransactionInfo] => JWSTransactionInfo             [signedRenewalInfo] => JWSRenewalInfo         ) ) But one of these unexpected requests will have the following form: responseBodyV2DecodedPayload (     [notificationType] => EXPIRED     [subtype] => VOLUNTARY     [notificationUUID] => …     [version] => 2.0     [signedDate] => 1662661854606     [data] => (             [appAppleId] => 1550204730             [bundleId] => com.playpokpok.playroom             [bundleVersion] => 6             [environment] => Production         ) )
Posted Last updated
.
Post not yet marked as solved
0 Replies
197 Views
Hi, I calculate the paid service days when renewal occurs, which means I add the period time into the paid service days of the subscriber. What should I do when the transaction is a trial transaction? Should I add the period time to the paid service days or ignore it because this is a free period ? Thanks !!!
Posted Last updated
.
Post not yet marked as solved
5 Replies
347 Views
We have started seeing v2 notifications coming in - various types/subtypes - that contain a signedRenewalInfo JWT, but no signedTransactionInfo JWT. This is new, we haven't seen it before. What's happening, what do we do with these? Is this a bug or has there been a change to the spec? There is no expire date and other information that is needed to properly process subscription updates. According to your documentation, this is not supposed to happen: https://developer.apple.com/documentation/appstoreservernotifications/data Our code is written to expect the data structure described in the documentation, and has worked fine for a long time, but this is now causing errors; please advise us on what we are expected to do here.
Posted
by pnicoFP.
Last updated
.
Post not yet marked as solved
0 Replies
197 Views
As per the display in "App Store Connect > Sales and Trends > Subscriptions > Summary", I'm wanting to understand how to calculate the 'Active paid subscriptions' figure for a particular period using only the subscription event data. This is for further analysis and calculation outside of App Store Connect. For example, if at the start of April I have 500 active paid subscriptions, then at the end of April I have 550 active paid subscriptions, what are the calculation of Subscription events that would make up this figure? I'd presume the formula would be: End of period subscriptions = start of period subscriptions + activations (includes trials) + conversions to standard price + reactivations - refunds - trial only activations - cancellations However when I compare the above calculation against what is reported by 'Active paid subscriptions' at the start and end of a period in App Store Connect it is not the same. What is the calculation of events across a period that determines the current 'Active paid subscriptions' figure?
Posted
by bentocorp.
Last updated
.
Post not yet marked as solved
2 Replies
515 Views
Free trial is a discount method that can be used in Introductory offers, promotional offers, and promotion codes, and it is not necessarily to use in promotional offers. Going further, is there a way to judge whether the offer is Pay as you go, Pay up front, or free trial?
Posted
by daz2yy.
Last updated
.
Post marked as solved
1 Replies
279 Views
How can I be notified of the server address I specify in real time after the user purchases a one-time item? I only saw that the subscription data can be pushed to my server address. This is the subscription push: https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv2decodedpayload, where can I see the one-time subscription?
Posted
by HUIRAO.
Last updated
.
Post not yet marked as solved
3 Replies
1.2k Views
Based on this  News and Updates - https://developer.apple.com/news/?id=tv3bhra6, it means that now it's possible to get server to server notification on all in-app purchases including non-renewing subscriptions right? I've provided a url in the app information section to get app store server to server notification. I've tried all four types of subscriptions. I'm not getting any response from app store even after trying 4-5 test purchases using sandbox account in my device for consumable, non-consumable and non renewing subscription.But if I'm doing an auto-renewing subscription test purchase, then the url is getting hit and I'm getting response from the app store. Why I'm getting notification only for auto renewing subscription and not for others? Is the new update as mentioned in the above link live ?
Posted
by njawahire.
Last updated
.
Post not yet marked as solved
0 Replies
422 Views
We are facing a issue of transaction mismatch between App Store server notification and subscription status api because of this we are not able to activate the expected subscription for user. User has successfully purchased a subscription from application. On our server we got the notification with below transaction : { **  "transactionId": "170001503839428",   "originalTransactionId": "170001503839428",**   "webOrderLineItemId": "170000681682289",   "bundleId": "com.*****",   "productId": "com.**.*",   "subscriptionGroupIdentifier": "21020104",   "purchaseDate": 1668398097000,   "originalPurchaseDate": 1668398098000,   "expiresDate": 1699934097000,   "quantity": 1,   "type": "Auto-Renewable Subscription",   "appAccountToken": "2d98c4f1-3af9-4965-89ca-0495940d1a58",   "inAppOwnershipType": "PURCHASED",   "signedDate": 1669031276395,   "environment": "Production" } We tried to validate the transaction using originalTransactionId (170001503839428) through subscription status api. We got below latest transaction from api having different originalTransactionId: {  ** "transactionId": "170001466326163",   "originalTransactionId": "170001466326163",**   "webOrderLineItemId": "170000661796452",   "bundleId": "com.*****",   "productId": "com.**.",   "subscriptionGroupIdentifier": "21020104",   "purchaseDate": 1665113844000,   "originalPurchaseDate": 1665113845000,   "expiresDate": 1665718644000,   "quantity": 1,   "type": "Auto-Renewable Subscription",   "inAppOwnershipType": "PURCHASED",   "signedDate": 1669036686044,   "offerType": 1,   "environment": "Production" } Because of this mismatch our validation is getting failed at our server. How is it possible to get different transaction when we are providing different originalTransactionId as api parameter? Dear team, please look into this.
Posted Last updated
.
Post marked as solved
1 Replies
409 Views
I am making get request using curl command to the sandbox url with test notification token to receive the signed payload base64 string as a response. curl -v -H 'Authorization: Bearer token' -X GET https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test/{testNotificationToken} Signed payload contains 3 base64 string separated by dot(.), while encoding the second base64 string which is payload i am getting the expected properties as described here https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv2decodedpayload "notificationType":"TEST","notificationUUID":"9143d462-630c-467d-9480-47acedac9c99","data":{"bundleId":"com.example.exampleapp","environment":"Sandbox"},"version":"2.0","signedDate":1668566967923} In the data object the missing properties are signedRenewalInfo and signedTransactionInfo. As mentioned here https://developer.apple.com/documentation/appstoreservernotifications/data Why I am not getting those two properties in data object? Is it because of sandbox environment?
Posted
by Avisek.
Last updated
.