Post not yet marked as solved
Problem:
There is no filed in_app in the response i got
Some filed in the response.receipt but not in the offical document, such as receipt.product_id
I can not find any document of this kind of receipt response
The reponse i got when send the receipt data to https://sandbox.itunes.apple.com/verifyReceipt
{
"receipt": {
"original_purchase_date_pst": "2022-04-01 23:31:09 America/Los_Angeles",
"purchase_date_ms": "1648881069711",
"unique_identifier": "9d857ba071e9ae8b23521ad57c21b7ca39891ec6",
"original_transaction_id": "2000000024647285",
"bvrs": "1.6.72.7351",
"transaction_id": "2000000024647285",
"quantity": "1",
"in_app_ownership_type": "PURCHASED",
"unique_vendor_identifier": "619C650E-69B6-4BDC-BF63-FC023D23FAD3",
"item_id": "123455566",
"original_purchase_date": "2022-04-02 06:31:09 Etc/GMT",
"is_in_intro_offer_period": "false",
"product_id": "xx.***.xxxx",
"purchase_date": "2022-04-02 06:31:09 Etc/GMT",
"is_trial_period": "false",
"purchase_date_pst": "2022-04-01 23:31:09 America/Los_Angeles",
"bid": "***.***.***",
"original_purchase_date_ms": "1648881069711"
},
"status": 0
}
And the document of the response is in:
1.https://developer.apple.com/documentation/appstorereceipts/responsebody
2.https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt
Post not yet marked as solved
Recently I've transferred my app to a new account and while uploading a new build I got a message that says I'll lose access to Keychain.
I'm storing a user hash in Keychain and send this hash to the back-end side so they can say whether a user is premium or not.
Since I lose access to a Keychain all premium users become free users despite they have paid for the subscription which is very bad.
My app does not have a regular log-in with email so I can't ask users to "re-login".
By far the only option I see is asking users to make a "restore purchase" but I would like to make this update seamless. So I have these questions:
Do I lose all info in UserDefaults? (If not - can I transfer the app back and release an update that puts the user hash into UserDefaults then transfer the app again and read from UserDefaults instead of Keychain?)
Do I have an access to the old user’s receipt by calling Bundle.main.appStoreReceiptURL? If yes - I can send it to the server and the server may identify a user by using the receipt as a token then it can get an updated receipt from Apple, update user status in DB and notify a client that he/she is a premium user. Can I rely on such a flow?
Can I treat users that have a receipt in Bundle.main.appStoreReceiptURL as “old” users and those who don’t - as new users who installed the app only after the update?
Post not yet marked as solved
Here's the scenario–
App downloaded via TestFlight
appStoreReceiptURL is retrieved
Checks if there is a receipt at that URL
------> If NOT found–> a new request is via the following, and that's when the authentication dialog pops up, it is successful when sandbox account credentials are entered. Otherwise it fails
let request = SKReceiptRefreshRequest(receiptProperties: nil)
request.delegate = self
request.start()
My Question is (and I have no way to know this for sure), when app is in production, and downloaded from the App Store (Not TestFlight), would that also have the same authentication dialog pop? At this point I was assuming this authentication event is due to TestFligth and Sandbox Apple Account.
[mistakenly selected answered to the question asked earlier– hence re-asking]
Post not yet marked as solved
Hi, I currently have an app that has the following business model:
Upfront: Free
In-App: You can either subscribe monthly or pay a one-time-fee to unlock everything. Both via IAP.
I would like to move to a one-time-fee upfront via the normal App Store payment.
I am wondering what the best (and simplest way of doing so is). Please comment!
Options I see:
Make the app "paid"; remove all IAP from within the app.
Pros:
Easiest to implement.
Cons:
All people who downloaded the app for free before can now re-download for free and I don't see a dime.
What to do with existing subscribers? Can I "developer-cancel" their subscriptions somehow, so that they don't continue to pay? Alternatively, I could ask them do that themselves on App launch.
Make app "paid" but keep IAP for people who have downloaded for free.
This would require to to somehow get the "paid price" from the app receipt. Not sure if this is possible. Alternatively, I could check for the period of the first download (if possible).
Pros:
I don't lose money from the "I downloaded free before"-people.
Cons:
I need to maintain two payment systems + it will be potentially confusing because some people can IAP, others can't.
Move to a new app SKU for the paid-upfront version.
Pros:
New app would be clean.
Cons:
I'd like the people who unlocked the "one-time-unlock" IAP to download that new SKU for free. Is that possible? Probably not. So I'd charge them twice which I would like to avoid. Alternatively, I could somehow validate their IAP in app and ask them to contact me with some proof to provide them a free promo code for the new SKU. Not sure if this is allowed per App Store rules.
Any other ideas?
When issuing the app on TestFlight, and if the app requests the App Store Receipt - by calling appStoreReceiptURL.
I've only tested this on app issued via TestFlight, it works fine, but a dialog pops up asking the user to sign into an apple account.
Is the behavior the same when app is published and downloaded via App Store? (Real World)?
Post not yet marked as solved
Hi guys, i couldn't reach verifyReceipt API during 17min and I got 200+ error logs at that time.
Now it was cleared, but i wonder what caused the issue.
Could you check this?
My server is located at South Korea.
URL : https://buy.itunes.apple.com/verifyReceipt
Response : 502 Bad Gateway
occurrence time(KST) : 2022.04.12 22:37:50 ~ 22:54:03
occurrence time(UTC+0) : 2022.04.12 13:37:50 ~ 13:54:03
Thanks.
We are running a restaurant agency.
Creating mobile apps and websites for clients.
We would like to publish apps on my behalf restaurant clients.
What documents do I need to provide to publish apps on my behalf clients?
is a letter of authorization from the client accepted?
if not what else?
Post not yet marked as solved
Hi All
I am trying to verify for my site.
receipt was done by a subscriber , and we need to get the total and currency and origin so we may calculate tax and revenue for application the we maintain.
trying to verify receipt (using this api : https://buy.itunes.apple.com/verifyReceipt).
I do get many details about the subscription , but the specific fiscal data is missing : no total , no tax , no currency , no origin
can someone say if there is a way to get this values from receipt ?
and what is it ?
I am using this values :
{
"method": "post",
"url": "https://buy.itunes.apple.com/verifyReceipt",
"headers": {
"Accept": "application/json,application/a-gzip",
"Authorization": "Bearer + < token > ",
"encoding": "utf8"
},
"data": {
"method": "POST",
"url": "https://buy.itunes.apple.com/verifyReceipt",
"params": {
"password": "3301aXxxxx....xxxXXXX06980",
"exclude-old-transactions": false,
"receipt-data": "MIIVtgYJKoZIhvcNAQcCoIIVpzCCFaMCAQExCzAJBgUrDgMCGgXxxxxxx...xxxxxxxXAIBBQIBAQQUQkguVRLVu7Wi "
}
}
}
token is a Java Web Signature (JWS) token generated according to apple documentation
Post not yet marked as solved
Our company has a mobile application in Apple Store.
The app has in-app purchases and I would like to have invoices that customers who bought any service in the application.
In addition to that, while I was using App-Store Connect for Developers platform, there is %30, %42, %43 etc. cuts from the sales fee to the customer. If %30 cut is meant for Apple Store commission rate, I think other numbers which is higher than %30 have tax rates (is it true?). So, I would like also to have tax rates of countries if possible.
Last, I also want to see %30 cut of Apple’s commission in an invoice (or receipt, or any legal document). How to reach those files?
Thanks for the answers!
Post not yet marked as solved
Hello ,
We have requested for plan creation since long
But still it is showing Waiting for Review status,
Can you please let us know what is the reason why it is not still approved.
Kindly guide us what is the issue.
Post not yet marked as solved
How I can get price and currency from receipt IAP?
My server need information about price and currency user pay to package. But i can't find this in any REST API.
api verifyReceipt doesn't include this information.
Thank you.
Post not yet marked as solved
Does anyone know how IAPs and receipt validation is supposed to work when an iOS app is run on a new Arm Mac?
I have an iOS app which I'm pleased to discover runs well on my new Arm Mac mini. The app has non-consumable IAPs. At startup it parses the app receipt. A receipt is present, but my existing receipt validation code decides that it has the wrong hash. (This is with the app installed from the App Store, not a local build.)
I'm aware that receipt validation is different for native Mac apps, including catalyst apps (e.g. getting a device GUID from the ethernet MAC addresses etc.) But what is supposed to happen in the case of a regular iOS app running on macOS? Is this documented anywhere? Has anyone got IAPs working, with local receipt validation?
Post not yet marked as solved
I want to implement auto renewing subscription on the Apple Watch app with local receipt validation technique.
I have read when the user changes the clock, then the validation will fail.
Is that true or does someone has a solution to that without using an own server?
Best regards Tino
I've got an app for which I want to validate the Mac App Store receipt.
As I understand it, in case there is no receipt, the application should exit with exit code 173. That is what I implemented. Normally what should happen next is, that I am prompted for a sandbox username and password. These credentials are then used to get a new receipt from the App Store.
The problem is that I am not prompted for a username. The only thing that happens is that I get the following error:
“<AppName>” is damaged and can’t be opened. Delete “<AppName>” and download it again from the App Store.
The internet (and this forum too) has quite some instances of this problem. In some cases it is the macOS version that is to blame, in my case it probably is not, since I'm running on 12.2.1.
So after digging through the console, I found this line, that puzzles me:
default 21:05:16.537045+0100 appstoreagent AMSURLRequestEncoder: [C579757A] Encoding request for URL: https://sandbox.itunes.apple.com/commerce/device/addPushNotificationType {
account = <ACAccount: 0x7ff1c492c070 type = iTunesStore.sandbox | backingID = 22BFC0A5-D3E2-4412-8915-E7E5FFA8CE87 | username = jimi@smashbits.nl | altDSID = 001234-10-ff0bd4b9-72fc-4f56-8a98-032977bf5a37 | DSID = 840396218 | active = (null) | storefront = appstore.sandbox:143452-10,13>
mediaType = com.apple.AppleMediaServices.accountmediatype.appstore
}
What is of interest here is that a sandbox user is used, see the username = jimi@smashbits.nl part. The problem is that this user does not exist anymore.
Does anyone know how to reset the appstoreagent or any of the services involved in retrieving a receipt, so that I am prompted again for a username? I can then use a valid sandbox user and hopefully have a receipt generated to get to some actual programming.
Post not yet marked as solved
Hi,
We would like to submit a paid application (on the Mac App Store) and we would like to know if it would be possible to identify a unique user (not across apps but only for this app) via the receipt.
I've been thoroughly reading the Apple documentation to verify a receipt (https://developer.apple.com/documentation/AppStoreReceipts) and found that there is a field original_transaction_id that could serve for this purpose. There are two places where this field can be found, but both are indicated to be present only for in-app purchases.
The question in general is, is there any way to obtain a transaction_id or original_transaction_id from a paid app?
To be more specific on the fields we're looking at, on the verifyReceipt response:
responseBody.Latest_receipt_info.original_transaction_id: Latest_receipt_info should only include non-finished in-app transactions, would this include the app transaction itself?
responseBody.Receipt.In_app.original_transaction_id: the receipt should always be present, but it carries no transaction_id or anything similar, would the purchase of the app itself be included inside the In_app array (along all actual in-app purchases)?
Thank you for your time.
Post not yet marked as solved
I am using IAP in my app for non-consumable products.
I am facing the issue to verify the restored purchases of the user.
I understand the concept that when a user purchases something a unique appStoreReceiptURL is saved in the app bundle but it is there as long as the user does not un-install the app and I am also setting the status and the transaction id on the server. Now when the user has purchased something on one device and he has logged into some other device I can get the status from the server and show him the premium content, but what if the user has cancelled the subscription from his Apple ID not from the app? In this case the status key is still set true. I am restoring the purchases whenever the user log in the app but I cannot find a way to validate those purchases.
If anyone knows how to validate those?
Thanks in advance.
Post not yet marked as solved
I am changing platforms where I manage my in-app-purchases. The current company will not provide an export copy of my users data and purchase receipts so that I can import into my new platform.
Is there a way that I can get a copy of the users device, usernames or purchase receipts?
Post not yet marked as solved
Hi, We have auto renewable in app purchases in our application. As per the documentation we have configured Production & Sandbox URLs to receive V2 notifications. Also, created multiple sandbox test accounts to see if notifications can be received? Unfortunately not receiving any of the notifications as mentioned in the documentation to the configured URLs. If any one resolved this issue already, please comment.
My feedback ticket is FB9933934, please help me!
Thanks.
Post not yet marked as solved
When verifying the receipt, in the "pending_renewal_info" block,
"is_in_billing_retry_period" may be 0, but "expiration_intent" may not exist.
What does this situation represent?
Is it okay to decide that this purchase is invalid?
Thank you.
Post not yet marked as solved
Hello All,
Our app implements in app purchase as follows,
The App is free to download and sign up, some features are available if monthly subscription is valid.
We have implemented server side validation (app side validation is not present) so app will perform the in app purchase and forward the receipt, received from App Store, to the server.
This functionality worked so far but recently we noticed that the App Store is sending invalid/expired receipt to the app, which in turn gets forwarded to the server.
Upon checking the receipt data, server finds out the receipt is already expired and so server disables the paid features.
We are trying to figure out process to enable user to resubscribe to the paid feature through app.
Not sure if we missed something but the document we found so far, mentions to block the features or provide grace period to the users but we were not able to locate any document which explains process to enable users to resubscribes.
Any pointer will be helpful.
Validating Receipts:
https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/validating_receipts_with_the_app_store
Please let me know if you need any additional help. Thanks in advance.