#JSL

1 messages · Page 1 of 1 (latest)

sharp adderBOT
shadow temple
#

Hi, I remember Firebase Extension has their Github repo. Please reach out to Issues in that repo for debugging related to that extensions!

waxen kestrel
#

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.

shadow temple
#

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?

waxen kestrel
#

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?

RevenueCat

Our Stripe integration allows you to let users subscribe on your website, and automatically unlock access to the same subscription content through the Purchases SDK.

#

Thank you for helping me with this, really appreciate it

shadow temple
#

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

waxen kestrel
#

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

shadow temple
#

Do you setup a webhook endpoint? You can listen to checkout.session.completed event to capture the successful Session Id

waxen kestrel
#

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.

shadow temple
#

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

waxen kestrel
#

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.

waxen kestrel
shadow temple
#

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)

waxen kestrel
#

which I think might just be a generate docID in Firestore but it contains

shadow temple
#

sessionId here you go

waxen kestrel
#

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

shadow temple
#

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?

waxen kestrel
#

After is perfect, it's more how to confirm transaction is successful. I can look into and see if webhook can go back to Firebase

#

This chat has certainly been the most help I have had on this topic, been trying to figure it out for a couple of days now. Really appreciate it Orakaro