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

99 Posts
Sort by:
Post not yet marked as solved
1 Replies
358 Views
The problem that I am experiencing is that the subscription is successful even if i try to subscribe once more it will say that i am already subscribed, but if i try to cancel it, in my sandbox account there is no subscriptions. Not sure it is related but the other issue that i am experiencing is that the webhook is not called
Posted
by
Post not yet marked as solved
1 Replies
483 Views
I am planning to use the Get Notification History API to receive refund notifications for consumable in-app purchases. In order to receive notification data from this API, do I need to set up an HTTPS URL in App Store Connect to receive App Store Server Notifications?
Posted
by
Post not yet marked as solved
0 Replies
400 Views
I am trying to understand the correct flow for a mobile app/server app - auto-renewable subscriptions. Since verifyReceipt has been marked as deprecated, I am struggling with how I should link an App Store Server Notification v2 message with a user in the database. Currently, the process is as follows: First, the mobile application calls our server with receipt-data. Second, the server calls verifyReceipt to validate the receipt. Then, I am able to match the user's subscription/transaction with their data (using an internal JWT with user data from the first step and originalTransactionId from decoded verifyReceipt response). If we omit the first step, how would I determine who should receive the App Store Server Notification v2 message?
Posted
by
Post not yet marked as solved
0 Replies
537 Views
Hello everyone! I have some doubts on the use cases and triggers related to the REFUND_REVERSED notification type. I would like to better understand which real customer actions example would trigger this notification to be sent. Does the developer gets back the amount refunded to the user? Quoting the documentation: If your app revoked content or services as a result of the related refund, it needs to reinstate them. This applies only to a REFUND_REVERSED associated to a REFUND of the latest possible renewal right? Since we receive REFUND_REVERSED also several weeks after the REFUND and so for long expired subscriptions. We don't have to get access again to the user in the latter case, do we? Thank you very much to whoever will take time to answer!
Posted
by
Post not yet marked as solved
1 Replies
412 Views
I have a non-renewable subscription set up in my app and I also have App Store Server Notifications enabled, with URLs for both the production server and the sandbox server to receive version 2 notifications. I can simulate payment subscription in my app with sandbox tester, however I am not getting any notification from the app store server. Is there anything else I need to configure?
Posted
by
Post marked as solved
4 Replies
931 Views
My app is develop using react native and i use react-native-iap package for ios IAP. I have 1 non-consumable IAP products, and i need to receive callback from Apple Server to Our Server, but it still didn't coming yet, how i supposed to check this? I have already setup the url on Sandbox Server URL, and have already successfully send the notification test using https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test the response from notification test is below: { "testNotificationToken": "19d-8f54-41cd-84cf-e9265df_16***4897" } ASAP, Thankyou
Posted
by
Post not yet marked as solved
0 Replies
631 Views
Based on this site https://support.apple.com/en-us/HT202039 the subscription can be cancelled & re-subscribe by user on iPhone devices. I'm asking for the payment lifecycle included with subscription status when subscription is canceled, re-subscribe, or subscription is EXPIRED. Please explain billing lifecycle to our bank account based on subscription status. Thankyou.
Posted
by
Post marked as solved
3 Replies
596 Views
I have been experiencing with my app's subscription renewal process. When a user successfully renews their subscription, the App Store sends an event to my backend server. However, in some cases, the backend server is receiving an event that says the renewal failed, even though the user's subscription was successfully renewed. I have been working on this bug for several days and I have not been able to find a solution. I would appreciate any help that you can provide.
Posted
by
Post not yet marked as solved
1 Replies
364 Views
We are attempting to monitor subscription events via App Store Server Notifications. The URL we have configured (with v1 or v2) continually gets invoked with GET requests instead of POST requests, we do not get any POST with request data at all and cannot process subscription changes. Why might this be happening? What could we have misconfigured? configuration: requests:
Posted
by
Post not yet marked as solved
0 Replies
360 Views
Cause in sandbox env I notice a receipt like this { "environment": "Sandbox", "unified_receipt": { "status": 0, "environment": "Sandbox", "latest_receipt_info": [ { "quantity": "1", "product_id": "3monthplan", "expires_date": "2023-07-25 04:50:29 Etc/GMT", "purchase_date": "2023-07-25 04:41:29 Etc/GMT", "transaction_id": "2000000375156349", "expires_date_ms": "1690260629000", "is_trial_period": "false", "expires_date_pst": "2023-07-24 21:50:29 America/Los_Angeles", "purchase_date_ms": "1690260089000", "purchase_date_pst": "2023-07-24 21:41:29 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-07-25 03:20:41 Etc/GMT", "web_order_line_item_id": "2000000032603282", "original_transaction_id": "2000000375122102", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1690255241000", "original_purchase_date_pst": "2023-07-24 20:20:41 America/Los_Angeles", "subscription_group_identifier": "20572434" }, .... { "quantity": "1", "product_id": "3monthplan", "expires_date": "2023-07-25 04:03:49 Etc/GMT", "purchase_date": "2023-07-25 03:54:49 Etc/GMT", "transaction_id": "2000000375136003", "expires_date_ms": "1690257829000", "is_trial_period": "false", "expires_date_pst": "2023-07-24 21:03:49 America/Los_Angeles", "purchase_date_ms": "1690257289000", "purchase_date_pst": "2023-07-24 20:54:49 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-07-25 03:20:41 Etc/GMT", "web_order_line_item_id": "2000000032600544", "original_transaction_id": "2000000375122102", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1690255241000", "original_purchase_date_pst": "2023-07-24 20:20:41 America/Los_Angeles", "subscription_group_identifier": "20572434" }, { "quantity": "1", "product_id": "monthlyplan", "expires_date": "2023-07-25 03:38:37 Etc/GMT", "purchase_date": "2023-07-25 03:35:37 Etc/GMT", "transaction_id": "2000000375127458", "expires_date_ms": "1690256317000", "is_trial_period": "false", "expires_date_pst": "2023-07-24 20:38:37 America/Los_Angeles", "purchase_date_ms": "1690256137000", "cancellation_date": "2023-07-25 04:38:50 Etc/GMT", "purchase_date_pst": "2023-07-24 20:35:37 America/Los_Angeles", "cancellation_reason": "0", "cancellation_date_ms": "1690259930000", "cancellation_date_pst": "2023-07-24 21:38:50 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-07-25 03:20:41 Etc/GMT", "web_order_line_item_id": "2000000032600434", "original_transaction_id": "2000000375122102", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1690255241000", "original_purchase_date_pst": "2023-07-24 20:20:41 America/Los_Angeles", "subscription_group_identifier": "20572434" }, ... ] }, "auto_renew_status": "false", "cancellation_date": "2023-07-25 04:38:50 Etc/GMT", "notification_type": "CANCEL", "cancellation_date_ms": "1690259930000", "auto_renew_product_id": "3monthplan", "cancellation_date_pst": "2023-07-24 21:38:50 America/Los_Angeles", "web_order_line_item_id": "2000000032600434", "original_transaction_id": 2000000375122102 } plan is keeping renew. What if I refund in prod env, and after refund agree, is that my subscription would auto turn off?
Posted
by
Post not yet marked as solved
0 Replies
348 Views
I'm testing subscription IAP app store server notifications. In the case of subscription payment, when the user cancels the subscription, you can check through the server notification. However, if the cancellation is made before the expiration of the subscription period, can we receive server notifications even when the subscription expires?
Posted
by
Post not yet marked as solved
3 Replies
380 Views
Hello I want to know about App Store server notification type after subscription started with offer code, question is when someone starts a subscription with an offer code, only type OFFER_REDEEMED[subtype INITIAL_BUY] is send to server? or both type OFFER_REDEEMED[subtype INITIAL_BUY] and type SUBSCRIBED[subtype INITIAL_BUY] are send to server?
Posted
by
Post not yet marked as solved
0 Replies
527 Views
Hello I've problem with transaction payload. If I receive POST App Store notification v2 to my server. In the decoded transaction body is missing appAccountToken field. In the iOS app I've just set token like this: let result = try await product.purchase(options: [ .appAccountToken(UUID.encodeIntAsUUID(Auth.shared.user.idUser)), .simulatesAskToBuyInSandbox(true) ]) Where is the problem?
Posted
by
Post not yet marked as solved
1 Replies
818 Views
Hi, we have an auto-renewable subscription with an introductory offer configured. The introductory offer is a 7 days free trial. We're observing a possibly wrong behavior and we wanted to make sure we're not missing anything. We suspect that our server is not receiving notifications from the App Store when the free trial period starts, we only receive notifications when the user starts paying. To double-check, we've tested the same subscription in sandbox with a brand new test account with a 3 minutes renewal frequency: the behavior is exactly the same, we only get 1 notification every 3 minutes for the renewals, we get no notification when the free trial starts. So we have 2 main questions: does "free trial" work in sandbox too? If so, what's the duration of free trial in sandbox if it's set to 7 days in production? do we get a notification when the free trial period starts or we only get one when and if the user starts paying after 7 days? Thanks
Posted
by
Post not yet marked as solved
1 Replies
399 Views
Hi, We are using V2 App Store Server Notifications but can't figure out where to get the following subscription info: the price of the subscription (can't find anywhere) billing period duration e.g. "P1M" for monthly subscription Google Play billing has these properties so we expect that these properties also exist in the app store.
Posted
by
Post not yet marked as solved
1 Replies
806 Views
I have found such information on documentation: Upgrade. Someone purchases a subscription that offers a higher level of service than their current subscription. They’re immediately upgraded and receive a refund of the prorated amount of their original subscription. If you’d like people to immediately access more content or features, rank the subscription higher to make it an upgrade. Also, To identify whether a subscription has been refunded, look for the cancellation_date field in the receipt. However, when looking at users that has upgraded subscriptions, where we get "is_upgraded": "true" There is no cancellation_date field, so the question is, has these users been refunded? If so, how do we calculate partial refunds without the date?
Posted
by
Post not yet marked as solved
3 Replies
563 Views
I'm trying to implement an IAP subscripton and I am not receiving DID_RENEW/EXPIRED webhook calls. Looking through previous forum posts this may just be breaking randomly, is there something currently broken or is there likely some setup I'm missing? Note: I'm using ngrok to test this locally, and I successfully get the initial subscription and DID_CHANGE_RENEWAL_STATUS events.
Posted
by
Post not yet marked as solved
1 Replies
600 Views
We are implementing IAP in our React-Native app, currently only on IOS, specifically subscriptions. We have configured the Sandbox Server URL to an endpoint on our Dev server, and the Production Server URL to an endpoint on our Production server. In addition, we are using the Apple App Store Server Node.js Library on our Backend to verify receipts, getting transactions history, etc. We are using the Sandbox environment on our Dev backend, and the Production environment on our Production backend. We are not sure if that is the correct setup, although that is what we understood from multiple sources. While testing with TestFlight, with production apple accounts, we were expecting to receive the server notifications on our Production server, but they were all were received on our Development server (Sandbox endpoint). Is that the correct behavior or are we missing something? We figured the Sandbox endpoint was for testing purposes and because of that should be on our Development backend while we develop.
Posted
by
Post not yet marked as solved
0 Replies
444 Views
On my production application, renewalInfo.expirationIntent and renewalInfo.offerType is missing on notification data. On this examples, the signedRenewalInfo is decoded and set as renewalInfo and the signedTransactionInfo is decoded and set as transactionInfo. Example 1 It is expiration notification. However, renewalInfo.expirationIntent does not exists { "notificationType": "EXPIRED", "subtype": "VOLUNTARY", "notificationUUID": "REDACTED", "data": { "appAppleId": 123456789, "bundleId": "REDACTED", "bundleVersion": "16", "environment": "Production", "status": 2, "transactionInfo": { "transactionId": "REDACTED", "originalTransactionId": "REDACTED", "webOrderLineItemId": "REDACTED", "bundleId": "REDACTED", "productId": "REDACTED", "subscriptionGroupIdentifier": "REDACTED", "purchaseDate": 1693220511000, "originalPurchaseDate": 1693220512000, "expiresDate": 1693479711000, "quantity": 1, "type": "Auto-Renewable Subscription", "appAccountToken": "REDACTED", "inAppOwnershipType": "PURCHASED", "signedDate": 1693479743547, "offerType": 1, "environment": "Production", "transactionReason": "PURCHASE", "storefront": "PHL", "storefrontId": "143474" }, "renewalInfo": { "originalTransactionId": "REDACTED", "autoRenewProductId": "REDACTED", "productId": "REDACTED", "autoRenewStatus": 0, "isInBillingRetryPeriod": false, "signedDate": 1693479743547, "environment": "Production", "recentSubscriptionStartDate": 1693220511000, "renewalDate": 1693479711000 } }, "version": "2.0", "signedDate": 1693479743603 } Example 2 It is an initial buy subscription notification. transactionInfo.offerType is 1, however there is no renewalInfo.offerType. { "notificationType": "SUBSCRIBED", "subtype": "INITIAL_BUY", "notificationUUID": "REDACTED", "data": { "appAppleId": 123456789, "bundleId": "REDACTED", "bundleVersion": "16", "environment": "Production", "status": 1, "transactionInfo": { "transactionId": "REDACTED", "originalTransactionId": "REDACTED", "webOrderLineItemId": "REDACTED", "bundleId": "REDACTED", "productId": "REDACTED", "subscriptionGroupIdentifier": "REDACTED", "purchaseDate": 1693475274000, "originalPurchaseDate": 1693475276000, "expiresDate": 1725097674000, "quantity": 1, "type": "Auto-Renewable Subscription", "appAccountToken": "REDACTED", "inAppOwnershipType": "PURCHASED", "signedDate": 1693475283052, "offerType": 1, "environment": "Production", "transactionReason": "PURCHASE", "storefront": "ESP", "storefrontId": "143454" }, "renewalInfo": { "originalTransactionId": "REDACTED", "autoRenewProductId": "REDACTED", "productId": "REDACTED", "autoRenewStatus": 1, "signedDate": 1693475283052, "environment": "Production", "recentSubscriptionStartDate": 1693475274000, "renewalDate": 1725097674000 } }, "version": "2.0", "signedDate": 1693475283075 }
Posted
by