With Get Subscriptions By Customer invocable action, you can get list of existing Subscriptions in Stripe by providing few parameters. And With Lite Pae's Get a Subscription By Id you can get more details of a subcriptions like total amount etc.
- Create a new flow.
- Add logic to get Stripe Customer Id from your Salesforce object like Contact.
- If you don't have it in Salesforce then no problem, you can add our Search Customer action in the flow to search customer in Stripe based on Name or email and then map Customer Id from its response to Salesforce.
- Add a step to query Payment Account and store its Id in a flow variable i.e. paymentRecordId.
- Add a new Action and search for Get Subscriptions By Customer.
- Setup its required input values based on previous steps like paymentRecordId, Customer Id.
- You can set Status of subscriptions to be retrieved i.e. active, canceled, all etc
- You can also set how many to retrieve by setting a value to Row Limit. Limit can range between 1 and 100.
- You may want to handle its response as well to output variables by clicking on Advanced section of this node to know if it was processed successfully or not (Status). By default, it has upto 5 variables to map subscription ids to flow variables for your ease of use but you can get all by parsing ResultInJSON for full list of subscriptions in json format.
- You can add a screen component to show the response from previous step.
- Publish flow.
- Add this flow on your Salesforce Lightning page, Experience Cloud Site
- Tip: You can create a Quick Action button to call this Flow and add it on your Object Layout for Example on Contact page layout.