Actionable
Last updated: July 15, 2026
A type alias for a component, which is:
Describable– It represents the component's name.Renderable– The component is ready to be rendered.Submittable– The component is ready to be submitted.Tokenizable– The component is ready to be tokenized.
1public typealias Actionable = Describable & Renderable & Tokenizable & Submittable
1protocol Describable: Sendable {2/// The name of the component.3var name: String { get }4}
1protocol Renderable: Sendable {2/// A Boolean value indicating whether the component is available.3var isAvailable: Bool { get }45/**6Renders a view representing the component.78- Returns: A view representing the component.9*/10@MainActor11func render() -> AnyView12}
1protocol Submittable: Sendable {2/// A Boolean value indicating whether the component validation is passed.3var isValid: Bool { get }45/// A Boolean value indicating whether to show the pay button for the component's current step.6var isPayButtonRequired: Bool { get }78/// Call to start the current payment process9func submit()10}
1protocol Tokenizable {2/// Tokenizes the component's input3///4/// ## Discussion5/// This method handles tokenization of the component's data.6/// The tokenization result will be delivered through a callback closure.7func tokenize()8}
Renders the component in a SwiftUI view.
1if component.isAvailable {2component.render()3}
Submits a Submittable component, if you require your own pay button.
Information
You cannot call this method for digital wallet payment methods such as Apple Pay or Google Pay. If you do, it triggers an onError callback.
1component.submit()
Tokenizes the selected component, if supported.
Use onTokenized() callback to retrieve the generated token and process the token details as required.
1component.tokenize()
Checks if the Submittable component is ready to be submitted. The component is ready if it has:
- Captured all of the required details from the customer
- Passed validation
1component.isValid
Indicates whether to show the pay button for the component's current step. Defaults to true.
It returns false during intermediate steps of multi-step payment methods. For example, when stc pay requests the customer's phone number.
1component.isPayButtonRequired