Sending developer payload in IAP

We are using server-to-server purchase notifications for App Store mobile apps. User can pay for subscriptions. We configured server-server notifications.

Our Implementation: Since there is no way for us to pass our user_id during IAP, receipt data and server notification have no field for mapping it to our users, we are doing the following things to work around this :

  1. After IAP payment is processed. We send the receipt to our server from App.
  2. We store receipt for the respective user.
  3. The receipt contains transaction_id and this transaction_id can be used to verify notification we receive from Apple server e.g Initial buy etc.

.I have the following questions:

  1. if Apple sends our Server notification before our app makes an API call to our server to store the receipt. In that case server callback will do nothing, because it will not able to find user account without transaction_id. How should I avoid that?
  2. Is there a field in which we can pass data_payload(e.g user_id, email-id)? So that case 1 can be avoided.
  3. Is there any API we could call to get user information related to a transaction?
  4. if there is an API to fetch all transactions between dates?
  • Hello, I am wondering if you ever solved this, I have the same questions

Add a Comment