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

103 Posts
Sort by:
Post marked as solved
1 Replies
777 Views
User's receipt information: { "environment": "Production", "receipt": { "receipt_type": "Production", "adam_id": xx, "app_item_id": xx, "bundle_id": "com.xxxxx", "application_version": "4.9.0", "download_id": xxxx, "version_external_identifier": xxxx, "receipt_creation_date": "2023-02-20 10:34:24 Etc/GMT", "receipt_creation_date_ms": "1676889264000", "receipt_creation_date_pst": "2023-02-20 02:34:24 America/Los_Angeles", "request_date": "2023-05-23 08:18:49 Etc/GMT", "request_date_ms": "1684829929749", "request_date_pst": "2023-05-23 01:18:49 America/Los_Angeles", "original_purchase_date": "2023-01-06 09:49:26 Etc/GMT", "original_purchase_date_ms": "1672998566000", "original_purchase_date_pst": "2023-01-06 01:49:26 America/Los_Angeles", "original_application_version": "4.9.0", "in_app": [ { "quantity": "1", "product_id": "com.***.xxxvip.year.autorenew", "transaction_id": "340001130126198", "original_transaction_id": "340001130126198", "purchase_date": "2023-02-20 10:34:22 Etc/GMT", "purchase_date_ms": "1676889262000", "purchase_date_pst": "2023-02-20 02:34:22 America/Los_Angeles", "original_purchase_date": "2023-02-20 10:34:24 Etc/GMT", "original_purchase_date_ms": "1676889264000", "original_purchase_date_pst": "2023-02-20 02:34:24 America/Los_Angeles", "expires_date": "2023-02-27 10:34:22 Etc/GMT", "expires_date_ms": "1677494062000", "expires_date_pst": "2023-02-27 02:34:22 America/Los_Angeles", "web_order_line_item_id": "340000522616394", "is_trial_period": "true", "is_in_intro_offer_period": "false", "in_app_ownership_type": "PURCHASED" } ] }, "latest_receipt_info": [ { "quantity": "1", "product_id": "com.***.xxxvip.year.autorenew", "transaction_id": "340001135819586", "original_transaction_id": "340001130126198", "purchase_date": "2023-02-27 10:34:22 Etc/GMT", "purchase_date_ms": "1677494062000", "purchase_date_pst": "2023-02-27 02:34:22 America/Los_Angeles", "original_purchase_date": "2023-02-20 10:34:24 Etc/GMT", "original_purchase_date_ms": "1676889264000", "original_purchase_date_pst": "2023-02-20 02:34:24 America/Los_Angeles", "expires_date": "2024-02-27 10:34:22 Etc/GMT", "expires_date_ms": "1709030062000", "expires_date_pst": "2024-02-27 02:34:22 America/Los_Angeles", "web_order_line_item_id": "340000522616395", "is_trial_period": "false", "is_in_intro_offer_period": "false", "in_app_ownership_type": "PURCHASED", "subscription_group_identifier": "20530539", "app_account_token": "a5axxxxxxxxx84e7e" }, { "quantity": "1", "product_id": "com.***.xxxvip.year.autorenew", "transaction_id": "340001130126198", "original_transaction_id": "340001130126198", "purchase_date": "2023-02-20 10:34:22 Etc/GMT", "purchase_date_ms": "1676889262000", "purchase_date_pst": "2023-02-20 02:34:22 America/Los_Angeles", "original_purchase_date": "2023-02-20 10:34:24 Etc/GMT", "original_purchase_date_ms": "1676889264000", "original_purchase_date_pst": "2023-02-20 02:34:24 America/Los_Angeles", "expires_date": "2023-02-27 10:34:22 Etc/GMT", "expires_date_ms": "1677494062000", "expires_date_pst": "2023-02-27 02:34:22 America/Los_Angeles", "web_order_line_item_id": "340000522616394", "is_trial_period": "true", "is_in_intro_offer_period": "false", "in_app_ownership_type": "PURCHASED", "subscription_group_identifier": "20530539", "app_account_token": "a5axxxxxxxx4e7e" } ], "latest_receipt": "xxxxxx", "pending_renewal_info": [ { "auto_renew_product_id": "com.***.xxxvip.year.autorenew", "product_id": "com.***.xxxvip.year.autorenew", "original_transaction_id": "340001130126198", "auto_renew_status": "1" } ], "status": 0 } We are still using App Store Server Notifications 1.0,We have received App Store Server notifications: { "unified_receipt": { "latest_receipt": "xxxxx", "pending_renewal_info": [ { "original_transaction_id": "340001130126198", "product_id": "com.***.xxxvip.year.autorenew", "auto_renew_status": "1", "auto_renew_product_id": "com.***.xxxvip.year.autorenew" } ], "environment": "Production", "status": 0, "latest_receipt_info": [ { "expires_date_pst": "2023-02-27 02:34:22 America/Los_Angeles", "purchase_date": "2023-02-20 10:34:22 Etc/GMT", "in_app_ownership_type": "PURCHASED", "purchase_date_ms": "1676889262000", "original_purchase_date_ms": "1676889264000", "app_account_token": "a5axxxxxx84e7e", "original_transaction_id": "340001130126198", "quantity": "1", "expires_date_ms": "1677494062000", "original_purchase_date_pst": "2023-02-20 02:34:24 America/Los_Angeles", "product_id": "com.***.xxxvip.year.autorenew", "subscription_group_identifier": "xxxxx", "transaction_id": "340001130126198", "web_order_line_item_id": "340000522616394", "expires_date": "2023-02-27 10:34:22 Etc/GMT", "is_in_intro_offer_period": "false", "original_purchase_date": "2023-02-20 10:34:24 Etc/GMT", "purchase_date_pst": "2023-02-20 02:34:22 America/Los_Angeles", "is_trial_period": "true" } ] }, "environment": "PROD", "auto_renew_status": "true", "bvrs": "4.9.0", "bid": "com.xxxxx", "original_transaction_id": 340001130126198, "auto_renew_product_id": "com.***.xxxvip.year.autorenew", "notification_type": "INITIAL_BUY" } We only received the initial purchase notification mentioned above. Why wasn't a notification sent for the successful renewal payment?
Posted
by
Post not yet marked as solved
11 Replies
1.3k Views
We have an App Store Server Notification V2 endpoint and we are testing our app subscription in sandbox environment. Here's the problem: when we receive JWS from sandbox, we found the payload of data.signedRenewalInfo filed is always null, including first buy, renew... When will signedRenewalInfo field contains any information? Greate appreciate!
Posted
by
Post not yet marked as solved
1 Replies
359 Views
I'm currently using App Store Server Notifications which is fine I have an endpoint and i am receiving data. I can see that in the message the originalTransactionId looks to be a unique Id based on a subscription for a user. My issue is if the App is uninstalled and then reinstalled with the same Apple Account, then they subscribe to the App this will give me a different originalTransactionId, which I need to be able to link this to the same user somehow? Is there way this can be done? I need some sort of global unique Id for a apple user which will be the same no matter if they uninstall and reinstall. thanks, James
Posted
by
Post not yet marked as solved
1 Replies
447 Views
Hello, We're working on an offer code implementation and we're now looking for some clarification around App Store server notifications. What notification type and subtype would we receive once a subscription that was started by using an offer code converts to using a real payment method? For example, someone starts a subscription with an offer code and we receive notification of the type OFFER_REDEEMED and subtype INITIAL_BUY. After that, it isn't very clear what type and subtype the notification would contain once the subscription converts.
Posted
by
Post not yet marked as solved
1 Replies
962 Views
We followed all step given in Docs but getting authenticate error for other apple account that I am using Below is details of error my command: curl -v -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNCQzczUjlEV0MifQ.eyJpc3MiOiI2OWE2ZGU4ZS1iNGZhLTQ3ZTMtZTA1My01YjhjN2MxMWE0ZDEiLCJhdWQiOiJhcHBzdG9yZWNvbm5lY3QtdjEiLCJpYXQiOjE2ODc4NDIwNjA4NDksImV4cCI6MTY4Nzg0NTY2MDg0OSwiYmlkIjoiY29tLm9uZmVyZW5jZS5vbmZlcmVuY2VhcHAifQ.W8_vaEPZoinC-80bBq-g3XLkohb_FSPzGN4a4YfqJ_V1UnmBmrtz2GtBPHhlQRB1VJ7NE3n3BNAWUMJrD5AuEA' "https://api.storekit.itunes.apple.com/inApps/v1/transactions/340001235870976" Error gettings Trying 17.56.138.9... TCP_NODELAY set Connected to api.storekit.itunes.apple.com (17.56.138.9) port 443 (#0) ALPN, offering h2 ALPN, offering http/1.1 successfully set certificate verify locations: CAfile: /etc/ssl/cert.pem CApath: none TLSv1.2 (OUT), TLS handshake, Client hello (1): TLSv1.2 (IN), TLS handshake, Server hello (2): TLSv1.2 (IN), TLS handshake, Certificate (11): TLSv1.2 (IN), TLS handshake, Server key exchange (12): TLSv1.2 (IN), TLS handshake, Server finished (14): TLSv1.2 (OUT), TLS handshake, Client key exchange (16): TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): TLSv1.2 (OUT), TLS handshake, Finished (20): TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): TLSv1.2 (IN), TLS handshake, Finished (20): SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 ALPN, server accepted to use h2 Server certificate: subject: businessCategory=Private Organization; jurisdictionCountryName=US; jurisdictionStateOrProvinceName=California; serialNumber=C0806592; C=US; ST=California; L=Cupertino; O=Apple Inc.; CN=commercegateway.itunes.apple.com start date: May 16 16:44:52 2023 GMT expire date: Nov 12 16:54:52 2023 GMT subjectAltName: host "api.storekit.itunes.apple.com" matched cert's "api.storekit.itunes.apple.com" issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 2 - G1 SSL certificate verify ok. Using HTTP2, server supports multi-use Connection state changed (HTTP/2 confirmed) Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 Using Stream ID: 1 (easy handle 0x7f9bed010800) GET /inApps/v1/transactions/340001235870976 HTTP/2 Host: api.storekit.itunes.apple.com User-Agent: curl/7.64.1 Accept: / Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNCQzczUjlEV0MifQ.eyJpc3MiOiI2OWE2ZGU4ZS1iNGZhLTQ3ZTMtZTA1My01YjhjN2MxMWE0ZDEiLCJhdWQiOiJhcHBzdG9yZWNvbm5lY3QtdjEiLCJpYXQiOjE2ODc4NDIwNjA4NDksImV4cCI6MTY4Nzg0NTY2MDg0OSwiYmlkIjoiY29tLm9uZmVyZW5jZS5vbmZlcmVuY2VhcHAifQ.W8_vaEPZoinC-80bBq-g3XLkohb_FSPzGN4a4YfqJ_V1UnmBmrtz2GtBPHhlQRB1VJ7NE3n3BNAWUMJrD5AuEA Connection state changed (MAX_CONCURRENT_STREAMS == 1024)! < HTTP/2 401 < server: daiquiri/3.0.0 < date: Tue, 27 Jun 2023 05:34:00 GMT < content-type: text/plain < strict-transport-security: max-age=31536000; includeSubDomains < x-apple-jingle-correlation-key: Z4AC6TLUWQRJHHYNLGGL5L2EZA < x-daiquiri-instance: daiquiri:15824002:mr85p00it-hyhk03174701:7987:23RELEASE91:daiquiri-amp-commerce-clients-ext-001-mr < Unauthenticated Request ID: Z4AC6TLUWQRJHHYNLGGL5L2EZA.0.0 Connection #0 to host api.storekit.itunes.apple.com left intact Closing connection 0
Posted
by
Post not yet marked as solved
1 Replies
350 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
469 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
394 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
513 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
406 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
905 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
621 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
586 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
355 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
352 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
339 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
373 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
513 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
781 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