With Payment Methods component, you can allow your customers to add/edit their Credit Cards in stripe based on their customer id. Basically you will have your customer's id map to salesforce using Lite Pae - Customer Profile component and then use that to setup payment methods for that customer.
- Create a new flow.
- Add a step to query Payment Account and store its Id in a flow variable i.e. paymentRecordId.
- Add a step to query Stripe Customer Id and store its value in a flow variable i.e. stripeCustomerId.
- Add a screen component and add Lite Pae - Payment Methods component on it.
- Configure its properties like
- Payment account record Id to above flow variable (paymentRecordId)
- Stripe Customer Id to above flow variable i.e. (stripeCustomerId).
- Optionally, you can setup some other properties like
- Allow to Edit Payment method: to show/hide ability to edit their card expiry etc.
- Allow to add a new Payment method: to add new Payment method for future use.
- Allow to Select a Payment method: to ability to select an existing payment method as output variable of this component, which can be used on next step in the flow.
- Make Payment Method selection required: to make the payment method selection required in case you also set up Allow to Select a Payment method to True.
- Important: It is usefull when the next component in your flow is Lite Pae - Charge Customer, which expects Payment Method Id as input parameter (Stripe Payment Method Id) and this configuration set to true make it required to select a Payment Method Id on this component to move on to next step.
- Required validation message for Payment Method selection: to customize validation message if both Allow to Select a Payment method and Make Payment Method selection required is set to true
- Save and activate the flow.
- Add flow on your Salesforce Lightning or Experience Cloud page and you are good to collect payment methods.
- Checkout the following package for a sample flow for above scenario.