Create a Subscription in Stripe with Lite Pae's Invocable Action available in Salesforce Flow

Invocable Action,Salesforce Flow
Lite Pae - invocable action create a subscription

With Create a Subscription invocable action, you can create a Subscription in Stripe by providing few parameters. With combination of Search Customer and Payment Method, You can automate customer id mapping from stripe to Salesforce by simply adding Search Customer in your Salesforce Flow and Payment method allow your customers to select an existing payment method they have added before or add a new payment method. Then Add this Action in same flow to create a Subscription by providing Stripe Customer Id along with other parameters.

  • 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 Screen component and add Lite Pae's Payment Method component on it with option to select and add flags enabled.
    • Make sure to map back Selected Payment Method Id to a variable in advanced section of the flow component.
  • Add a new Action and search for Create a Subscription.
    • Setup its required input values based on previous steps like paymentRecordId, Customer Id, Payment Method Id.
    • To pass Amount to be charged you have 2 Options
      • 1st option: You can provide Stripe Price Id
      • 2nd option: Or you can provide other parameters - Amount, Cuurency Code, Product Name, Quantity, Recurring information etc.
      • NOTE: Stripe Price Id takes precendence. i.e. if provided, Subscription items will be created based on price Id and other paramaters mentioned in option 2 will be ignored.
    • 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). Specially, Subscription Id or ResultInJSON for full subscription details 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.

You might be interested in these articles too

Create an Invoice in Stripe with Lite Pae's Invocable Action available in Salesforce Flow

Read more

Charge a customer off-session with Lite Pae's Invocable Action

Read more