PaymentMethodComponent
Last updated: October 6, 2025
1/*2* Payment component interface3*/4public interface PaymentMethodComponent {5/*6* The name of the payment method7*/8public val name: PaymentMethodName910/*11* Check if the payment method is available12*/13public suspend fun isAvailable(): Boolean1415/*16* Render the payment method in Composable UI17*/18@Composable19public fun Render()2021/**22* Allow to tokenize only for the payment method23*/24public suspend fun tokenize()2526/**27* Render the payment method in imperative XML/Dynamic views layouts28*29* @param container - Provide a view container to add the payment method30*/31public fun provideView(container: View): View32/**33* Allow to submit the payment for the payment method.34* The payment submission only works for card payments. All other payment methods return `MethodNotSupportedError`.35*/36public suspend fun submit()3738/**39* Checks whether the payment method validation is successful.40* The payment validation only works for card payments. All other payment methods return `false`.41*/42public suspend fun isValid(): Boolean43}
Renders Flow component in a Compose view.
1flowComponent.Render()
Renders the component in a View container.
1flowComponent.provideView(container)
Tokenizes the selected component, if supported.
Use the onTokenized() callback to retrieve the generated token and process the token details as required.
1flowComponent.tokenize()23cardComponent.tokenize()
Submits the payment for the payment method when using the custom pay button.
The payment submission only works for card payments. All other payment methods return MethodNotSupportedError.
1flowComponent.submit()23cardComponent.submit()
Checks whether the payment method validation is successful.
The payment validation only works for card payments. All other payment methods return false.
1flowComponent.isValid()23cardComponent.isValid()
Applies the changes specified in UpdateDetails to the Flow for Mobile UI. For example, to modify the payment amount displayed to the customer, provide a new amount value in UpdateDetails, in minor currency units.
Information
This only modifies the UI. To update the payment session with your changes, use the handleSubmit callback.
1flowComponent.update(updateDetails)23cardComponent.update(updateDetails)