#JSL
1 messages · Page 1 of 1 (latest)
Hi, I remember Firebase Extension has their Github repo. Please reach out to Issues in that repo for debugging related to that extensions!
It's not regarding debugging. I am trying to sync my subscriptions from Stripe to RevenueCat but I need to POST the userId and receipt token (from Stripe) to Revenue Cat. This is a standard method between Stripe and RevenueCat (so no Firebase Functions/Extensions), however I am using a Firebase Extension from Stripe to complete the "Checkout" so I need to find the receipt token.
I am going in circles as Stripe is pointing to Revenue Cat (from a previous question), Revenue Cat is pointing to limitation from Stripe as to way we need to POST the data although there is a integration. Flutter and Firebase (I asked for help on those servers also) is pointing back to Stripe and RevenueCat as they are the third-party apps I am trying to use.
Okie, could you elaborate more or "receipt token"? What is receipt token exactly?
Do you have any example Id from Stripe, ie. a Checkout Session, a PaymentIntent Id that you want this receipt token?
This is the guide:
https://www.revenuecat.com/docs/stripe
Step 5
Just rereading it, I know your not RevenueCat an can't answer for them but from reading it do you think the CheckoutSessionID which I already pull in my app should work alongside the userID?
Thank you for helping me with this, really appreciate it
fetch_token: Your Stripe subscription ID (sub_...) OR your Stripe Checkout Session ID
This part?
Yes it looks like Checkout Session Id should works. It has the format cs_text_xxx for Test mode or cs_live_xxx for Live mode
The firebase function seem to just create a Firestore document as a checkout session and then somehow Firebase Functions loads the checkout url which process the payment and then gives a success or failure. Is there a way to capture this if it's a success?
I will need to try and find a way to capture it to then post the details to RC
Do you setup a webhook endpoint? You can listen to checkout.session.completed event to capture the successful Session Id
Similar to this step, while "fulfill the order" here means sending information to RC https://stripe.com/docs/payments/checkout/fulfill-orders#fulfill
As a webhook to Firebase?
RevenueCat only accepts:
-
-
-
-
- from RC - - - - -
Click Add endpoint, paste the URL in the Endpoint URL field and select the following events:
customer.subscription.updated
customer.subscription.deleted
charge.refunded
invoice.updated
It's important to only select these events.
- from RC - - - - -
-
-
-
Does RC also setup webhook 🤔
Let's put this aside
The firebase function seem to just create a Firestore document as a checkout session and then somehow Firebase Functions loads the checkout url which process the payment and then gives a success or failure. Is there a way to capture this if it's a success?
before "somehow Firebase function" loads the checkout url, don't you have the Checkout Session Id itself? the cs_test_xxx
There is a RC integration with Stripe. But this is comment on one of their support forums:
That’s correct, the customer ID that Stripe generates is ignored by RevenueCat, it’s only concerned with the subscription. The subscription will be kept up-to-date automatically through the RC <> Stripe integration and will be associated with the App User ID that you sent through the POST API call - in your example user_123.
To kick it off I just have what I thought is the checkout Session ID but it's only:
something like 53s6H2kS85Tp6jvozu8r
I think you have mixed up several things. Let's look closer on the the Checkout Session Id (instead of customer ID or subscription id)
which I think might just be a generate docID in Firestore but it contains
sessionId here you go
That's the I mentioned before, but it's only created once the user clicks on the checkout button. So I will need to send it to RC post it being processed.
So ideally I want to confirm purchase is successful and then go back and grab that sessionID as above with the local userID and then post that to RC, maybe using Firebase Function if there is no way to POST it from Stripe to RC
I am not familiar with Firebase too, but do you mean you need to somehow catch the Id earlier, before the user click on checkout button?
I found one comment here hints that document_id might have the value https://github.com/stripe/stripe-firebase-extensions/issues/391#issuecomment-1159571254