Stripe Element
<sc-stripe-element></sc-stripe-element>
This component let users create stripe element.
Component Codex
Properties
Property | Description | Type | Default |
---|---|---|---|
disabled | Whether this field is disabled | boolean | |
formState | The form state | "confirmed" | "confirming" | "draft" | "expired" | "failure" | "finalizing" | "idle" | "loading" | "paid" | "paying" | "redirecting" | "updating" | |
hasFocus | Inputs focus | boolean | |
label | The input's label. Alternatively, you can use the label slot. | string | |
mode | Mode for the payment | "live" | "test" | 'live' |
order | The checkout session object for finalizing intents | Checkout | |
secureText | The input's help text. Alternatively, you can use the help-text slot. | string | '' |
selectedProcessorId | The selected processor id | "paypal" | "paypal-card" | "stripe" | |
showLabel | Should we show the label | boolean | true |
size | The input's size. | "large" | "medium" | "small" | 'medium' |
Events
Event | Description | Type |
---|---|---|
scPaid | The order/invoice was paid for | CustomEvent<void> |
scPaymentInfoAdded | Payment information was added | CustomEvent<PaymentInfoAddedParams> |
scSetState | Set the state | CustomEvent<"EXPIRE" | "FETCH" | "FINALIZE" | "PAID" | "PAYING" | "REJECT" | "RESOLVE"> |
Methods
confirmCardPayment(secret: any) => Promise<any>
Confirm card payment
confirmCardSetup(secret: any) => Promise<any>
Confirm card setup.