Stripe - Payment
Last updated
Last updated
The component allows to accept a Payment from a custom LWC component.
It creates an incomplete Payment Intent using the provided amount (from the numeric attributte or from the record field) and captures a Payment Method. The allowed payment method types can be configured with the attribute, there is an option to provide a customer and show the existing payment methods.
This component can be suitable for Experience Cloud page in the custom LWC components to accept the payment for the Salesforce records.
For example, the experienc cloud page can show the Event details, the Event record has an attendence Cost filed to be an Amount for the Payment. The component handles the Payment with Stripe.js and connected Stripe Dashboard, providing the events as well as able to store the Payment Intent Id and Success/Error status + details on the Salesforce record.
Please see the list of the attributes to configure the component:
Record Id
The record id to associate the payment with
Stripe Customer Id
The Stripe Customer Id to associate the payment with
Stripe Customer Id Field
The API name of the field that contains the Stripe Customer Id
Allowed Payment Method Types
Comma-separated list of allowed Stripe Payment Method Types
Allow Existing Payment Method Selection
Allow the user to select existing Payment Method (only if Stripe Customer is provided)
Amount Field
The API name of the field that contains the amount to charge
Amount
The amount to charge (used if no recordId and Amount Field are provided)
Currency
The currency of the payment (defaults to Stripe Settings if not provided)
Description Field
The API name of the field that contains the description of the payment
Description
The description of the payment (used if no recordId and Description Field are provided)
Payment Id Target Field
The API name of the field to store the Stripe Payment Intent Id
Target Status Field
The API name of the field to store the payment status
Success Status Value
The value to set the Target Status Field to when the payment is successful
Error Status Value
The value to set the Target Status Field to when the payment fails
Error Message Target Field
The API name of the field to store the error message when the payment fails
Success Message
The message to display when the payment is successful
Uncaptured Message
The message to display when the payment is authorized and uncaptured
Allow Cancellation
Allow the user to cancel the payment
Cancel Message
The message to display when the payment is canceled
Submit Button Label
The label of the submit button. Allows merging {amount}