$wsStripe module, you can retrieve payment information related to Stripe. It provides the configuration data for the Stripe.js integration as well as status information about the current payment process. In this section, you will learn how to initialize Stripe in the frontend and evaluate the payment status.
Module overview
Example / excerpt of$wsStripe
"ƒ()" denotes a function.
Variables and methods overview
Templates
The$wsStripe module is typically used in the checkout area,in particular on the payment page. The configuration data is required to
initialize the Stripe.js object in the frontend.
Variables
$wsStripe.configuration
Returns the Stripe configuration data. Used to initialize the Stripe object in the frontend.$wsStripe.configuration.publishableKey
Returns the public Stripe key. This key is required to initialize Stripe.js in the browser and is safe to use in the frontend.$wsStripe.configuration.targetAccount
Returns the Stripe Connected Account ID. Only required for platform or marketplace payments, when payments are forwarded to a connected account.$wsStripe.paymentCanceled
Returnstrue if the payment was canceled.
$wsStripe.paymentFailed
Returnstrue if the payment failed.
$wsStripe.paymentPending
Returnstrue if the payment is still pending.
Methods
$wsStripe.createCustomerSession()
Creates a Stripe Customer Session for the currently logged-in customer. The session enables secure access to stored payment methods and customer data directly in the frontend. Signature$wsStripe.createCustomerSession()
Return valuemap - Customer Session object with the following attributes:
Example that creates a Customer Session.
Actions
No actions are available for$wsStripe.
