App Store Server API

RSS for tag

Call this REST API from your server to request and provide information about your customers' in-app purchases.

App Store Server API

Posts under App Store Server API tag

83 Posts
Sort by:
Post not yet marked as solved
2 Replies
139 Views
Hello everyone. I'm try to get out of verifyReceipt endpoint by following this link https://developer.apple.com/videos/play/wwdc2023/10143/ at the end of video so after using ReceiptUtility extract receipt data to get transationId then using getTransactionHistory to do what? it doesn't clear in the video. Where I can get document on how to verify receipt with AppStoreServerAPI.
Posted
by hungkodak.
Last updated
.
Post not yet marked as solved
0 Replies
123 Views
Apple automatically refunds the prorated amount on the original subscription after it is upgraded. Since upgrades happen immediately and start a new billing cycle beginning from the day of upgrade, the previous original subscription is refunded for the prorated amount. Is there any way to retrieve the amount that was refunded by Apple? The transaction that was upgraded is marked with isUpgraded flag to true but the price field on it still shows the full amount and there is no App Store Server Notification that tells us how much was the refund. How do I get the refunded amount?
Posted
by kalehv.
Last updated
.
Post not yet marked as solved
1 Replies
162 Views
Hello everyone. I'm try to get out of verifyReceipt for my app. I'm try to following this link https://developer.apple.com/videos/play/wwdc2023/10143/ Then I'm testing by using old receipt from my app. Using receiptUtility.extractTransactionIdFromAppReceipt(appReceipt); I got this transaction Id 160000542059454. Then follow the step in the video to get all transaction history I realize that it missing transaction which have productype as consumable. If I'm using getTransactionInfo an pass that Id I can fetch the info of that transaction. So my question is how to get all transaction Id history.
Posted
by hungkodak.
Last updated
.
Post not yet marked as solved
1 Replies
141 Views
Hi, For a user who subscribed a product via In-App Purchase, how does the application backend know that the user is still subscribed? The initial purchase happens on the mobile app. Via receiving and validating the receipt of initial purchase, the backend of mobile app would be informed. However, what is the appropriate option for the subsequent subscription payments? How do I know whether the user is still paying? Thanks.
Posted
by selbe.
Last updated
.
Post not yet marked as solved
0 Replies
178 Views
There is the bundleVersion exist in this document, and for the notificationType CONSUMPTION_REQUEST, the payload what we always received contains the bundleVersion, but today we receive one CONSUMPTION_REQUEST request payload without the bundleVersion. So we wanna know what means of bundleVersion? Is that always exist? when does it not exist?(for both notification type) Thanks in advance
Posted
by fpei.
Last updated
.
Post not yet marked as solved
0 Replies
160 Views
Hello. How can I get transaction information when a payment request is submitted to the app store server
Posted
by ThanhDam.
Last updated
.
Post not yet marked as solved
1 Replies
197 Views
I received a version 1 server notification. auto_renew_status is true and another pending_renewal_info.auto_renew_status is 0. So did the user turn the subscription on or off? What does this mean and which field I should use to identify user action? Could anyone help me with that? The contents are as follows: { "environment": "PROD", "unified_receipt": { "status": 0, "environment": "Production", "latest_receipt_info": [ { "quantity": "1", "product_id": "com.protect.adpatrol.weekly2", "expires_date": "2023-03-19 18:12:56 Etc/GMT", "purchase_date": "2023-03-12 18:12:56 Etc/GMT", "transaction_id": "700001139057782", "expires_date_ms": "1679249576000", "is_trial_period": "false", "expires_date_pst": "2023-03-19 11:12:56 America/Los_Angeles", "purchase_date_ms": "1678644776000", "purchase_date_pst": "2023-03-12 11:12:56 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-02-28 06:18:59 Etc/GMT", "web_order_line_item_id": "700000519235393", "original_transaction_id": "700001128802427", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1677565139000", "original_purchase_date_pst": "2023-02-27 22:18:59 America/Los_Angeles", "subscription_group_identifier": "20900376" }, { "quantity": "1", "product_id": "com.protect.adpatrol.weekly2", "expires_date": "2023-03-03 06:18:57 Etc/GMT", "purchase_date": "2023-02-28 06:18:57 Etc/GMT", "transaction_id": "700001128802427", "expires_date_ms": "1677824337000", "is_trial_period": "true", "expires_date_pst": "2023-03-02 22:18:57 America/Los_Angeles", "purchase_date_ms": "1677565137000", "purchase_date_pst": "2023-02-27 22:18:57 America/Los_Angeles", "in_app_ownership_type": "PURCHASED", "original_purchase_date": "2023-02-28 06:18:59 Etc/GMT", "web_order_line_item_id": "700000519235392", "original_transaction_id": "700001128802427", "is_in_intro_offer_period": "false", "original_purchase_date_ms": "1677565139000", "original_purchase_date_pst": "2023-02-27 22:18:59 America/Los_Angeles", "subscription_group_identifier": "20900376" } ], "pending_renewal_info": [ { "product_id": "com.protect.adpatrol.weekly2", "auto_renew_status": "0", "auto_renew_product_id": "com.protect.adpatrol.weekly2", "original_transaction_id": "700001128802427" } ] }, "auto_renew_status": "true", "notification_type": "DID_CHANGE_RENEWAL_STATUS", "auto_renew_product_id": "com.protect.adpatrol.weekly2", "original_transaction_id": 700001128802427, "auto_renew_status_change_date": "2023-03-12 18:12:58 Etc/GMT", "auto_renew_status_change_date_ms": "1678644778000", "auto_renew_status_change_date_pst": "2023-03-12 11:12:58 America/Los_Angeles" }
Posted
by chasel_h.
Last updated
.
Post not yet marked as solved
0 Replies
144 Views
Our service has an IOS and Android app and a backend server. I have a question about handling refunds for simultaneous payments on Android and IOS. Is there any way to cancel and refund the IOS subscription payment in the backend when Google is paid first and IOS is paid almost simultaneously? For Android, unlike IOS IAP, the backend server can confirm the purchase with a purchase confirmation (ack), so even if IOS is paid first at almost the same time, it is possible to cancel it by checking the payment data in the backend and not sending an ack to Google's server if the IOS payment is already made.
Posted
by hoomin.
Last updated
.
Post not yet marked as solved
0 Replies
202 Views
For V1 used for internal purchase verification, when will the exclusive shared key regenerated after transfer be replaced? Will it affect in-app purchases and subscriptions by online users? The V2 used for internal purchase verification uses the key ID instead of the dedicated shared key. In this case, what should we pay attention to before and after the transfer? Do I need to regenerate the key ID for the new account? Is the private shared key still useful? Do I need to generate a dedicated shared key again in the transferred App? What will be the impact on existing subscriptions after the transfer? What do I need to do with the current existing subscriptions? We have used universalLink, do we need to add a new TeamId to the apple-app-site-assn. txt file? { "applinks": { "apps": [], "details": [ { "appID": “TeamIdA.com.***.***”, "paths": [""] }, { "appID": “TeamIdB.com.***.***”, "paths": [""] } ] } } We have stored the login information in Keychain Sharing, is there no way to get the original stored information after transfer? Is there a reasonable solution?
Posted
by ChunXiao.
Last updated
.
Post not yet marked as solved
0 Replies
221 Views
We received a notification DID_FAIL_TO_RENEW(subtype:(Empty)) from App Store when the subscription failed to renew because of a billing issue. After this case, we predict that we will receive the notifications based on the following two cases. If the user resolves a billing issue: Receives notification DID_RENEW(subtype:(BILLING_RECOVERY)) If the user does not resolve the billing issue and cancels the subscription: Receives notification EXPIRED(subtype:BILLING_RETRY) Based on the above, I would like to ask two questions Are the above two cases and the notification types we expected correct? If wrong, please tell me what is wrong. If there are other than the above two cases, please tell me the case and notification type.
Posted
by hiro-yuki.
Last updated
.
Post not yet marked as solved
1 Replies
277 Views
Hello, I'm inquiring in regard to information on handling user's subscriptions, specifically if it's possible to cancel a subscription with a line of code. For example: if condition { // cancel user's subscription } I'm not familiar with the App Store Server API yet, but I glanced at the documentation and I didn't see any information in regard to the question I have. That being said, I'm also wondering where to start with configuring a subscription model for my app. Any insights would be greatly appreciated. Thank you.
Posted Last updated
.
Post not yet marked as solved
0 Replies
278 Views
Is there a Apple store API that can list all the in-app subscriptions (active, expired, cancelled, charged-back etc) for an app? I can see a developer API listed here - https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history using which I can only retrieve data for a single user. I am not looking for purchases by a single user but as an finance admin I want a list of all subscription purchases (active, expired, cancelled, charged-back) for a time period range that I pass as input parameters so I can generate accrued/deferred revenue report for my company. Is there a way? Please assist.
Posted
by kbvivek.
Last updated
.
Post not yet marked as solved
4 Replies
1.4k Views
Hello! Please let me know after I make a request for purchase information GET https://api.storekit-sandbox.itunes.apple.com/inApps/v1/transactions/2000000411047647 I receive encrypted information in this format { "signedTransactionInfo":"eyJhbGciOiJFUzI1NiIsIng1YyI6WyJNSUlFTURDQ0E3YWdBd0lCQWdJUWZUbGZkMGZOdkZXdnpDMVlJQU5zWGpBS0JnZ3Foa2pPUFFRREF6QjFNVVF3UWdZRFZRUURERHRCY0hCc1pTQlhiM0pzWkhkcFpHVWdSR1YyWld4dmNHVnlJRkpsYkdGMGFXOXVjeUJEWlhKMGFXWnBZMkYwYVc5dUlFRjFkR2h2Y21sMGVURUxNQWtHQTFVRUN3d0NSell4RXpBUkJnTlZCQW9NQ2tGd2NHeGxJRWx1WXk0eEN6QUpCZ05W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NOWVVZNVlBakFQWG1NWEVaTCtRMDJhZHJtbXNoTnh6M05uS20rb3VRd1U3dkJUbjBMdmxNN3ZwczJZc2xWVGFtUllMNGFTczVrPSIsIk1JSURGakNDQXB5Z0F3SUJBZ0lVSXNHaFJ3cDBjMm52VTRZU3ljYWZQVGp6Yk5jd0NnWUlLb1pJemowRUF3TXdaekViTUJrR0ExVRWUVFERER0QmNIQnNaU0JYYjNKc1pIZHBaR1VnUkdWMlpXeHZjR1Z5SUZKbGJHRj000OUJBTURBMmdBTUdVQ01RQ0Q2Y0hFRmw0YVhUUVkyZTN2OUd3T0FFWkx1***5UmhIRkQvM21lb3locG12T3dnUFVuUFdUeG5TNGF0K3FJeFVDTUcxbWloREsxQ" } Please tell me how I can decode the information signedTransactionInfo ? and what is needed for this? (I'm trying to decode on Node.js)
Posted Last updated
.
Post not yet marked as solved
2 Replies
335 Views
Hello, One of our customer's purchases of IAP consumable product have issue on its receipt verification. Verification via "https://buy.itunes.apple.com/verifyReceipt" returns {"environment": "Production", "status": 21004}. He purchased 3 consumable items and only verification of 3rd purchase successfully got verified. All of other purchases in our app before and after had no problem with same secret, same server. I once heard 21004 is for auto renewable subscription, not for consumable. Can it be returned for consumable purchase? Is there any other known issue for receipt verification? We have no change of code, server, secret at that time and all other verification succeeded but two failed. Thanks in advance. Regards,
Posted
by Tak19.
Last updated
.
Post not yet marked as solved
0 Replies
479 Views
I'm using the API to update and create in-app purchases. Up until now, the https://api.appstoreconnect.apple.com/v2/inAppPurchases endpoint would allow me to set the availableInAllTerritories attribute to true, but as of this week the API is returning this error: ENTITY_ERROR.ATTRIBUTE.UNKNOWN - 'availableInAllTerritories' is not an attribute on the resource 'inAppPurchases' It appears availableInAllTerritories has been removed from the class definition, but not the sample code. The 3.2 release notes state that the enum "is no longer available for pricing related endpoints", but this isn't a pricing endpoint. Anyone else having this issue? I guess the only workaround would be to send a separate request to the inAppPurchaseAvailabilities endpoint.
Posted
by salinsley.
Last updated
.
Post not yet marked as solved
0 Replies
259 Views
We are trying to upgrade our server API from verifyReceipt to new app store server API. According to apple API document (https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history), Get Transaction History API returns consumable in-app purchases if the app hasn’t finished processing the transaction. However, we cannot find any consumable purchases in the response even if we request the API before client finish the transaction. At the same time (before client finish the transaction), verifyReceipt API returns the consumable purchases. We check the API parameter and test it in both production environment and sandbox environment, but the problem still exists. Anyone has some idea? Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
0 Replies
361 Views
I intend to use Apple Store Connect API for making & updating OFFER CODES in my subscription. I have created the GET requests needed using an API Key I have generated but the POST requests are not going through and getting an error in the process. https://api.appstoreconnect.apple.com/v1/subscriptionOfferCodes This is the API that I am trying to hit using the POST request but the process is not going through for some reason.
Posted Last updated
.
Post marked as solved
2 Replies
384 Views
Hi, some day ago I got these webhook events for a subscription: 2024-01-06 10:40:47 SUBSCRIBED subtype INITIAL_BUY 2024-01-20 03:02:29 DID_RENEW subtype BILLING_RECOVERY 2024-01-20 03:52:08 DID_CHANGE_RENEWAL_STATUS subtype AUTO_RENEW_DISABLED 2024-01-20 10:41:03 DID_FAIL_TO_RENEW (no subtype was received) When I get the subscription status form appstore server API, status is 1 (active). We don't have grace period enabled in our app. I'm not sure how to interpret this result; from our perspective we should remove access to the user.
Posted
by nicolas1.
Last updated
.
Post not yet marked as solved
2 Replies
393 Views
I have an app in which there are two different subscription groups and One non-consumable product. User can have two(2) subscriptions and one non-consumable purchase [total three purchases] at a time. All three have different "originalTransactionIdentifier". How can i get user's purchase History in ONE App store server API request?
Posted
by israr786.
Last updated
.
Post not yet marked as solved
1 Replies
485 Views
in-app purchase: when client commit the purchase, client will send the purchase data to the server, server will get transaction to read the information but when i tested on sandbox, i get the transaction i got { errorCode: 4040010, errorMessage: 'Transaction id not found.' } give me some advice please.
Posted
by Fice.
Last updated
.