In App Purchase Amount - App Store Connect API - in-app-purchase

My App is using in-app purchase to allow user to upgrade their account (using non-renewable subscription).
However, the price from the article itself (let say 10$) is not the actual price that will be send from Apple to my Bank account (because of the 10% commission fee).
I've been searching in the AppStore Connect API, but I don't find how to get the actual value for a single transaction ID.
Does anyone know how to get this information ?

Apple does not provide sales data on this granular level. The App Store Connect API only supports Finance, Sales and Trends reports: https://developer.apple.com/documentation/appstoreconnectapi/sales_and_finance_reports
The verifyReceipt API also does not provide any monetary information (https://developer.apple.com/documentation/appstorereceipts/verifyreceipt)
None of this data provides you with transaction-level data.

Related

How to get IAP country/state code (in order to know the VAT rate)?

In order to calculate fair prices for paid app content, if the customer takes an auto-renewal subscription to access application content via In-App Purchases (IAP), we need to know the VAT rate that applies to the particular IAP transaction.
As far as I know, an app can only find the currency of the user's Apple ID, using IAP APIs.
Is there a way to get to the country/state code, from transaction info (i.e transaction_id or original_transaction_id) on either (app- or server-side) or iOS APIs?

App Store Server Notifications: How to get a price of a transaction?

I want to create statistics based on the price a subscription was purchased with or renewed with. I don't see such field anywhere in the App Store Server Notifications api.
Can somebody advise on what to do?
You are not able to get the price of a transaction with App Store Server Notifications or via the the JSON data returned in the response from the App Store.
What you can do is get the ID of the transaction and look for it in the Sales & Trends dashboard. The easiest way to create statistics for your app is likely to have a separate database that stores transactions sent via your application through custom POST methods. What you're trying to do is not what the App Store Server Notifications API was built for, so you will run into problems. Specifically, their documentation says "Use the data in the notifications to update your user-account database, and to monitor and respond to in-app purchase refunds." Thus; this API was built for sales and customer support, not statistics and trends.

Correlate an In-app purchase with the Financial report in IOS

I am working with the Inapp purchases in my current app. After successfull purchase i save the "receipt" of the product on my server. I am aware about the "Financial Reports" provided on iTunes Connect at monthly intervals. Now my question is what should i have to do to validate a particular transaction with the Financial report provided by apple. I see some sample Financial reports but couldn't find any such parameter which give the transaction Id or any other unique field.
Also, if there is any way of attaching some payload during the Payment request and get that payload back in the receipt and the Financial report?. This might solve the problem from me.
Correlate an Inapp transaction with the Financial report
#Hotwheels - did you find any way to do it ? i have similar requirement

How to know the exact amount I'll receive from Apple In-App Purchase

I'm selling products inside my app, that unlock items on my server. Once the purchase is through, my server needs to distribute the incoming money of the purchase to different parties.
The account that I entered on iTunes connect is a EUR account, so everything will be converted to EUR (from what I've understood).
Is there a way for me to know the exact amount I'll receive into my bank account (from the receipt for example), so I can distribute the money correctly, or does Apple simply do a currency conversion at the time of the payment?
Apple does a currency conversion plus tax calculation depending on the country it was purchased in. You can see the exact exchange rate in your payout reports in App Store Connect. More information from Apple here:
Sales and Trends estimates the USD amount of sales and proceeds based
on a rolling average of the previous month's exchange rates. Final
payments in Payments and Financial Reports are based on the exchange
rate used to convert each report currency to the currency of your bank
account.
Usually, distributing money to users before you get paid from Apple is a risky business model that's open to exploitation. Users could refund their purchases and you'd have no way of knowing until it's too late.
A safer option could be to log the unlocked items and source country the purchase was from on your server, then divide up payouts from Apple when you get them based on these figures. That way, any scammers are distributed across the marketplace as a whole and doesn't come out of your pocket.

Getting subscription payment history from Apple in-app purchase receipt

I'm trying to pull historical payments per-subscription from Apple, and I've run into some problems. What I'm hoping for is something similar to what I get from Stripe, where I send a subscription ID and receive an array of transactions (including payment date, payment amount, discount, currency, etc.).
Using in-app subscription purchases from React Native, the app receives and store what appear to be "iOS 6 style" receipts (regardless of the actual iOS version).
Validating these with Apple on a regular basis has worked well in order to check the current subscription status, but Apple's documentation suggests that the only way to retrieve historical transactions is to provide an "iOS 7 style" receipt. Even then, the returned receipt objects do not appear to contain information about the amount paid, the currency they were paid in, and whether Apple's cut was 15% or 30%.
First question would be how (or even if) I can transform the "iOS 6 style" receipt into "iOS 7 style" - or whether there's another way to get full history for a given subscription ID? The second would be how to retrieve the actual transaction information, above and beyond a simple "payment of some kind happened at this time"?
To be able to fetch data of user's transactions you need a receipt. Using apple verifyReceipt api you'll able to get all needed information, except prices.
I not sure, but there is no way to convert iOS6 style receipt into iOS7 style. But, I hope it may be done on client-side (device) automatically.
If you just want to get financial information look at Apple Reporter Tool, which allow you to fetch any financial data you want (subscriptions, inapps, application installs, applciations purchases).

Resources