Skip to main content
Solved

Import Decoded App Store Receipt

  • 5 January 2023
  • 1 reply
  • 65 views

Forum|alt.badge.img+5

We would like to import old receipts. Unfortunately they are not raw base64 but have been decoded into JSON. How would we import these into RevenueCat?

Best answer by kaitlin

Hey @dkobia!

I see that you sent a support ticket regarding this question but I wanted to post the answer here as well for visibility, in case any future developers have this question as well!

It's a common scenario to not have the raw receipts stored for your purchases, so that's no problem here. I'm not sure if it's possible to re-encode these once they've been decoded into JSON, but a good option may be to do a client-side migration instead.
 
client-side migration can be done in a super lightweight way by first implementing the SDK in observer mode. By calling configure with the observer mode flag enabled, you can retain your existing purchase logic while you start migrating the underlying transactions for your users to RevenueCat. The SDK will automatically pick up on transactions and start recording it in RevenueCat (paired with an identified user ID). You can read more here: https://www.revenuecat.com/docs/observer-mode 
 
Then, once you feel like a good amount of users have been migrated in observer mode, you could flip over to using RevenueCat for purchase logic as well (benefits of full implementation here). This type of migration is safe, and is a good way to make sure your users are recognized in RevenueCat before making the full switch over.

View original
Did this post help you find an answer to your question?

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • January 9, 2023

Hey @dkobia!

I see that you sent a support ticket regarding this question but I wanted to post the answer here as well for visibility, in case any future developers have this question as well!

It's a common scenario to not have the raw receipts stored for your purchases, so that's no problem here. I'm not sure if it's possible to re-encode these once they've been decoded into JSON, but a good option may be to do a client-side migration instead.
 
client-side migration can be done in a super lightweight way by first implementing the SDK in observer mode. By calling configure with the observer mode flag enabled, you can retain your existing purchase logic while you start migrating the underlying transactions for your users to RevenueCat. The SDK will automatically pick up on transactions and start recording it in RevenueCat (paired with an identified user ID). You can read more here: https://www.revenuecat.com/docs/observer-mode 
 
Then, once you feel like a good amount of users have been migrated in observer mode, you could flip over to using RevenueCat for purchase logic as well (benefits of full implementation here). This type of migration is safe, and is a good way to make sure your users are recognized in RevenueCat before making the full switch over.


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