Question

Apple server side migration (Importing Receipts) always failing

  • 26 September 2022
  • 2 replies
  • 86 views

Badge +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

Badge +5

...via server-side I meant.

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

 

Userlevel 5
Badge +7

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