Hey @truepilot17, welcome to the community
You can do this with a custom action and API. I do this to track subscriptions within the apps for admin reasons and for users to be able to cancel their subscriptions.
First, in your user database collection, add a text parameter and call it “Stripe Customer ID”.
On the screen where you send them to the external purchase, have an additional button on the screen that says something like “After you’ve completed your purchase, click this button”. Similar to this:
Place a button with 3 actions: 1. A custom action that retrieves the current customer ID from stripe (here’s the API for that). 2. An action to update the user’s new Stripe Customer ID parameter with the API call’s customer ID response. 3. A link to a modal screen with a success/error message. Like so:
The success/error message can be setup with visibility settings if logged-in-user > stripe id is equal to empty, display error. If not empty, display success. The continue button just goes back.
Then, you can use this parameter to filter all of the other API calls from stripe using external collections.
Like subscriptions, you can create an external collection of all subscriptions then filter the logged-in user’s subscription only by using the query: customer=logged in user > stripe customer id.