Solved

Which Stripe events do I listen to in order to post receipts

  • 2 December 2021
  • 1 reply
  • 19 views

Badge +2
  • Dedicated Member
  • 22 replies

I followed this guide to send events directly from Stripe to RevenueCat. 

 

I also saw this link for sending our tokens to RevenueCat which must be done before the above events (I think). I send the token during “checkout.session.completed” but it doesn’t look like that event is happening. Should we be posting receipts from “invoice.payment_succeeded” ? Might be good to put something about this in your docs.

 

icon

Best answer by cody 7 December 2021, 22:00

View original

1 reply

Userlevel 4
Badge +8

Hey @Tony!

If you’re using Stripe Checkout or Stripe Payment Links, the token should be sent from the `checkout.session.completed` webhook. This event is called once the the checkout session is completed with a purchase. You can see this in action in our sample project here: https://github.com/RevenueCat-Samples/stripe-no-website-example

If you’re not using Stripe Checkout, it might be a different webhook event that is called after a successful payment (like you mentioned, possible the invoice.payment_succeeded webhook). Basically, we need the Stripe Subscription ID (`sub_**`) as well as the app user ID it should be connected to.

I’ll add this to our backlog to clarify in our docs- let me know if that helps!

Reply