Hello.
platform: Please let me know which platform 'Non-Apple platform' is referring to. For example, Google or Amazon? And is it correct to mean the platform that consumed the products received due to in-app purchases?
playTime: Does 'playTime' mean the time when the customer purchased the app and actually accessed the app? Or do you mean the time you accessed after the in-app purchase?
App Store Server Notifications
RSS for tagMonitor subscription events in real time with server notifications from the App Store using App Store Server Notifications.
Posts under App Store Server Notifications tag
96 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Is there an App store server notification (V2) when the free trial period ends?
Unfortunately, I can't find any information about whether and what information I receive as an app store notification when a free trail period expires. I assumed that there would be an expired or initial buy notification, but apparently this is not the case.
Can anyone help me? Thank you!
accountTenure: Is this the app's customer account registration period?
lifetimeDollarsPurchased: Do I have to include the amount refunded from the in-app purchase amount since I bought it?
playTime: What is the standard for the time you used the app?
refundPreference: I don't know the meaning of the '3' value.
hi, I am trying to schedule a UNNotificationRequest at a certain date using UNCalendarNotificationTrigger, and I also want to update the badge count accordingly. However the badge property in UNNotificationContent can only be set when adding UNNotificationRequest, not when the trigger is fired or notification is actually delivered. How can I set up-to-date badge count if notification is scheduled in the future?
For example, if I scheduled notification A to 3 hours later with badge count 1, and in between I got notification B, badge count should be 2 when A is delivered but it will be 1.
I am aware of didPresent delegate which can be used when app is in foreground when notification is delivered, but is there any delegate that is called when UNNotificationRequest is delivered and app is backgrounded or we are using NSE? Thanks.
Hello,
I am developing App Store Server to Server Notifications.
(The app has already been deployed and is in operation.)
Test notifications in both the Sandbox and Production environments have been working correctly.
Additionally, I tested in-app purchases using a Sandbox account and confirmed that the server notifications are received.
However, when an actual purchase is made in the live app, the server notifications are not received.
Please provide the possible causes and solutions for this issue.
For example:
The transaction id obtained by the app is: 2000000625603237
The transaction id notified by Apple is: 2000000625603236
Why does this happen?
I am trying to grant access to users that subscribe to premium on the iOS app also to users that use the macOS version.
The iOS and macOS version are two separate apps with different BundleIDs, same Team ID.
I can't create a App bundle because they are part of different platforms.
I know that I could ask the user for a login so I could recognize the user from the authentication, but I would like to avoid this step.
Is there any ID i can use to identify users between different platforms?
Hello, I'm using 'App Store Server Notifications V2'.
I have a question about 'CONSUMPTION_REQUEST' notification in 'notificationType'.
I was wondering if there would be any impact on refunds if I received this notification and didn't respond. (Always refund etc..)
I'm migrating my app to Store Kit V1, to Store Kit V2, and, due some legacy circumstances I'm implemented in past using a synchronous method, calling verify receipt on my server to validate receipt and do the needed business logic, but due to the deadline I changed the entire app integration and some questions starting to appear in my mind.
First of all, when I processing the purchase when basically I will receive the notification? When the Store Kit calls the transaction.finish or after the purchase was successful I always will receive this notification?
We are utilizing the App Store's server-to-server notification feature. Upon receiving a notification on our server, is there a specific deadline or time limit for responding back to the App Store?
We just skimmed through the below documentation
https://developer.apple.com/documentation/appstoreservernotifications/responding_to_app_store_server_notifications
In this doc we could only see the responses that app store is expecting us to send back but no any information regarding acknowledgment time for a request
Hello,
I am encountering an issue where I receive an App Store Server Notification V2 upon the purchase of a consumable item.
I have configured the App Store Server Notification V2 endpoint to handle notifications related to subscription products.
However, I did not expect to receive notifications for consumable purchases.
The notification includes the following signedPayload decoded into the ResponseBodyV2DecodedPayload object with the following values:
notificationUUID: 3cd6410b-0c89-4247-aba5-20710e79895e
notificationType: null
subtype: null
The transaction information decoded from the ResponseBodyV2DecodedPayload object is as follows:
transactionId: 2000000633622618
webOrderLineItemId: null
productId: heart_2
To debug, I called the Get Notification History API of the App Store Server API, and the mentioned notification for the consumable product purchase is not included in the history. Only notifications related to subscription product purchases are retrieved.
According to the notification type documentation, there is no explanation for cases where both notificationType and subtype are null, nor is there any mention of receiving notifications for consumable purchases. Therefore, I am uncertain how to interpret and handle this notification.
Could you please provide an explanation or guidance on this issue?
Thank you.
References:
https://developer.apple.com/forums/thread/737592
https://developer.apple.com/documentation/appstoreservernotifications/notificationtype
Hello team, I have been using FCM push notifications since January in my app, and I have been sending campaign messages everyday since then to both Android and IOS.
Since yesterday, when I create a campaign and target my IOS app, the notifications are not getting delivered even if it shows the number of sends as 80.
Interestingly, when I am trying to send a test notification using a specific FCM token, then it is being sent. Also via my code , in the app if any notification is triggered, then that is also getting delivered.
I really need to keep sending campaign messages daily, any suggestions or help will be much appreciated?
I'm implement the app store notification handling on Refund case, but there is one point that i'm not sure and there seems little evidence from the notification doc.
So if a customer requested for a refund for its current active subscription, and App store processed the refund and refund the customer. Now
what would be the status of this subscription? still active, set to cancel at period end, or canceled already?
If the answer to 1. is "set to cancel" or "canceled already", would there still be notifications to my webhook endpoint just like these lifecycle events went through "normal" customer action to cancel the subscription?
Any details would be much appreciated, Thanks!
I'm working in Apple's Sandbox environment to implement in-app purchase of an auto-renewable subscription.
I followed the instructions at this link in order to Enable Billing Grace Period: https://developer.apple.com/help/app-store-connect/manage-subscriptions/enable-billing-grace-period-for-auto-renewable-subscriptions.
However, when I receive an App Store Server Notification for when the user's billing method fails (DID_FAIL_TO_RENEW), it includes no information about the gracePeriodExpiresDate and we never get a GRACE_PERIOD_EXPIRED notification.
Logs showing App Store Server Notification not reflecting Grace Period Enabled.
I enabled grace period in App Store Connect like three weeks ago, so it's not a delay there.
What can I do to test out Billing Grace Period? Is this just an Apple bug?
Hello,
I am currently implementing server-side handling for in-app subscription payments and using App Store Server Notifications V2 to receive notifications with a TestFlight account.
However, I am not receiving EXPIRED notifications, although I am successfully receiving other notifications such as SUBSCRIBED, DID_RENEW, and DID_CHANGE_RENEWAL_PREF.
Here are some details of my observations:
Until a certain point, I was receiving EXPIRED notifications without any issues, but they stopped coming in after that point.
Each subscription renews every 3 minutes in TestFlight account, and I receive DID_RENEW notifications 7 to 12 times. According to the official documentation, the subscriptions should renew up to 12 times, but I am not receiving exactly 12 DID_RENEW notifications. This inconsistency might be related to the issue.
Other notifications (SUBSCRIBED, DID_RENEW, DID_CHANGE_RENEWAL_PREF) are received without any issues.
Could anyone provide insight into why this might be happening and suggest any alternative methods to handle subscription expirations in case the EXPIRED notifications are not reliable?
Thank you for your assistance.
Relevant Official Documentation
App Store Server Notifications V2
App Store Server Notifications V2_notificationType
Testing in-app purchases with sandbox
Current Server Implementation
Below is the Kotlin Spring Boot server code currently implemented for handling App Store Server Notifications V2:
@RestController
class ProductIosController(
private val productIosService: ProductIosService,
private val appStoreNotificationService: AppStoreNotificationService,
) : BaseController {
@PostMapping("/api/v1/ios-products/app-store-notifications-v2")
fun handleNotification(@RequestBody @Valid notification: AppStoreNotificationRequest): CustomResponse {
appStoreNotificationService.processNotification(notification)
return CustomResponse.ok()
}
}
@Service
class AppStoreNotificationService(
@Qualifier("appStoreClient") private val appStoreServerAPIClient: AppStoreServerAPIClient,
@Qualifier("signedVerifier") private val signedDataVerifier: SignedDataVerifier,
) {
@Transactional
fun processNotification(notification: AppStoreNotificationRequest) {
logger.info("signedPayload: ${notification.signedPayload}")
val decodedPayload = verifyAndDecodeSignedPayload(notification.signedPayload)
val notificationType = decodedPayload.notificationType
val signedTransactionInfo = decodedPayload.data.signedTransactionInfo
val transaction = signedDataVerifier.verifyAndDecodeTransaction(signedTransactionInfo)
val (user, product) = fetchUserAndProduct(transaction)
when (notificationType) {
SUBSCRIBED -> processSubscriptionPurchase(user, product, decodedPayload, transaction)
DID_CHANGE_RENEWAL_PREF -> processSubscriptionGradeChange(user, product, decodedPayload, transaction)
DID_CHANGE_RENEWAL_STATUS -> processRenewalStatusChange(transaction)
OFFER_REDEEMED -> processOfferRedeemed(transaction)
DID_RENEW -> processSubscriptionRenewal(user, product, decodedPayload, transaction)
EXPIRED -> processSubscriptionExpiration(user, product)
DID_FAIL_TO_RENEW -> processFailedRenewal(transaction)
GRACE_PERIOD_EXPIRED -> processSubscriptionGracePeriodExpiration(transaction)
PRICE_INCREASE -> processPriceIncrease(transaction)
REFUND -> processSubscriptionRefund(transaction)
REFUND_DECLINED -> processRefundDeclined(transaction)
CONSUMPTION_REQUEST -> processConsumptionRequest(transaction)
RENEWAL_EXTENDED -> processRenewalExtension(transaction)
REVOKE -> processSubscriptionRevocation(transaction)
TEST -> processTestNotification(transaction)
RENEWAL_EXTENSION -> processRenewalExtension(transaction)
REFUND_REVERSED -> processRefundReversed(transaction)
EXTERNAL_PURCHASE_TOKEN -> processExternalPurchaseToken(transaction)
else -> logger.warn("Unsupported notification type: ${notificationType.value}")
}
}
Hi, Our app that implemented in-app payment has been reviewed and passed and is currently in operation.
However, there is a problem with the App Store server notification V2.
According to the url https://developer.apple.com/documentation/appstoreservernotifications/responding_to_app_store_server_notifications,
it is written as follows.
"When you set up the endpoints on your server to receive notifications, configure your server to send a response. Use HTTP status codes to indicate whether the App Store server notification post succeeded:
Send HTTP 200, or any HTTP code between 200 and 206, if the post was successful.
Send HTTP 50x or 40x to have the App Store retry the notification, if the post didn't succeed.
The system considers all other HTTP codes an unsuccessful post. Your server isn’t required to return a data value.
If the App Store server doesn’t receive a success response from your server after the initial notification attempt, it retries as follows:
For version 2 notifications, it retries five times, at 1, 12, 24, 48, and 72 hours after the previous attempt."
We are sending an HTTP status code to the Apple server by 200 or 40x or 50x when we receive an Apple notification from the server as per the document.
Nevertheless, Apple Server continues to send us 5 times App Store server notifications for each transaction.
I would appreciate it if you could share how we can do it.
Also, we can provide the implementation code of our server through code-level support.
Thank you for your support.
Hello,
we recently switched to the V2 notifications and we are noticing some odd requests.
In general all works as expected, except that we are receiving some empty notifications i.e. the body if blank.
Has anyone experienced the same issue?
Is this a normal behaviour and if so how should we handle it?
Thank you in advance.
Greetings,
Ilian
I stopped receiving status notifications on my app. I have to contantly log to see if my app build went through review. I was getting them, and i do get them for other apps I am admin on. The one I create and manage, I’m not getting emails.
Hi,
I am processing both REFUNDED and REVOKED transactions on the client-side and on the server using Apple's App Store Server Notifications (V2).
For transactions with an inAppOwnershipType of FAMILY_SHARED, I receive REVOKE notifications that (sometimes) do not include a revocationDate. What does this imply, and what actions should I take?
Additionally, when I query their transaction IDs using the App Store API, they also lack a revocationDate and do not appear in the results when I filter for revoked transactions.
Is it appropriate to block these users? Why are server-to-server REVOKE notifications sent in the first place if the transaction does not appear as revoked in the API?
Thanks
Hi I'm working on IAP for my app, with all products being consumables. If I use App Store Server Notifications, will I get updates on the payment status (successful, failed, pending, etc.) of my products?
I've worked on Android IAP, which provides such updates via subscriptions on Google Cloud Console. Does App Store Server Notifications work the same? The reason I need this is for the cases where the payment is slow, interrupted or any other potential issues.