Solved

How to transfer a stripe purchase

  • 19 October 2023
  • 3 replies
  • 51 views

Badge

Our app subscriptions are currently done via appstore and playstore purchases and we’re trying to add stripe into the mix. But we’re not sure how to handle the case where an old user signs back after a new subscription as anonymous. In case of appstore and playstore purchases, the transfer purchase call does the job but not so in stripe purchases. How is this to be handled? Just post a second receipt against the signed in user’s app user id? It’ll result in the stripe subscription attached to both revenuecat customers. I’m not sure about any unintended side effects of this flow. Is this the way to go here? Or am I missing something

icon

Best answer by afzal-shahul-hameed-41409f 23 October 2023, 15:52

View original

3 replies

Userlevel 3
Badge +8

Hi,

Happy to help here. To clarify, is this the flow for the user?

  1. Makes an account on web (get assigned custom app_user_id)
  2. Purchases a Stripe subscription
  3. Logs out of account
  4. Clicks restorePurchases while logged out, which fails
Badge
  1. A signed user deletes app, has a app_user_id, “xyz”
  2. Re-installs at a later stage, gets a new app_user_id, “abc”
  3. Subscribes to stripe
  4. Re-logs in, gets back old app_user_id, “xyz”

Question was how can “abc” user’s subscription be transfered to “xyz”. Solution was to simply call the receipt API for user “xyz”. Revenuecat takes care removing the subscription from “abc” as well, essentially doing the transfer.

 

Only if it was documented! Ideally here.

Userlevel 3
Badge +8

Ah, I see. I can add that to the docs!

Reply