Skip to main content
Solved

`POST /v1/receipts` failing with Server-Side observer mode


Forum|alt.badge.img+4

Hi there!

Can you please clarify the case of using RC with the Server-Side observer mode?

Prerequisites:

  • Apple App Store Server Notification is configured
  • Google Real-Time Developer Notifications is configured
  • Webhooks are configured

The happy-path looks like:

  • Our app (Android/iOS) completes a purchase for a new user and gets the fetch token/receipt
  • Our app sends all needed data (app_user_id, fetch_token, price/currency, product_id) to our backend
  • Our backend invokes POST /v1/receipts
  • Our webhook receives the initial_purchase event

What will happen if our backend doesn't invoke POST /v1/receipts due to a network error or internal error:

  • Will the initial_purchase event be raised anyway for that new user?
  • Will any future events be automatically detected for that user?
  • Should we guarantee to invoke POST /v1/receipts to ensure correct behavior?

 

Best answer by Michael Fogel

Hey There! 

 

You should guarantee to invoke the receipts endpoint. If you dont have this endpoint hit for that user, that subscription will most likely not be tracked as this endpoint handles recording a purchase for a user from iOS, Android, or Stripe and will also create that user if they don't already exist in RevenueCat.

 

If you do use this endpoint, that user will be trackable in the dashboard and the purchases will be tracked consistently.  

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

2 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • Answer
  • May 5, 2023

Hey There! 

 

You should guarantee to invoke the receipts endpoint. If you dont have this endpoint hit for that user, that subscription will most likely not be tracked as this endpoint handles recording a purchase for a user from iOS, Android, or Stripe and will also create that user if they don't already exist in RevenueCat.

 

If you do use this endpoint, that user will be trackable in the dashboard and the purchases will be tracked consistently.  


Forum|alt.badge.img
  • New Member
  • 1 reply
  • February 9, 2024

Hello Michael, i would love to get some more informations about this. We have the same setup as dmitry.

For Stripe the /v1/receipts process is documentated here: https://www.revenuecat.com/docs/getting-started/stripe#5-send-stripe-tokens-to-revenuecat

For Apple and Android it looks unnecessary to call this endpoint (/v1/receipts) - there is no info in the docs about this?. Does purchases_flutter handle this for me? 

Please clarify, thanks!

 


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