Skip to main content
Question

Apple server side migration (Importing Receipts) always failing

  • 26 September 2022
  • 2 replies
  • 99 views

Forum|alt.badge.img+5

Hello, 

I am trying to migrate Apple's subscriptions via client-side (I have all data required) to RevenueCat, however, I keep receiving the status 400 (Bad Request) from the REST API POST /receipts endpoint.

This is an example of format that I am sending:

{
  app_user_id: 1,
  product_id: 'pro_quarterly',
  fetch_token: 'MIIUCwYJKoZIhvcNAQcCoIIT...jcxwb5vocU=',
  price: 13.99,
  currency: 'USD',
  attributes: {
    '$displayName': { value: 'Jhonatan' },
    '$email': { value: 'jhonatan@gmail.com' }
  }
}

I have been succefull with Android's migration, unfornately I do not know what I am doing wrong or if there is something missing with the Apple's migration.

All products from Apple are registered in RevenueCat's dashboard, App Store Connect App-Specific Shared Secret is set, as well the authorization header with the public api key refering to RevenueCat's IOS app project. 

2 replies

Forum|alt.badge.img+5
  • Author
  • New Member
  • 2 replies
  • September 27, 2022

...via server-side I meant.

Bruno wrote:

I am trying to migrate Apple's subscriptions via client-side (I have all data required)

 


Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 178 replies
  • October 6, 2022

A couple of questions here:

  • Are you using the correct API key? It should be the public API key for your iOS app (make sure you’re not using the one from the Android app!)
  • In your example payload, the `app_user_id` is an integer, it should be a string

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings