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
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
Hi,
I have an app in app store with subscription feature available. IAP works perfectly fine and I have no issues till data.
One of my user has reached out to me with an issue, they are claiming to have an IAP subscription made. User also send me a screen shot with the active subscription they have (Settings --> Account --> Subscriptions). My App is there (Screen Shot attached, Next Billing Date: May 05 2022). But in my server, i only find the transaction error below. User did try to restore purchase, but it did not work. I am sure restore transaction works, as other users have used it recently and works fine. Can anyone let me know why the transaction for this user is not fetched and what this error means.
Error Domain=SKErrorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x283ef5c80 {Error Domain=ASDErrorDomain Code=907 "Unhandled exception" UserInfo={NSUnderlyingError=0x283efa3d0 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed, NSLocalizedFailureReason=Payment sheet cancelled}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}
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
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
Hi,
We are working on handling refunds for one time products on apple devices.
In our scenario, we have two purchased products and we start refunding them, refund for item 1, then refund for item 2( in an interval of 2-3 minutes). We expect to get two apple receipts, first receipt containing both products, one active(item2) and one refunded(item1, cancellation properties set). The second receipt containing both products, both being refunded(having the cancellation_date_* properties set).
This is not happening, we get the 2 receipts, both containing the same data about the refunded products, so both receipts have the cancellation dates set for both products.
Is this a normal behavior?
Should we assume that the processing of the refunds and sending out the notifications/receipts happens async, resulting in having both refunds already processed in the moment when the receipts/messages are sent out?
Thanks,
David
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.
Post not yet marked as solved
I want to use the original_application_version value from the app receipt to grandfather some features for users who are first-time users vs existing users. In the Receipt Validation Programming Guide, the field's notes are as follows:
This corresponds to the value of CFBundleVersion (in iOS) or CFBundleShortVersionString (in macOS) in the Info.plist file when the purchase was originally made.
In the sandbox environment, the value of this field is always “1.0”.
I'm unsure which value to expect in Mac Catalyst, since it's a UIKit (and thus iOS)-based app being distributed through the Mac App Store and run on a Mac. My instinct is that the store is determinative, and thus to expect the macOS CFBundleShortVersionString on the Mac. Unfortunately, since the value is always "1.0" in the sandbox (including TestFlight) I don't have a good way to test this.
Does anyone have any real-world experience that can shed light on what format I can expect?
Post not yet marked as solved
I created one product in appstoreconnect and am testing in sandbox mode
Purchase auto renewal product A . Original transaction id is 12345
renews few times and expires
After 3 days , purchase same product A . Again the original transaction id received from receipt is 12345 .
Is this expected behaviour? . If yes how to differentiate between old and new purchase?
Post not yet marked as solved
I want to reconcile with my own local data based on Apple's official billing information, so I want to query all the receipt data for a day.
Post not yet marked as solved
The receipt I receive from the Api for an annual subscription does not contain "expires_date" value, where as a receipt for a monthly subscription does return the value. Both subscriptions are of type "auto-renewable". Why is this the case, when all subscriptions can contain an expiration/renewal date.
I'm switching my business model to freemium and now I need a clean way to keep giving access to all features for my existing userbase.
I know I probably should do something with receipt validation but which receipt do I check and is there a very clean and straightforward way of doing this with StoreKit 2 maybe?
I would have loved to see something like:
AppStore.originalPurchaseDate property in StoreKit 2 but would love to hear some thoughts and input!
We're having problems with the Sandbox Server URL for the App Store Server Notifications. Unfortunately, we're not getting any callbacks from Apple Server while making in app purchase.
We examined the URL endpoint and verified that it complies with Apple's guidelines, as well as appropriately configuring it.
Ref. https://help.apple.com/app-store-connect/#/dev0067a330b
Hi everyone. I recently submitted one of my Unity games for App Review today and it got rejected. The rejection was related to an In-App Purchase issue in iOS 15.3 (which, at the time of writing, is the latest version). Their response is below:
We found that your in-app purchase products exhibited one or more bugs when reviewed on iPhone running iOS 15.3 on Wi-Fi.
--Next Steps--
When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.
A couple things to note. I'm not even using server-side validation for my IAPs. For this particular game, I'm using local validation. My IAPs also worked in the sandbox environment. Both the test builds and production builds are running identical code. Any ideas on what could be causing this?