Custom parameter through in-app purchase

In my service I want to sell some books.

Books are made by authors from different countries.

Books should be sold to users from different countries.


As, it would be many-many books, there is no need to create each book as specific in-app purchase and as I know Apple doesn't have API for it. So, I decided to use Tiers.

As I understood, price for each Tier could be the same for each country.

I have created several in-app purchase: Tier 1 (1$), Tier 2 (2$), Tier 5 (5$).

So, books could sold by 1$, 2$ or 5$


I plan to link books to Tiers:

Book 1 - Tier 1

Book 2 - Tier 1

Book 3 - Tier 5


But, as I know net income is calculated in this way:

net income = ***** price - VAT - % apple


If user would be from Germany it would one VAT, if user would be from Greece it would be another VAT.

So, net income is not a static it depends on user's country.


But, if user makes an in-app purchase and I would receive net income from Apple, how could I determine - which Book brought me this net income?


For example,

User has bought Book 1, which has Tier 1.

User has paid 1$

net income = (1$ - 20%) - 30% = 0.56$

Apple would send me 0.56$

On my back-end I would know that user has bought Book 1, but I would not know that Apple has sent me 0.56$ for a Book 1.

Tier 1 could be used by many books - Book 1, Book 2, etc.


How to solve this issue?

Replies

Are you asking how to correltate a purchase with an item, or an item with a user, or payment with an item, or ?


Are you wanting to do this inside the app, or later, after payment to you, so you can distrbute monies to different authors?


If the latter, you may want to store a list of product identifiers on your server and pay from that list. See: https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/ShowUI.html